01 · Fires while minimised
A requestAnimationFrame countdown stops dead when
the window goes down. Every phase here is an absolute deadline, armed three ways: one long
setTimeout, a 1s reconciliation interval, and
visibility listeners.
02 · Every cycle alerts
Notifications coalesce by tag, so a fixed tag
makes the second alert silently replace the first: one banner, then apparent silence. Each
alert now carries its own tag and sets
renotify.
03 · No chime
The alert is the OS banner, the card at the top of this page, and the tab title. The one audio node is a 30 Hz tone at a gain of 0.0015, inaudible, held open only while a phase runs so the browser counts the tab as playing audio and leaves its timers alone.
Limits worth knowing
- · The tab stays open. Firing from a closed tab needs a push server, which this site does not have. Minimised is fine.
- · The OS gets the last word. Windows Focus Assist and macOS Focus swallow granted notifications silently. The delivery panel has a ten second test for that.
- · The carrier needs one click. Autoplay policy refuses an audio context opened inside a timer callback, so starting a block opens it. Until then the tab is throttleable.
- · 20-20-20. Every 20 minutes, look at something 20 feet away for 20 seconds. That is the eye-care preset; the 90 minute one follows the ultradian cycle instead.