feat(web): render upload-batch activity and upload_batch_completed notifications #802

Merged
chris merged 2 commits from feat/upload-batch-notifications-web into main 2026-09-21 21:46:51 +02:00
Owner

Summary

Implements the web half of the approved design (docs/superpowers/specs/2026-09-21-upload-batch-activity-notifications-design.md). Companion to the API PR rendering the frozen contract shapes (recentBatch on /api/processing-summary, upload_batch_completed notification payload, notifications_changed SSE).

  • processingSummary.ts: RecentUploadBatch type + recentBatch on ProcessingSummary (optional; treated as inactive when absent).
  • notifications.ts: discriminated payload union + isUploadBatchCompletedNotification helper (legacy rows without payload type tolerated).
  • NotificationBell: branches by payload type. upload_batch_completed renders localized headline ("40 items uploaded and added to your library") + one line per lane ("38 thumbnails created, 2 failed") with dismiss-only action; domain_activation_offer unchanged (Activate/Later). Zero-upload fallback copy included.
  • ActivityDialog: renders recentBatch per-lane cards (live counts) instead of the lifetime activities list; clears to the empty state once the batch is notified. Lifetime badge line, people automation and error sections untouched.
  • AppShell: notifications_changed SSE -> debounced 500ms refreshNotifications; activation handler never calls the domain-activation endpoint for batch notifications.
  • Tests: upload-status.spec.ts fixtures extended with recentBatch; new upload-batch-notifications.spec.ts (dismiss-only bell, no activate call, SSE refresh, zero-upload headline).

Verification

  • npm run check: 0 errors (20 pre-existing warnings)
  • npm run build: pass
  • Playwright desktop upload-status + upload-batch-notifications + accessibility: 10 passed, 2 skipped (pre-existing)

Merge after the API PR (#801): the dialog/bell rely on the new API shapes.

## Summary Implements the web half of the approved design (docs/superpowers/specs/2026-09-21-upload-batch-activity-notifications-design.md). Companion to the API PR rendering the frozen contract shapes (recentBatch on /api/processing-summary, upload_batch_completed notification payload, notifications_changed SSE). - processingSummary.ts: RecentUploadBatch type + recentBatch on ProcessingSummary (optional; treated as inactive when absent). - notifications.ts: discriminated payload union + isUploadBatchCompletedNotification helper (legacy rows without payload type tolerated). - NotificationBell: branches by payload type. upload_batch_completed renders localized headline ("40 items uploaded and added to your library") + one line per lane ("38 thumbnails created, 2 failed") with dismiss-only action; domain_activation_offer unchanged (Activate/Later). Zero-upload fallback copy included. - ActivityDialog: renders recentBatch per-lane cards (live counts) instead of the lifetime activities list; clears to the empty state once the batch is notified. Lifetime badge line, people automation and error sections untouched. - AppShell: notifications_changed SSE -> debounced 500ms refreshNotifications; activation handler never calls the domain-activation endpoint for batch notifications. - Tests: upload-status.spec.ts fixtures extended with recentBatch; new upload-batch-notifications.spec.ts (dismiss-only bell, no activate call, SSE refresh, zero-upload headline). ## Verification - npm run check: 0 errors (20 pre-existing warnings) - npm run build: pass - Playwright desktop upload-status + upload-batch-notifications + accessibility: 10 passed, 2 skipped (pre-existing) Merge after the API PR (#801): the dialog/bell rely on the new API shapes.
feat(web): render upload-batch activity and upload_batch_completed notifications
Some checks failed
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
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 / Build plants worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build converter worker image (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 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 1m41s
cd12b1b92f
Activity dialog now renders processingSummary.recentBatch (live per-lane counts) instead of the lifetime activities list, so a finished batch clears to the empty state. Notification bell branches by payload type: domain_activation_offer keeps Activate/Later, upload_batch_completed renders localized headline plus one line per lane with a dismiss-only action. AppShell refreshes notifications on the new notifications_changed SSE event (debounced 500ms) and never calls the domain activation endpoint for batch notifications.
ci: retrigger scoped web tests after runner port collision
All checks were successful
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Run scoped PR tests (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 / Build plants worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build converter worker image (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 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
5e21e6f3cb
chris merged commit aead948a7e into main 2026-09-21 21:46:51 +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!802
No description provided.