Skip to content

Flash tab title when the doorbell rings - #140

Open
TrystonPerry wants to merge 1 commit into
mainfrom
feat/doorbell-title-alert
Open

TrystonPerry wants to merge 1 commit into
mainfrom
feat/doorbell-title-alert

Conversation

@TrystonPerry

Copy link
Copy Markdown
Contributor

Summary

  • When /doorbell receives a ring, cycle document.title every second between the default title and Someone rang the doorbell.
  • Show an ack dialog (existing Modal + Button) so an organizer looking at the page can dismiss it.
  • Stop the title cycle when the tab is back in view, or when the dialog is dismissed (Got it, X, Escape, backdrop). Coming back to the tab only stops the flash; the dialog stays until they click it.

This is the operator cue for a background doorbell tab. Guest QR flow is unchanged.

Test plan

  • Open /doorbell and click Ring Doorbell. Confirm the dialog appears and the tab title flips every second.
  • Click Got it (or X / Escape / backdrop). Confirm the title restores and the dialog closes.
  • Ring again, switch to another tab, confirm the title still cycles, then switch back. Confirm the title stops cycling and the dialog is still open until dismissed.
  • Open two tabs on /doorbell, ring in one, confirm the other tab also alerts (Supabase Realtime).

Keep cycling between the default title and "Someone rang the doorbell"
until the tab is back in view or the on-page dialog is dismissed, so
organizers notice a ring even if the doorbell tab is in the background.
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