Skip to content

feat(web): closed-tab browser push notifications (SW + PWA + server Web Push) #19

Description

@radroid

Summary

PR #14 shipped in-tab browser notifications (needs-input / turn-complete) via a client-side NotificationCoordinator. The accepted v1 gap: no push when the T3 tab is fully closed. This issue closes that gap.

Scope

  • PWA manifest + installability (required for iOS Safari Web Push; "Add to Home Screen").
  • Service worker: handle pushshowNotification, and notificationclick → focus/open the relevant thread.
  • Client: request permission (reuse existing prompt), create a PushManager subscription with the VAPID public key, register it with the server; gate on the existing notifyOnNeedsInput setting.
  • Server (apps/server): persist push subscriptions per Clerk user (SQLite); generate/configure VAPID keys; send Web Push on the same lifecycle transitions the in-tab coordinator uses (into waiting_for_input / waiting_for_approval, and running → completed).

Notes

  • Works over the Tailscale HTTPS origin (secure-context requirement satisfied).
  • iOS: requires installed PWA (iOS 16.4+).
  • Web-only; does not touch the mobile app.

Part of the overnight web-app notifications + queue work.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions