refactor(fe): trim impl-history and duplicated-docs prose from comments
Remove or shorten comment blocks that: - explain where code used to live (impl history) - duplicate rationale already in docs/web-ui.md - contain speculative/future-work notes Changes: - tabs.js: drop "SYST3M tab used to render this" history; keep badge purpose - schedules.js: drop "used to be a card layout" history + speculative nit note - stream-worker.js: replace 10-line problem-statement with docs pointer (rationale already in docs/web-ui.md SSE multiplexing section); trim future-work parenthetical from subscription-tracking comment - system-sections.css: drop extraction-history prose; keep what it does - core.css: drop move-history prose; keep what it imports and why Part of issue cleanup per operator feedback.
This commit is contained in:
parent
c7c4a40e49
commit
878aade8fa
5 changed files with 9 additions and 59 deletions
|
|
@ -1,16 +1,6 @@
|
|||
// SharedWorker that holds ONE EventSource per stream URL and fans
|
||||
// every server-sent event out to every connected tab via MessagePort.
|
||||
//
|
||||
// Problem this solves: every dashboard / agent tab opens its own
|
||||
// `EventSource('/api/dashboard/stream')`. Browsers cap concurrent
|
||||
// connections per host (~6), and Firefox throttles / disconnects
|
||||
// background tabs when many are open. The result: tabs silently
|
||||
// drop the SSE, fall behind, and only catch up on focus.
|
||||
//
|
||||
// Centralising the connection in a SharedWorker means N tabs share
|
||||
// ONE backend EventSource regardless of focus state — way under the
|
||||
// per-host cap, immune to per-tab throttling, and the worker survives
|
||||
// any individual tab being suspended.
|
||||
// Design rationale: docs/web-ui.md (SSE multiplexing paragraph).
|
||||
//
|
||||
// Wire protocol (port.postMessage payloads):
|
||||
//
|
||||
|
|
@ -42,8 +32,7 @@
|
|||
// signal to the client).
|
||||
//
|
||||
// Subscriptions are tracked per (port, url): a single port can
|
||||
// subscribe to multiple URLs (today only one is in use but the shape
|
||||
// stays open for the per-agent /events/stream multiplexing follow-up).
|
||||
// subscribe to multiple URLs (only one is in use today).
|
||||
// Unsubscribing the last port for a URL closes the EventSource so we
|
||||
// don't keep idle streams open.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue