feat(web): activity cards — one card per upload run (variant B) #1534

Merged
chris merged 2 commits from feat/activity-cards-vB into main 2026-11-15 23:13:32 +01:00
Owner

Summary

Redesign of the Media activity dialog (user-approved variant B, 'media-zentriert, kompakt'):

  • One top-level card per upload run (per-session upload:<sessionId> operations) — no aggregate 'Upload batch' row, no contradictory session counts
  • Headline metric is media progress ('X von Y Medien fertig'), processing steps demoted to per-lane slim progress bars with right-aligned counts
  • Finished lanes collapse into one muted check-line; queued-only lanes as muted text; failed counts red
  • All top-level rows collapsible, all default COLLAPSED (running included; explicit toggle wins afterwards)
  • Receiving with unknown total (Android, no plannedCount on old clients) = indeterminate pulsing bar + 'N empfangen …' — kills the growing X/X bug
  • Stale/idle sessions dimmed with 'zuletzt aktiv HH:MM', no spinner
  • Old-backend fallback: legacy aggregate shape still renders
  • Canonical lane order enforced client-side (thumbnails → video_previews → duplicate_hashes → face_crops → metadata → semantic_search → things → discovery domains)
  • Retry-safe lane percent clamped to 100 (finishedCount counts jobs, can exceed totalCount)
  • i18n en/de/da, Paraglide recompiled

Tests

  • vitest 51/51 in changed specs (incl. 2 new: retry clamp, canonical order purity)
  • Playwright activity-dialog.spec.ts 6/6
  • svelte-check 0 errors

Depends on the API contract from #1533 (backend); additive/fallback-safe on its own.

## Summary Redesign of the Media activity dialog (user-approved variant B, 'media-zentriert, kompakt'): - **One top-level card per upload run** (per-session `upload:<sessionId>` operations) — no aggregate 'Upload batch' row, no contradictory session counts - Headline metric is **media progress** ('X von Y Medien fertig'), processing steps demoted to per-lane slim progress bars with right-aligned counts - Finished lanes collapse into one muted check-line; queued-only lanes as muted text; failed counts red - **All top-level rows collapsible, all default COLLAPSED** (running included; explicit toggle wins afterwards) - Receiving with unknown total (Android, no plannedCount on old clients) = **indeterminate pulsing bar** + 'N empfangen …' — kills the growing X/X bug - Stale/idle sessions dimmed with 'zuletzt aktiv HH:MM', no spinner - Old-backend fallback: legacy aggregate shape still renders - Canonical lane order enforced client-side (thumbnails → video_previews → duplicate_hashes → face_crops → metadata → semantic_search → things → discovery domains) - Retry-safe lane percent clamped to 100 (finishedCount counts jobs, can exceed totalCount) - i18n en/de/da, Paraglide recompiled ## Tests - vitest 51/51 in changed specs (incl. 2 new: retry clamp, canonical order purity) - Playwright activity-dialog.spec.ts 6/6 - svelte-check 0 errors Depends on the API contract from #1533 (backend); additive/fallback-safe on its own.
Media activity dialog redesign (user-approved Variante B + 2 amendments):

- New backend contract (operations[] one op per upload session): ONE
  top-level card per session (key upload:<sessionId>) with 'Upload · N
  files' title, media headline 'X of Y media done' visible even collapsed,
  per-lane rows (finished=check-line, in-flight=slim bar with right-aligned
  '1.203 / 1.858' counts, queued-only=muted ring line, failed red counts).
  The aggregate 'Upload batch' row and the 'from N upload sessions' line
  vanish under the new backend.
- Receive phase with unknown total: indeterminate pulsing bar + 'N
  received …' — plannedTotal() no longer falls back to totalCount during
  receiving (the growing X/X bug with Android clients that send no
  plannedCount); the card title drops the '· 0 files' chip in that phase.
- ALL top-level rows start COLLAPSED — running and failed included (user
  amendment); explicit toggles still win (expandedOverrides unchanged).
- Stale/idle running cards (updatedAt >3 min old) render dimmed with
  'zuletzt aktiv HH:MM' and no spinner; the nested session card (and thus
  the spec 049 S8 discard button) is unchanged inside the expanded card.
- Old-backend fallback (upload-batch key or no operations) keeps today's
  shape (aggregate row, sessions nested in details) with the new styling.
- i18n: activityUploadOperationTitle, activityOperationMediaProgress,
  activityReceiveUnknownTotal, activityLastActive (en/de/da), Paraglide
  recompiled. Needs-attention section untouched.

Validation: svelte-check 0 errors; vitest 439 passed (incl. new per-session,
lane-helper, collapse-default and indeterminate-receive tests); Playwright
activity-dialog + upload-status (desktop) 10 passed, 2 pre-known
hydration-gate flakes passed on retry (ISSUE-216 class).
feat(web): activity lane contract addendum — canonical order, retry-safe clamping
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 5m48s
cfcf05dfda
Backend addendum applied to the Variante B session cards:

- Canonical lane order enforced client-side (defensive re-sort, backend
  already sends this order): thumbnails, video_previews, duplicate_hashes,
  face_crops, metadata, semantic_search, things, then discovery domains
  (domain_key ASC) — unknown keys land after the fixed lanes.
- Lane percent clamps at 100: finishedCount counts JOBS not media, so
  retries can push it past totalCount — bars must not overfill.
- Contract docs: lanes appear ONLY for types the session has jobs for;
  processedTotal is the backend's approximation (terminal upload-file
  statuses); sessionId/lanes are NON_NULL on upload operations of new
  backends (absent on old ones — optional in TS).

Tests: sortOperationLanes order + purity, retry-clamp at 100; vitest
51 passed in the touched specs, svelte-check 0 errors, Playwright
activity-dialog 6/6 green.
chris merged commit 0501c6b88d into main 2026-11-15 23:13:32 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1534
No description provided.