Pinky Z: SSE consumer — push-driven dashboard over the events bridge (v1.30.0) #56
Loading…
Reference in a new issue
No description provided.
Delete branch "oss-oo/pinky-z-sse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Migrates the dashboard from HTTP polling to EventSource consumption of the events bridge (zcode-dispatch v1.0.8, docs/EVENTS.md contract) with honest degradation to the existing polling machinery.
ZDO_EVENTS_URLknob (defaulthttp://127.0.0.1:8788/events; empty/off= pure v1.29 polling world), served once viaGET /api/config— static page, SSE armed only on non-null URL.syncPollTimersmaterializes every timer from intent; healthy push idles the main cycle + dock poll (drawer/modal keep 5 s streaming semantics — mid-turn parts carry no MQTT event); degradation shows the compact⚠ push offline — pollingchip and re-arms exactly the v1.27 governor behavior;bridge.helloalways resyncs from state; bounded revival (15 s watchdog + /healthz probe).bridge.droppedKEEPS the connection (close() provably never auto-reconnects in Chrome — the written recipe would freeze the feed; the gap closes via one immediate full refresh, native Last-Event-ID replay stays available); a one-shot 45 s post-revival fresh-guard heals the restarted-bridge skip window (stale high Last-Event-ID silences the new process’s live seqs — bridge-side edge reported for Brain-A’s lane).Validation: suite 110 green (100 prior + 9 config-endpoint + node-harness module tests); Super-Linter station recipe all lanes green (pylint 10.00/10). Fixture rig (mini MQTT broker + the real bridge from zcode-dispatch main, loopback free ports): turn-completed reflection 0.26 s with zero /api/sessions|usage polls across a 40 s quiet window (pings flowing, timer handles null); bridge kill → chip in 0.0 s, polls at cadence, mutation via poll 2.1 s, revival 2.8 s; off-world zero SSE attempts byte-for-byte; dropped burst (328 events) resync + continued live delivery; organic reconnect replayed the full 8-event ring via truncated hello in 3.0 s; restart deaf-window healed in 52 s; CPU A/B degraded vs off 0.97×/0.84×.