Make live state reliable
Coordinate browser tabs
Use BroadcastChannel to share same-origin updates or leadership without opening redundant live connections.
9 minute lesson
One elected tab can own the server connection and relay updates, while every tab can fall back if the leader disappears. This is a small part of a live service-status board that streams incidents without losing its ordinary HTTP foundation, but the boundary it creates affects everything that follows.
Same-origin browsing contexts can exchange messages through BroadcastChannel, but the channel is local to the browser and is not durable storage. The useful target is not encyclopedic coverage. Make one deliberate choice, observe its consequences, and know which requirement would make you revise it.
Watch for one shortcut in particular: trying to assume BroadcastChannel reaches other devices or preserves events after every tab closes. It makes later failures harder to locate. Instead, define a same-origin tab protocol with leader expiry, handover, duplicate tolerance, and an independent snapshot recovery path. Prefer an implementation you can explain from the outside before optimizing it.
Keep the wider goal in view: Make the final state correct through duplicates, gaps, restarts, multiple tabs, and temporary network loss. A short observation with concrete evidence is more useful than a confident sentence with no reproduction path.
Open three tabs, close the leader, and verify another tab reconnects without losing the current incident state. Hand the result to someone else and see whether the behavior is clear without an oral explanation.
Lesson completed