Toast the user when a processing run completes #13
Notifications
Due Date
No due date set.
Depends on
#33 Add a global toast/notification component
eveal/gemory
Reference: eveal/gemory#13
Reference in New Issue
Block a user
Summary
The SSE plumbing for processing events already exists in
gemory/src/activity/:activitiesProcessed.tsopens a fetch-adapter stream against mammon'sGET /activities/processed(bearer auth flows in via the generated axios client, sothe "EventSource can't set headers" concern is moot), parses the
processedevent,reconnects on drop (ref-counted, 3s delay), and drives store/resource refresh through
onActivitiesProcessed/useProcessedResource(market acquisitions, ledgers, per-pageresources).
The only piece of the original #13 still missing is the user-facing notification.
Add an app-level toast that fires on each
processedevent.Scope
App.vue) registered viaonActivitiesProcessed, gated onuseAuthStore().isAuthenticated: subscribe when authenticated, unsubscribe on logout /when
isAuthenticatedflips false (watch the store).processedevent, fire aninfo-type toast via the existingtoasthelper —one toast per event, relying on the existing 5s auto-dismiss (no coalescing/debounce).
Out of scope
implemented.
processedevent with nopayload, so it is not representable. No mammon follow-up.
Acceptance criteria
infotoast.Related
ProcessingController#streamProcessing/SseUserActivitiesProcessedListener.gemory/src/activity/activitiesProcessed.ts,onActivitiesProcessed,useProcessedResource.Subscribe to processing SSE stream and notify the user when a run completesto Toast the user when a processing run completes