The PWA (#107) ships installable + offline + prompt-to-update, but push notifications / background sync were deliberately deferred to their own effort. This tracks that follow-up.
Why it's separate
Push is the heaviest, riskiest surface of the PWA:
- Server-side
web-push integration + a VAPID keypair (the private key is App-key-grade — must use the readSecret/O_NOFOLLOW pattern, gitignored, never logged).
- A subscription store, which forces a persistence decision for the currently-stateless dashboard.
- A dead-subscription sweeper (push services 404/410 expired subs).
- A notification-frequency policy (per-failure? per-mention? digest?).
- A privacy policy + opt-in consent — the hard rule: any data leaving the device is opt-in, minimum-data, self-hosted where feasible.
Scope when picked up
- Client: SW
push + notificationclick handlers; an opt-in consent UI (Notification.requestPermission on user gesture → PushManager.subscribe with the VAPID key); subscribe/unsubscribe endpoints.
- Server: the
web-push send path, VAPID keypair provisioning, the subscription store + sweeper, the frequency policy.
- The consent affordance degrades gracefully (off, with explanation) until a compliant push channel exists.
The current SW (web/src/sw.ts) is structured so a push event listener can be added without reworking the existing routing. Suggest a ce:brainstorm → ce:plan pass given the persistence + privacy-policy decisions involved.
The PWA (#107) ships installable + offline + prompt-to-update, but push notifications / background sync were deliberately deferred to their own effort. This tracks that follow-up.
Why it's separate
Push is the heaviest, riskiest surface of the PWA:
web-pushintegration + a VAPID keypair (the private key is App-key-grade — must use thereadSecret/O_NOFOLLOWpattern, gitignored, never logged).Scope when picked up
push+notificationclickhandlers; an opt-in consent UI (Notification.requestPermissionon user gesture →PushManager.subscribewith the VAPID key); subscribe/unsubscribe endpoints.web-pushsend path, VAPID keypair provisioning, the subscription store + sweeper, the frequency policy.The current SW (
web/src/sw.ts) is structured so apushevent listener can be added without reworking the existing routing. Suggest ace:brainstorm→ce:planpass given the persistence + privacy-policy decisions involved.