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:
@@ -43,6 +43,8 @@ type FlowEvent =
|
||||
logs?: LogLine[]
|
||||
/** Emission counts per qualified node. Absent on older instances. */
|
||||
emits?: Record<string, number>
|
||||
/** Nodes waiting for a machine. Absent on older instances. */
|
||||
queued?: { node: string; reason: string; seconds: number }[]
|
||||
}
|
||||
| {
|
||||
type: "message_value"
|
||||
@@ -275,6 +277,14 @@ function open(url: string) {
|
||||
// Missing against an instance older than this bundle; the graph
|
||||
// then starts from zero the way it always did.
|
||||
liveStore.setEmits(message.emits ?? {})
|
||||
// `node_queued` is announced once per wait, so a socket that opens
|
||||
// mid-wait learns of it here or draws the node idle.
|
||||
for (const entry of message.queued ?? []) {
|
||||
liveStore.setStatus(entry.node, {
|
||||
status: "queued",
|
||||
detail: entry.reason,
|
||||
})
|
||||
}
|
||||
break
|
||||
case "message_value":
|
||||
liveStore.setValue(message.name, {
|
||||
|
||||
Reference in New Issue
Block a user