Skip to content

feature: vibrate and hold urgent match-found and admin-call pushes - #623

Merged
lukepolo merged 2 commits into
mainfrom
feature/urgent-push
Sep 29, 2026
Merged

lukepolo merged 2 commits into
mainfrom
feature/urgent-push

Conversation

@lukepolo

@lukepolo lukepolo commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Makes "Match found" and "Admin is calling you" pushes ring (vibrate and stay on screen) and takes the ring down when it expires or is answered on this device.

  • sw-push.js: an urgent push gets requireInteraction and vibration; expiresAt closes it on a plain timer outside waitUntil (a ring closed inside it counts as a silent push), clamped to 5–60s and matched on expiresAt so a superseded timer can't close its replacement
  • New closeNotifications(tag) and notificationThreadKey(); the ready check closes MatchFound:<id> on every update after accepting, so a push that lands late is still closed
  • useCameraTalkback: closes AdminCall:<matchId> once the talkback plays, reports the call as presence focus (clearing stale focus on mount), and only hangs up if this tab connected
  • Labels for the match_found and admin_call push toggles; the quiet-hours text says they ring anyway (all locales)

Merge/deploy: pairs with api#443; safe to ship first (the new fields are ignored until the api sends them).

Tests: the silent-push close timing, the 5s floor for a clock running ahead, a superseded timer closing its replacement, a ring landing after accepting, hanging up from a tab that never connected, and stale focus on the camera page all fail without the fix. Based on DEAFCS af80eb4, 0d3fbe8

@lukepolo
lukepolo merged commit 40de276 into main Sep 29, 2026
2 checks passed
@lukepolo
lukepolo deleted the feature/urgent-push branch September 29, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant