Files
Sable/src/sw
Evie Gauthier f9b452bde1 fix(notifications): SW push deep-links, visibility suppression, settings decoupling, nav fix
- Rewrite notificationclick to deep-link via /to/:user_id/:room_id/:event_id so
  the correct account is activated on cold PWA launch (ToRoomEvent -> pendingNotificationAtom)
- Suppress OS/SW push notification when the app window is already visible;
  track visibility via postMessage from the app on visibilitychange
- Remove preferPushOnMobile dead code
- Add useSystemNotifications setting (desktop-only, default true on desktop);
  split it out from useInAppNotifications so pill and OS notifications are
  independently controlled
- Settings UI: desktop shows In-App + System Notifications; mobile shows
  In-App + Push Notifications; each hides the irrelevant third toggle
- Fix InviteNotifications / MessageNotifications to gate OS notifications on
  useSystemNotifications + !mobileOrTablet(); pill remains gated on useInAppNotifications
- Fix NotificationJumper: bypass useRoomNavigate (which routes through space
  path) -- navigate directly via getHomeRoomPath / getDirectRoomPath so tapping
  a pill banner on mobile opens the room timeline, not the space-nav panel
- When the app is already open, use postMessage({ type: notificationClick })
  from SW to the running window; new ServiceWorkerClickHandler component handles
  it with the same setActiveSessionId + setPending path as the pill flow;
  /to/ URL kept as cold-launch fallback only
2026-03-05 19:13:31 -05:00
..