You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the hub-vite example the `devframe:docks` shared state rebroadcast
every ~1s with identical content and `hub:messages:add` fired
continuously. Root cause: a self-sustaining feedback loop —
a11y agent scan → messages.add (summary flips loading→idle + one
entry per rule, identical content) → message:updated (no dedupe) →
docks shared-state republish (no change detection, fresh array every
time) → client re-render → unconditional innerHTML rewrite → DOM
mutation → a11y MutationObserver → scan (600ms debounce ≈ 1s period)
hub-next was immune only because React reconciliation no-ops identical
lists, keeping the MutationObserver quiet. Independent fixes, each of
which breaks the cycle on its own:
- hub context: hash-guard the `devframe:docks` republish — dock,
terminal, and message events publish only when the dock list content
actually changed.
- messages host: content dedupe in `update()` — an identical re-add
emits no `message:updated` and bumps no clock; an identical re-add
carrying `autoDelete` still resets the keep-alive timer.
- a11y agent: observer/interaction-driven rescans run in the background
(no loading→idle summary churn), and the messages reporter skips
re-sending entries whose content is unchanged since the last scan.
- hub-vite example: `renderList` skips identical innerHTML rewrites so
repainting an unchanged list is no longer a DOM mutation.
- shared-state client host: applied server updates are no longer
reflected back to the server as `server-state:set`/`patch` events
the server would just discard (one wasted wire message — a whole
HTTP POST over SSE — per server-side state tick, on any transport).
Verified live: with the fixes, an idle hub-vite over SSE settles to
exactly its intentional 2s drawer poll (all parked 200s) — the 202
message-add storm and docks broadcasts are gone.
0 commit comments