Socket snapshot carries the nodes waiting for a machine, so a reconnecting browser restores their queued dots

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-14 23:31:54 +02:00
co-authored by Claude Opus 5.5
parent 6e4e96e789
commit f2b7a23b4f
3 changed files with 34 additions and 0 deletions
+4
View File
@@ -907,6 +907,8 @@ def snapshot_payload(
two have to agree, so they build the message here rather than each their
own. ``emits`` is what the bus counted while nobody was listening — a
client that reconnects between two pages would otherwise start from zero.
``queued`` is the nodes waiting for a machine, for the same reason: the bus
announces a wait once, and a client that missed it would draw the node idle.
``only`` bounds it to a set of message names, which is what a wall panel
gets: the values its own dashboards draw, and none of the rest — no node
@@ -925,6 +927,7 @@ def snapshot_payload(
"paused": [],
"logs": [],
"emits": {},
"queued": [],
}
return {
"type": "snapshot",
@@ -934,6 +937,7 @@ def snapshot_payload(
"paused": controller.paused_flows(),
"logs": list(event_bus.recent_logs),
"emits": dict(event_bus.emits),
"queued": controller.placer.snapshot()["waiting"] if controller.placer else [],
}