Skip to content

Alert sound: every open tab chimes for the same alert #449

Closed

Description

@devswha

What happens

With the alert sound on and the app open in two tabs, an alert both tabs hear chimes in both. Each tab plays its own audio, and nothing tells one tab what the other is chiming.

#439 made chimes take turns inside a tab. Its other half, the turn between tabs, was left out before the merge, for the two reasons below.

Why a lock alone was not enough

The tabs took turns on a Web Lock asked for with ifAvailable, and a tab that did not get it dropped its alert as already told by the holder.

  • The holder does not chime the same alerts as the tab it refuses. A pane in front of a tab gets no chime in that tab, and a tab whose audio context is not running plays nothing. So a pane that starts waiting while the holder chimes a finish, and is the pane in front of the holder, was told by no tab.
  • The lock was given back from a timer in the holder. A background tab runs its timers late, so the other tabs kept dropping alerts after the chime had ended.

A doubled chime is a nuisance; a question no tab told is worse, so the tabs each chime for now.

What a fix needs

  • The alert travels with the turn: which pane and which status a chime was for. A tab that is refused can then tell whether the holder chimed that alert, and chime it itself when not. A BroadcastChannel beside the lock would do, or the holder announcing what it played.
  • A turn that ends without the holder's timers, for example a lease with an expiry the other tabs can read.
  • A question is never dropped on a guess. A finish may be.
  • An answer for a plain-http LAN address, where there are no Web Locks.

Activity

  1. added a commit that references this issue on Oct 9, 2026
    529bf65
  2. added a commit that references this issue on Oct 9, 2026
    54921e3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions