feat(web): cross-device upload activity UI #925

Merged
chris merged 1 commit from feat/049-upload-activity-web into main 2026-09-27 19:14:01 +02:00
Owner

Frontend half of spec 049 (S4/S5): cross-device upload activity visibility.

  • API client (lib/api/uploadActivity.ts): GET /api/upload-activity parsing the merged backend contract (bare array, derivedStatus, flat camelCase counts, receivingFileNames); 404/error/malformed payloads degrade to an empty list.
  • Server-backed store (lib/stores/uploadActivityServer.core.ts + .svelte.ts): fetch on initial load, debounced (~300ms) refetch on SSE upload_activity_changed, 60s polling fallback, refetch on EventSource reconnect; concurrent refreshes coalesce.
  • Merge rule: this tab's byte-precise local progress wins for its own session; every other session renders server file-level data. Derived stale (interrupted) and processing states are surfaced.
  • UI: ActivityDialog gains a per-session uploads list (status, x/y counts, current receiving file names, empty state); ProcessingIndicator and the mobile nav show another device's progress; dialog Refresh now refreshes server activity too.
  • Tests: Vitest (18 tests) for merge logic, derived status/progress text, debounce/polling/coalescing, and the API contract incl. 404 degradation. Validation run: npm run test:unit, npm run check (0 errors), npm run build, Playwright upload-status.spec.ts + accessibility.spec.ts (desktop) all green.
Frontend half of spec 049 (S4/S5): cross-device upload activity visibility. - **API client** (`lib/api/uploadActivity.ts`): GET /api/upload-activity parsing the merged backend contract (bare array, `derivedStatus`, flat camelCase counts, `receivingFileNames`); 404/error/malformed payloads degrade to an empty list. - **Server-backed store** (`lib/stores/uploadActivityServer.core.ts` + `.svelte.ts`): fetch on initial load, debounced (~300ms) refetch on SSE `upload_activity_changed`, 60s polling fallback, refetch on EventSource reconnect; concurrent refreshes coalesce. - **Merge rule**: this tab's byte-precise local progress wins for its own session; every other session renders server file-level data. Derived `stale` (interrupted) and `processing` states are surfaced. - **UI**: ActivityDialog gains a per-session uploads list (status, x/y counts, current receiving file names, empty state); ProcessingIndicator and the mobile nav show another device's progress; dialog Refresh now refreshes server activity too. - **Tests**: Vitest (18 tests) for merge logic, derived status/progress text, debounce/polling/coalescing, and the API contract incl. 404 degradation. Validation run: `npm run test:unit`, `npm run check` (0 errors), `npm run build`, Playwright `upload-status.spec.ts` + `accessibility.spec.ts` (desktop) all green.
feat(web): cross-device upload activity store + UI (spec 049)
Some checks failed
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 6s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
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 plants worker image (push) Has been skipped
Build and Deploy / Build converter 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 ML 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 / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Failing after 10m28s
c36ea60935
- GET /api/upload-activity client (bare array, derivedStatus, flat counts;
  404/error degrades to an empty list)
- server-backed activity store: initial fetch, debounced SSE
  upload_activity_changed refetch, 60s polling fallback, refetch on
  EventSource reconnect; local byte-precise progress wins for this tab's
  own session, server data for every other session
- ActivityDialog per-session list (status, x/y counts, receiving file names,
  empty state) and ProcessingIndicator/MobileNav cross-device progress
- Vitest coverage for merge rules, debounce/polling and the API contract
chris merged commit 2185bf24e0 into main 2026-09-27 19:14:01 +02: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!925
No description provided.