Skip to content

Operator dashboard PWA: opt-in push notifications / background sync (deferred from #107) #108

Description

@marcusrbrown

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:brainstormce:plan pass given the persistence + privacy-policy decisions involved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions