Skip to content

fix: scope execution state by workflow and recover dropped terminal frames - #20050

Merged
alexisrolland merged 17 commits into
cbyrne/ws-execution-concurrency-harnessfrom
cbyrne/ws-workflow-gating
Oct 6, 2026
Merged

alexisrolland merged 17 commits into
cbyrne/ws-execution-concurrency-harnessfrom
cbyrne/ws-workflow-gating

Conversation

@christian-byrne

@christian-byrne christian-byrne commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Scopes execution WebSocket state to the workflow that owns it, and recovers node progress when a terminal frame is dropped. Together these close the stuck-progress and cross-tab-leakage bug class tracked by #3377 and its sub-issues.

Stacked on #20045 (the harness + workflow_metadata on POST /prompt). Review that first — this PR's base is cbyrne/ws-execution-concurrency-harness, so the diff here is only the gating and recovery work. Supersedes #11951 and the second half of #11866, both of which predate the apiSchema.ts removal. Backend half: Comfy-Org/ComfyUI#16763.

Changes

  • What:
    • every execution handler resolves the owning workflow before writing shared state — workflow_id on the frame, else the mapping registered when the job was queued, else the session path — and skips the write when the frame belongs to another workflow. Per-job progress is still recorded for every frame.
    • node progress is scoped where it is projected, not only where it is written. nodeLocationProgressStates filters by owning workflow. This is the load-bearing part: gating the writes is not sufficient, see Review Focus.
    • handleExecuting is gated too. The public executing event carries only a node id (extensions depend on that shape), so api records the raw message beside the dispatch and clears it immediately after; without this, the final executing: null of a job started in another tab tore down the visible tab's run.
    • reconcileTerminalJobs evicts a job the backend reports in history while the frontend still holds progress for it — the only path that unsticks a node when execution_success is dropped. Queue polling no longer stops when more than one job is active, which is exactly when that happens.
    • reconcileMirrorForActiveWorkflow re-points the shared mirror at the active workflow's own job on switch, so returning to a tab shows current progress rather than the value it had when you left.
    • workflow_id?: string on the execution message types; applyProgressState split so the complexity gate stays green.
  • Breaking: none. When ownership cannot be resolved (no id and no mapping — e.g. a job queued in another browser session) behaviour is unchanged, deliberately.

Review Focus

  • Gating the writes is not enough, and this is the subtlest thing in the PR. nodeProgressCanvasSync.replaceGraph runs when the open graph changes and stamps every node of the new graph from the shared progress map as it stands at that instant. Node progress is keyed by locator, and two workflows derived from the default graph both own node 3, so the entry written while A was in front renders on B's node. Clearing the map on a tab-switch watcher is a race against that sync, not a fix: it won on every local run and lost on the QA machine, producing "first switch clean, later switches leak". Filtering at the projection makes every reader correct whenever it runs.
  • The gate is permissive by design when ownership is unresolvable. That keeps single-tab and cross-session behaviour identical. Every workflow does carry an id (ensureWorkflowId mints one at creation, including for unsaved tabs), so in practice the unresolvable case is a job from another client.
  • Per-workflow state is never gated — only shared UI state is. Gating execution_success wholesale stopped a background tab's badge reaching Completed, which workflowTabStatus.spec.ts caught; setWorkflowStatus is keyed by the job's own workflow and now runs before the gate.
  • Eviction clears the shared mirror only when it still belongs to the evicted job (mirrorOwnerJobId), so evicting a finished job cannot blank a live run.
  • activeWorkflowGraphId tolerates a workflow with no loaded state. LoadedComfyWorkflow types both states as present but the running store does not always honour it; since this is read from a watcher and a computed, a throw there escaped into a watcher callback and broke 20 tests in three untouched suites (browser tab title, workflow status dismissal, linear output store).

Tests

  • executionStore.workflowGating.test.ts — 59 cases: per-frame-type gating, the three resolution paths, the legacy (no workflow_id) profile, a server that starts sending the field mid-session, repeated tab switches during one run, a workflow queued behind the running one, preview revocation, progress_text, and metadata hygiene (an empty-string id must not match; the frame's id beats a stale mapping). One case deliberately leaves a foreign entry in the shared mirror and asserts it is not projected, which is the ordering-independence proof.
  • executionStore.terminalRecovery.test.ts — 8 cases: dropped terminal frame recovered, running jobs left alone, a live run not blanked by evicting an older job, another tab's stuck job cleared, idempotence, recovery on a legacy backend.
  • workflowScopedExecution.spec.ts — 10 scenarios through BackendSimulator: foreign-workflow frames, seeded interleave, out-of-order executed, duplicate terminal frame, reconnect replay, binary preview, and a no-workflow_id backend behaving as before.
  • twoTabExecutionLeak.spec.ts — 7 scenarios with two real persisted workflows that share node id 3, running the reported sequences: queue in one tab and switch away, repeated switching during one run, and the second workflow queued behind the first. These read node.progress and the running stroke style straight off the canvas node, which is what the renderer consumes.
  • 1352 store unit tests and 26000+ across the full suite; pnpm typecheck, typecheck:browser, oxlint --type-aware clean.

Verification Evidence

Every regression test was seen red before it was seen green. Removing the projection filter and rebuilding makes the two-tab canvas case fail with the QA-reported symptom:

Error: expect(received).toEqual(expected)
  {
-   "outlined": false,
-   "progress": null,
+   "outlined": true,
+   "progress": 0.25,
  }
  at browser_tests/tests/twoTabExecutionLeak.spec.ts

Run against a real ComfyUI (--cpu --multi-user serving this branch's built dist), all 16 browser scenarios pass. The full-suite regression sweep was controlled against the branch point: base 5 failures, this branch 1, and the failing set differs between runs, so those are flaky suites rather than regressions.

Protocol check over a real websocket during a real run, which is what confirms the contract rather than our assumptions about it:

progress_state       with=  16 without=   0
progress             with=  12 without=   0
executing            with=   2 without=   0
executed             with=   1 without=   0
execution_success    with=   1 without=   0
status               with=   0 without=   3   <-- unstamped, by design

Manual QA on a GPU box, three rounds, real SD1.5 checkpoint on an RTX 4070. Rounds 1 and 2 failed and found real bugs that none of the automated tests above caught at the time:

  • Round 1 found the cross-tab leak. Two causes in the tests themselves: the two-tab specs asserted only the topbar badges, which were always correct, while the bug was on the canvas; and openPersistedWorkflow called workflowStore.openWorkflow, which registers a tab without loading the graph, so those specs had been running against the wrong canvas with the node under test absent.
  • Round 2 found that the first fix held only for the first tab switch, which is what identified it as the ordering race described above.
  • Round 3 passed all four checks: repeated switching (A→B→A→B→A→B→A, every arrival in B clean, A showing 17.58% → 25.08% → 32.08%), the queued-behind case, the simple single switch, and a legacy core backend.

A second QA round, and what it changed

QA found two more leaks after the first fix, both with three unsaved copy-pasted tabs. The cause
was a domain mistake rather than a timing one: a workflow id names a workflow, not an open tab, and
ensureWorkflowId keeps whatever id the json already carries, so copying a workflow into a new tab
duplicates it. Loading one workflow can also leave two open entries holding its id, so duplication is
the normal case. Keying on the id first therefore matched foreign tabs.

  • Ownership now resolves on the per-tab instanceId, then the session path, then the graph id. The
    order is pinned by tests, since getting it wrong is what caused the leak. workflowLookup is keyed
    by path, so a path identifies exactly one open workflow and that leg is safe by construction.
  • ComfyApp's own executed listener wrote node outputs against the visible graph with no gate,
    so a finished job painted its image onto the same-numbered node of whatever tab was in front. It
    now consults the same predicate.
  • A finished background job never released its own records; it does now, while text previews stay
    gated because they are keyed by node.

A cross-model adversarial pass over the result raised 22 findings. Most were refuted against the
code and the refutations are worth having: two tabs can never share a path, instanceId survives a
rename (rewriteSessionWorkflowPaths is keyed by it), saving an unsaved workflow goes through
renameWorkflow so the run is preserved, node errors are keyed per workflow rather than per node id,
and core routes prompt frames to the queueing client so nothing leaks between browser windows.

Known gaps, stated deliberately

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 85766b0e-8fb8-4ce2-8988-d9757082efdb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 10/06/2026, 02:28:56 AM UTC

Links

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 32f8f9155a4e84916c7fd6acbbb33ee1b1173db1

Full docs: ADR-DEVEX-LINT-0015

🎭 Playwright: ✅ 2207 passed, 0 failed · 1 flaky

📊 Browser Reports
  • chromium: View Report (✅ 2185 / ❌ 0 / ⚠️ 1 / ⏭️ 0)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 19 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • New-test walkthrough (chromium, recorded video): View Report

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.7 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.5 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 75.4 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 68.2 MB heap
dom-widget-order-dense-n200-w200-i120: · 29.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 515ms TBT · 80.7 MB heap
dom-widget-order-sparse-n1000-w20-i120: · 42.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 186ms TBT · 106.9 MB heap
extension-clean-combined-draw: · 31.1 avg FPS · 20.0 P5 FPS ❌ (target: ≥52) · 356ms TBT · 68.1 MB heap
extension-rgthree-prototype-draw: · 31.9 avg FPS · 20.0 P5 FPS ❌ (target: ≥52) · 153ms TBT · 73.0 MB heap
large-graph-idle: · 59.8 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.0 MB heap
large-graph-pan: · 59.6 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.8 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.2 MB heap
legacy-node-drag: · 59.7 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.7 MB heap
minimap-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.8 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 57.9 MB heap
subgraph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.1 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 60.6 MB heap
subgraph-transition-enter: · 52.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 124ms TBT · 103.6 MB heap
viewport-pan-sweep: · 59.9 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 76.2 MB heap
vue-large-graph-idle: · 35.6 avg FPS · 20.0 P5 FPS ❌ (target: ≥52) · 0ms TBT · 170.1 MB heap
vue-large-graph-pan: · 28.4 avg FPS · 15.0 P5 FPS ❌ (target: ≥52) · 7ms TBT · 165.1 MB heap
vue-node-resize-workload: · 29.1 avg FPS · 15.0 P5 FPS ❌ (target: ≥52) · 0ms TBT · 204.9 MB heap
vue-zoom-out-idle: · 36.7 avg FPS · 20.0 P5 FPS ❌ (target: ≥52) · 0ms TBT · 178.5 MB heap
workflow-execution: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 56.6 MB heap
agent-composer-empty-conversation-typing: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 82.6 MB heap
agent-composer-long-conversation-typing: · 53.3 avg FPS · 30.0 P5 FPS ❌ (target: ≥52) · 0ms TBT · 108.7 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 4ms
canvas-idle: layout count 0
canvas-idle: style recalc count 8
canvas-idle: task duration 424ms
canvas-idle: script duration 10ms
canvas-idle: TBT 0ms
canvas-idle: heap used 72.7 MB
canvas-idle: DOM nodes -231
canvas-idle: event listeners -80
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 5ms
canvas-mouse-sweep: style recalc duration 18ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 76
canvas-mouse-sweep: task duration 817ms
canvas-mouse-sweep: script duration 153ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 61.5 MB
canvas-mouse-sweep: DOM nodes 0
canvas-mouse-sweep: event listeners 0
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 11ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 32
canvas-zoom-sweep: task duration 361ms
canvas-zoom-sweep: script duration 13ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 75.4 MB
canvas-zoom-sweep: DOM nodes -178
canvas-zoom-sweep: event listeners -67
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 3ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 12
dom-widget-clipping: task duration 448ms
dom-widget-clipping: script duration 159ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 68.2 MB
dom-widget-clipping: DOM nodes -115
dom-widget-clipping: event listeners 0
dom-widget-order-dense-n200-w200-i120: avg frame time 34ms
dom-widget-order-dense-n200-w200-i120: p95 frame time 17ms
dom-widget-order-dense-n200-w200-i120: layout duration 0ms
dom-widget-order-dense-n200-w200-i120: style recalc duration 0ms
dom-widget-order-dense-n200-w200-i120: layout count 0
dom-widget-order-dense-n200-w200-i120: style recalc count 0
dom-widget-order-dense-n200-w200-i120: task duration 802ms
dom-widget-order-dense-n200-w200-i120: script duration 59ms
dom-widget-order-dense-n200-w200-i120: TBT 515ms
dom-widget-order-dense-n200-w200-i120: heap used 80.7 MB
dom-widget-order-dense-n200-w200-i120: DOM nodes 0
dom-widget-order-dense-n200-w200-i120: event listeners 0
dom-widget-order-sparse-n1000-w20-i120: avg frame time 24ms
dom-widget-order-sparse-n1000-w20-i120: p95 frame time 17ms
dom-widget-order-sparse-n1000-w20-i120: layout duration 0ms
dom-widget-order-sparse-n1000-w20-i120: style recalc duration 0ms
dom-widget-order-sparse-n1000-w20-i120: layout count 0
dom-widget-order-sparse-n1000-w20-i120: style recalc count 0
dom-widget-order-sparse-n1000-w20-i120: task duration 437ms
dom-widget-order-sparse-n1000-w20-i120: script duration 138ms
dom-widget-order-sparse-n1000-w20-i120: TBT 186ms
dom-widget-order-sparse-n1000-w20-i120: heap used 106.9 MB
dom-widget-order-sparse-n1000-w20-i120: DOM nodes 0
dom-widget-order-sparse-n1000-w20-i120: event listeners 0
extension-clean-combined-draw: avg frame time 32ms
extension-clean-combined-draw: p95 frame time 50ms
extension-clean-combined-draw: layout duration 0ms
extension-clean-combined-draw: style recalc duration 0ms
extension-clean-combined-draw: layout count 0
extension-clean-combined-draw: style recalc count 0
extension-clean-combined-draw: task duration 8061ms
extension-clean-combined-draw: script duration 6445ms
extension-clean-combined-draw: TBT 356ms
extension-clean-combined-draw: heap used 68.1 MB
extension-clean-combined-draw: DOM nodes -71
extension-clean-combined-draw: event listeners -37
extension-rgthree-prototype-draw: avg frame time 31ms
extension-rgthree-prototype-draw: p95 frame time 50ms
extension-rgthree-prototype-draw: layout duration 0ms
extension-rgthree-prototype-draw: style recalc duration 0ms
extension-rgthree-prototype-draw: layout count 0
extension-rgthree-prototype-draw: style recalc count 0
extension-rgthree-prototype-draw: task duration 7513ms
extension-rgthree-prototype-draw: script duration 5927ms
extension-rgthree-prototype-draw: TBT 153ms
extension-rgthree-prototype-draw: heap used 73.0 MB
extension-rgthree-prototype-draw: DOM nodes 0
extension-rgthree-prototype-draw: event listeners 0
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 3ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 8
large-graph-idle: task duration 520ms
large-graph-idle: script duration 30ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 69.0 MB
large-graph-idle: DOM nodes -328
large-graph-idle: event listeners -164
large-graph-pan: avg frame time 17ms
large-graph-pan: p95 frame time 17ms
large-graph-pan: layout duration 0ms
large-graph-pan: style recalc duration 11ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 68
large-graph-pan: task duration 1555ms
large-graph-pan: script duration 792ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 64.8 MB
large-graph-pan: DOM nodes -164
large-graph-pan: event listeners 0
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 14ms
large-graph-zoom: style recalc duration 13ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 71
large-graph-zoom: task duration 1649ms
large-graph-zoom: script duration 757ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 64.2 MB
large-graph-zoom: DOM nodes 24
large-graph-zoom: event listeners 0
legacy-node-drag: avg frame time 17ms
legacy-node-drag: p95 frame time 17ms
legacy-node-drag: layout duration 0ms
legacy-node-drag: style recalc duration 6ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 45
legacy-node-drag: task duration 1863ms
legacy-node-drag: script duration 948ms
legacy-node-drag: TBT 0ms
legacy-node-drag: heap used 70.7 MB
legacy-node-drag: DOM nodes 0
legacy-node-drag: event listeners 180
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 3ms
minimap-idle: layout count 0
minimap-idle: style recalc count 7
minimap-idle: task duration 529ms
minimap-idle: script duration 34ms
minimap-idle: TBT 0ms
minimap-idle: heap used 69.8 MB
minimap-idle: DOM nodes -328
minimap-idle: event listeners -164
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 6ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 396ms
subgraph-dom-widget-clipping: script duration 135ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 57.9 MB
subgraph-dom-widget-clipping: DOM nodes 0
subgraph-dom-widget-clipping: event listeners 6
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 4ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 428ms
subgraph-idle: script duration 9ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 70.1 MB
subgraph-idle: DOM nodes 0
subgraph-idle: event listeners 0
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 6ms
subgraph-mouse-sweep: style recalc duration 19ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 76
subgraph-mouse-sweep: task duration 785ms
subgraph-mouse-sweep: script duration 106ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 60.6 MB
subgraph-mouse-sweep: DOM nodes 0
subgraph-mouse-sweep: event listeners 0
subgraph-transition-enter: avg frame time 19ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 11ms
subgraph-transition-enter: style recalc duration 25ms
subgraph-transition-enter: layout count 5
subgraph-transition-enter: style recalc count 18
subgraph-transition-enter: task duration 894ms
subgraph-transition-enter: script duration 28ms
subgraph-transition-enter: TBT 124ms
subgraph-transition-enter: heap used 103.6 MB
subgraph-transition-enter: DOM nodes 13747
subgraph-transition-enter: event listeners 2383
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 35ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 251
viewport-pan-sweep: task duration 5607ms
viewport-pan-sweep: script duration 2683ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 76.2 MB
viewport-pan-sweep: DOM nodes -174
viewport-pan-sweep: event listeners -82
vue-large-graph-idle: avg frame time 28ms
vue-large-graph-idle: p95 frame time 50ms
vue-large-graph-idle: layout duration 0ms
vue-large-graph-idle: style recalc duration 0ms
vue-large-graph-idle: layout count 0
vue-large-graph-idle: style recalc count 0
vue-large-graph-idle: task duration 14992ms
vue-large-graph-idle: script duration 238ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 170.1 MB
vue-large-graph-idle: DOM nodes -3045
vue-large-graph-idle: event listeners -14917
vue-large-graph-pan: avg frame time 35ms
vue-large-graph-pan: p95 frame time 67ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 17ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 135
vue-large-graph-pan: task duration 18379ms
vue-large-graph-pan: script duration 829ms
vue-large-graph-pan: TBT 7ms
vue-large-graph-pan: heap used 165.1 MB
vue-large-graph-pan: DOM nodes -3045
vue-large-graph-pan: event listeners -14917
vue-node-resize-workload: avg frame time 34ms
vue-node-resize-workload: p95 frame time 67ms
vue-node-resize-workload: layout duration 25ms
vue-node-resize-workload: style recalc duration 77ms
vue-node-resize-workload: layout count 20
vue-node-resize-workload: style recalc count 20
vue-node-resize-workload: task duration 5569ms
vue-node-resize-workload: script duration 98ms
vue-node-resize-workload: TBT 0ms
vue-node-resize-workload: heap used 204.9 MB
vue-node-resize-workload: DOM nodes 0
vue-node-resize-workload: event listeners 0
vue-zoom-out-idle: avg frame time 27ms
vue-zoom-out-idle: p95 frame time 50ms
vue-zoom-out-idle: layout duration 0ms
vue-zoom-out-idle: style recalc duration 0ms
vue-zoom-out-idle: layout count 0
vue-zoom-out-idle: style recalc count 0
vue-zoom-out-idle: task duration 7618ms
vue-zoom-out-idle: script duration 118ms
vue-zoom-out-idle: TBT 0ms
vue-zoom-out-idle: heap used 178.5 MB
vue-zoom-out-idle: DOM nodes -3045
vue-zoom-out-idle: event listeners -14915
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 2ms
workflow-execution: style recalc duration 15ms
workflow-execution: layout count 4
workflow-execution: style recalc count 17
workflow-execution: task duration 136ms
workflow-execution: script duration 13ms
workflow-execution: TBT 0ms
workflow-execution: heap used 56.6 MB
workflow-execution: DOM nodes -4
workflow-execution: event listeners -5
agent-composer-empty-conversation-typing: avg frame time 17ms
agent-composer-empty-conversation-typing: p95 frame time 17ms
agent-composer-empty-conversation-typing: layout duration 28ms
agent-composer-empty-conversation-typing: style recalc duration 104ms
agent-composer-empty-conversation-typing: layout count 76
agent-composer-empty-conversation-typing: style recalc count 78
agent-composer-empty-conversation-typing: task duration 911ms
agent-composer-empty-conversation-typing: script duration 358ms
agent-composer-empty-conversation-typing: TBT 0ms
agent-composer-empty-conversation-typing: heap used 82.6 MB
agent-composer-empty-conversation-typing: DOM nodes 76
agent-composer-empty-conversation-typing: event listeners 876
agent-composer-long-conversation-typing: avg frame time 19ms
agent-composer-long-conversation-typing: p95 frame time 33ms
agent-composer-long-conversation-typing: layout duration 32ms
agent-composer-long-conversation-typing: style recalc duration 289ms
agent-composer-long-conversation-typing: layout count 76
agent-composer-long-conversation-typing: style recalc count 78
agent-composer-long-conversation-typing: task duration 1448ms
agent-composer-long-conversation-typing: script duration 480ms
agent-composer-long-conversation-typing: TBT 0ms
agent-composer-long-conversation-typing: heap used 108.7 MB
agent-composer-long-conversation-typing: DOM nodes 76
agent-composer-long-conversation-typing: event listeners 876
Raw data
{
  "timestamp": "2026-10-06T02:40:04.997Z",
  "gitSha": "dbfa59f1ff8f93afd2be542baab18747fc1686ed",
  "branch": "cbyrne/ws-workflow-gating",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2017.089999999996,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 5.079000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 428.68899999999996,
      "heapDeltaBytes": 22429128,
      "heapUsedBytes": 76469392,
      "domNodes": -230,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 9.416999999999998,
      "eventListeners": -160,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666115702479335,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-idle",
      "durationMs": 2013.0289999999604,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 2.175,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 418.866,
      "heapDeltaBytes": 22370996,
      "heapUsedBytes": 75978184,
      "domNodes": -231,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 10.147999999999998,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666115702479342,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1814.5169999999666,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 16.782999999999998,
      "layouts": 12,
      "layoutDurationMs": 4.757000000000001,
      "taskDurationMs": 802.9350000000001,
      "heapDeltaBytes": -3088484,
      "heapUsedBytes": 64144780,
      "domNodes": 0,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 151.21300000000002,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666055045871563,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1804.7320000000582,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 18.743,
      "layouts": 12,
      "layoutDurationMs": 4.836999999999999,
      "taskDurationMs": 830.826,
      "heapDeltaBytes": -2650948,
      "heapUsedBytes": 64803044,
      "domNodes": 0,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 155.674,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.665740740740738,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1718.4520000000134,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 11.48,
      "layouts": 6,
      "layoutDurationMs": 1.467,
      "taskDurationMs": 374.815,
      "heapDeltaBytes": -23888996,
      "heapUsedBytes": 78666016,
      "domNodes": -179,
      "jsHeapTotalBytes": -3145728,
      "scriptDurationMs": 12.836,
      "eventListeners": -149,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66601941747573,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1719.5410000000493,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 10.75,
      "layouts": 6,
      "layoutDurationMs": 1.367,
      "taskDurationMs": 346.19200000000006,
      "heapDeltaBytes": 25685168,
      "heapUsedBytes": 79562824,
      "domNodes": -177,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 12.901000000000003,
      "eventListeners": 15,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66601941747573,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 678.8370000000441,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 2.5059999999999993,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 438.121,
      "heapDeltaBytes": 14216472,
      "heapUsedBytes": 68138596,
      "domNodes": -230,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 155.669,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66585365853659,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 710.647999999992,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 3.1610000000000005,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 458.62800000000004,
      "heapDeltaBytes": 14985880,
      "heapUsedBytes": 74902216,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 163,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "dom-widget-order-dense-n200-w200-i120",
      "durationMs": 1121.926999999971,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 785.5569999999999,
      "heapDeltaBytes": 15457172,
      "heapUsedBytes": 84561236,
      "domNodes": 0,
      "jsHeapTotalBytes": 6455296,
      "scriptDurationMs": 59.533,
      "eventListeners": 0,
      "totalBlockingTimeMs": 504,
      "frameDurationMs": 33.839393939393936,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-order-dense-n200-w200-i120",
      "durationMs": 1141.7880000000196,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 818.2080000000001,
      "heapDeltaBytes": 14853372,
      "heapUsedBytes": 84759352,
      "domNodes": 0,
      "jsHeapTotalBytes": 5406720,
      "scriptDurationMs": 58.81700000000001,
      "eventListeners": 0,
      "totalBlockingTimeMs": 525,
      "frameDurationMs": 34.84545454545454,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-order-sparse-n1000-w20-i120",
      "durationMs": 828.158999999971,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 438.7190000000003,
      "heapDeltaBytes": 17071768,
      "heapUsedBytes": 119483556,
      "domNodes": 0,
      "jsHeapTotalBytes": 2887680,
      "scriptDurationMs": 139.80900000000003,
      "eventListeners": 0,
      "totalBlockingTimeMs": 188,
      "frameDurationMs": 23.80857142857141,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "dom-widget-order-sparse-n1000-w20-i120",
      "durationMs": 826.2159999999312,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 435.962,
      "heapDeltaBytes": 17208168,
      "heapUsedBytes": 104670148,
      "domNodes": 0,
      "jsHeapTotalBytes": 1576960,
      "scriptDurationMs": 136.094,
      "eventListeners": 0,
      "totalBlockingTimeMs": 184,
      "frameDurationMs": 23.808571428571458,
      "p95FrameDurationMs": 16.80000000000109
    },
    {
      "name": "extension-clean-combined-draw",
      "durationMs": 8576.915999999983,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7866.919,
      "heapDeltaBytes": -16211140,
      "heapUsedBytes": 68271208,
      "domNodes": -142,
      "jsHeapTotalBytes": -7737344,
      "scriptDurationMs": 6259.2970000000005,
      "eventListeners": -74,
      "totalBlockingTimeMs": 274,
      "frameDurationMs": 31.324817518248175,
      "p95FrameDurationMs": 50.100000000000364
    },
    {
      "name": "extension-clean-combined-draw",
      "durationMs": 8926.525000000083,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 8255.667000000001,
      "heapDeltaBytes": -5418352,
      "heapUsedBytes": 74572348,
      "domNodes": 0,
      "jsHeapTotalBytes": -262144,
      "scriptDurationMs": 6629.990000000001,
      "eventListeners": 0,
      "totalBlockingTimeMs": 437,
      "frameDurationMs": 32.90184501845018,
      "p95FrameDurationMs": 50.100000000000364
    },
    {
      "name": "extension-rgthree-prototype-draw",
      "durationMs": 8289.815000000033,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7625.79,
      "heapDeltaBytes": 2653820,
      "heapUsedBytes": 82735500,
      "domNodes": 0,
      "jsHeapTotalBytes": -19660800,
      "scriptDurationMs": 6010.555,
      "eventListeners": 0,
      "totalBlockingTimeMs": 198,
      "frameDurationMs": 31.25622641509434,
      "p95FrameDurationMs": 50.099999999998545
    },
    {
      "name": "extension-rgthree-prototype-draw",
      "durationMs": 7966.532999999913,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7400.944,
      "heapDeltaBytes": -4330472,
      "heapUsedBytes": 70263060,
      "domNodes": 0,
      "jsHeapTotalBytes": -11796480,
      "scriptDurationMs": 5842.945000000001,
      "eventListeners": 0,
      "totalBlockingTimeMs": 107,
      "frameDurationMs": 31.421739130434787,
      "p95FrameDurationMs": 50.100000000000364
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2046.7650000000503,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 2.8560000000000008,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 520.1389999999999,
      "heapDeltaBytes": -53753536,
      "heapUsedBytes": 72120272,
      "domNodes": -328,
      "jsHeapTotalBytes": -2719744,
      "scriptDurationMs": 30.249,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.80245901639344,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2036.4850000000843,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 2.877000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 520.3220000000001,
      "heapDeltaBytes": -53735700,
      "heapUsedBytes": 72528308,
      "domNodes": -328,
      "jsHeapTotalBytes": -2981888,
      "scriptDurationMs": 29.928000000000004,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666115702479342,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2385.502000000031,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 9.514000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1521.353,
      "heapDeltaBytes": 2204132,
      "heapUsedBytes": 65776460,
      "domNodes": -328,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 774.567,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.783098591549294,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2576.870999999983,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 12.196,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1587.937,
      "heapDeltaBytes": -18386104,
      "heapUsedBytes": 70050964,
      "domNodes": 0,
      "jsHeapTotalBytes": 1085440,
      "scriptDurationMs": 810,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.774025974025975,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3714.2390000000205,
      "styleRecalcs": 72,
      "styleRecalcDurationMs": 13.835999999999999,
      "layouts": 60,
      "layoutDurationMs": 13.961999999999998,
      "taskDurationMs": 1635.1079999999997,
      "heapDeltaBytes": 1623704,
      "heapUsedBytes": 69509524,
      "domNodes": 24,
      "jsHeapTotalBytes": 1048576,
      "scriptDurationMs": 760.7239999999999,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.665765765765762,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3743.8580000000456,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 12.935,
      "layouts": 60,
      "layoutDurationMs": 13.88,
      "taskDurationMs": 1662.122,
      "heapDeltaBytes": 145404,
      "heapUsedBytes": 65055316,
      "domNodes": 24,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 752.468,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666071428571428,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3129.1330000000244,
      "styleRecalcs": 43,
      "styleRecalcDurationMs": 5.724,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1845.6770000000001,
      "heapDeltaBytes": 5526516,
      "heapUsedBytes": 70655024,
      "domNodes": 0,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 935.015,
      "eventListeners": 180,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.755913978494622,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3138.8780000000907,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 6.816999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1880.5270000000003,
      "heapDeltaBytes": 7862416,
      "heapUsedBytes": 77601496,
      "domNodes": 0,
      "jsHeapTotalBytes": 2060288,
      "scriptDurationMs": 960.3260000000001,
      "eventListeners": 180,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.755080213903746,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2036.9199999999523,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 3.0260000000000007,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 540.688,
      "heapDeltaBytes": -26727136,
      "heapUsedBytes": 73156476,
      "domNodes": -328,
      "jsHeapTotalBytes": -2494464,
      "scriptDurationMs": 33.537000000000006,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.6655737704918,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 2022.9490000000396,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 1.9969999999999988,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 516.4490000000001,
      "heapDeltaBytes": 10618552,
      "heapUsedBytes": 73135340,
      "domNodes": -328,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 33.69800000000001,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666115702479335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 625.961000000018,
      "styleRecalcs": 48,
      "styleRecalcDurationMs": 6.437000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 406.6050000000001,
      "heapDeltaBytes": -11625452,
      "heapUsedBytes": 57358872,
      "domNodes": 0,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 139.17300000000003,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670270270270276,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 603.0580000000327,
      "styleRecalcs": 45,
      "styleRecalcDurationMs": 5.5409999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 385.62699999999995,
      "heapDeltaBytes": 9677884,
      "heapUsedBytes": 64013092,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 130.988,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.663888888888906,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2023.065000000031,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 4.484,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 420.231,
      "heapDeltaBytes": 701124,
      "heapUsedBytes": 70744748,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 8.816,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666115702479342,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2019.4099999999935,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 2.8989999999999987,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 435.44899999999996,
      "heapDeltaBytes": 21986128,
      "heapUsedBytes": 76309132,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 9.889,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666115702479342,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1676.175999999998,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 16.97,
      "layouts": 16,
      "layoutDurationMs": 5.5329999999999995,
      "taskDurationMs": 753.239,
      "heapDeltaBytes": -6304100,
      "heapUsedBytes": 63701816,
      "domNodes": 0,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 104.28000000000002,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666336633663366,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1708.8119999999662,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 20.383,
      "layouts": 16,
      "layoutDurationMs": 6.443999999999999,
      "taskDurationMs": 817.4720000000001,
      "heapDeltaBytes": -6257772,
      "heapUsedBytes": 63321296,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 108.71000000000001,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.6656862745098,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1386.3779999999224,
      "styleRecalcs": 18,
      "styleRecalcDurationMs": 25.324999999999992,
      "layouts": 5,
      "layoutDurationMs": 11.069000000000003,
      "taskDurationMs": 893.991,
      "heapDeltaBytes": 24073912,
      "heapUsedBytes": 108661764,
      "domNodes": 13747,
      "jsHeapTotalBytes": 4456448,
      "scriptDurationMs": 27.650999999999996,
      "eventListeners": 2383,
      "totalBlockingTimeMs": 124,
      "frameDurationMs": 19.17671232876713,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8520.238000000007,
      "styleRecalcs": 250,
      "styleRecalcDurationMs": 34.757999999999996,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5481.698,
      "heapDeltaBytes": -35378156,
      "heapUsedBytes": 90633736,
      "domNodes": -348,
      "jsHeapTotalBytes": -2002944,
      "scriptDurationMs": 2596.4649999999997,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66588235294118,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 9128.472999999985,
      "styleRecalcs": 251,
      "styleRecalcDurationMs": 35.867,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5731.817,
      "heapDeltaBytes": -18756896,
      "heapUsedBytes": 69091828,
      "domNodes": 0,
      "jsHeapTotalBytes": 1085440,
      "scriptDurationMs": 2770.055,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.6963436928702,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 15947.679999999991,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 15176.558999999997,
      "heapDeltaBytes": -37886340,
      "heapUsedBytes": 171267444,
      "domNodes": -3045,
      "jsHeapTotalBytes": 8921088,
      "scriptDurationMs": 240.66700000000003,
      "eventListeners": -14915,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 28.53184257602862,
      "p95FrameDurationMs": 50.099999999998545
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 15294.115000000034,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 14808.381000000001,
      "heapDeltaBytes": -23850220,
      "heapUsedBytes": 185399784,
      "domNodes": -3045,
      "jsHeapTotalBytes": 8978432,
      "scriptDurationMs": 235.361,
      "eventListeners": -14919,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 27.605967450271248,
      "p95FrameDurationMs": 50
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 18801.552000000014,
      "styleRecalcs": 134,
      "styleRecalcDurationMs": 16.722000000000016,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18518.677,
      "heapDeltaBytes": -35384216,
      "heapUsedBytes": 172951164,
      "domNodes": -3045,
      "jsHeapTotalBytes": 8396800,
      "scriptDurationMs": 829.4509999999999,
      "eventListeners": -14919,
      "totalBlockingTimeMs": 4,
      "frameDurationMs": 35.73992395437263,
      "p95FrameDurationMs": 66.70000000000073
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 18522.31900000004,
      "styleRecalcs": 135,
      "styleRecalcDurationMs": 17.609999999999985,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18239.006,
      "heapDeltaBytes": -35482280,
      "heapUsedBytes": 173294012,
      "domNodes": -3045,
      "jsHeapTotalBytes": 7942144,
      "scriptDurationMs": 828.468,
      "eventListeners": -14915,
      "totalBlockingTimeMs": 10,
      "frameDurationMs": 34.80432330827068,
      "p95FrameDurationMs": 66.70000000000073
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 5628.019999999992,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 78.55400000000002,
      "layouts": 20,
      "layoutDurationMs": 24.998000000000005,
      "taskDurationMs": 5558.872000000001,
      "heapDeltaBytes": 15623884,
      "heapUsedBytes": 218065988,
      "domNodes": 0,
      "jsHeapTotalBytes": 786432,
      "scriptDurationMs": 99.959,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 34.66975308641975,
      "p95FrameDurationMs": 66.70000000000073
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 5641.483999999991,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 76.09000000000002,
      "layouts": 20,
      "layoutDurationMs": 24.605,
      "taskDurationMs": 5578.5160000000005,
      "heapDeltaBytes": 2156908,
      "heapUsedBytes": 211547648,
      "domNodes": 0,
      "jsHeapTotalBytes": 786432,
      "scriptDurationMs": 95.71199999999999,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 34.14,
      "p95FrameDurationMs": 66.70000000000073
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 7749.86100000001,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7597.147999999999,
      "heapDeltaBytes": -45887776,
      "heapUsedBytes": 178473552,
      "domNodes": -3045,
      "jsHeapTotalBytes": 6639616,
      "scriptDurationMs": 118.20100000000005,
      "eventListeners": -14915,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 27.097202797202808,
      "p95FrameDurationMs": 50
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 7877.429000000006,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7638.005999999999,
      "heapDeltaBytes": -16493012,
      "heapUsedBytes": 195793472,
      "domNodes": -3045,
      "jsHeapTotalBytes": 12144640,
      "scriptDurationMs": 117.65200000000003,
      "eventListeners": -14915,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 27.37152777777778,
      "p95FrameDurationMs": 50
    },
    {
      "name": "workflow-execution",
      "durationMs": 512.3190000000477,
      "styleRecalcs": 22,
      "styleRecalcDurationMs": 18.082,
      "layouts": 4,
      "layoutDurationMs": 2.05,
      "taskDurationMs": 150.63800000000003,
      "heapDeltaBytes": 5906396,
      "heapUsedBytes": 59123976,
      "domNodes": -108,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 15.363999999999999,
      "eventListeners": -90,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66451612903227,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "workflow-execution",
      "durationMs": 478.3149999999523,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 12.378000000000002,
      "layouts": 3,
      "layoutDurationMs": 1.7730000000000004,
      "taskDurationMs": 120.47800000000001,
      "heapDeltaBytes": 5681552,
      "heapUsedBytes": 59491132,
      "domNodes": 101,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 9.862,
      "eventListeners": 81,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.664285714285693,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "agent-composer-empty-conversation-typing",
      "durationMs": 821.6790000000174,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 98.57100000000001,
      "layouts": 76,
      "layoutDurationMs": 25.297,
      "taskDurationMs": 785.4250000000001,
      "heapDeltaBytes": 17229732,
      "heapUsedBytes": 82487152,
      "domNodes": 76,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 300.861,
      "eventListeners": 876,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666000000000004,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "agent-composer-empty-conversation-typing",
      "durationMs": 1057.9539999999952,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 108.492,
      "layouts": 76,
      "layoutDurationMs": 30.302,
      "taskDurationMs": 1037.397,
      "heapDeltaBytes": 19618100,
      "heapUsedBytes": 90713408,
      "domNodes": 76,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 415.891,
      "eventListeners": 876,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66562499999999,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "agent-composer-long-conversation-typing",
      "durationMs": 1425.3830000000107,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 283.70099999999996,
      "layouts": 76,
      "layoutDurationMs": 31.7,
      "taskDurationMs": 1395.99,
      "heapDeltaBytes": 8122964,
      "heapUsedBytes": 114216672,
      "domNodes": 76,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 484.034,
      "eventListeners": 876,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 18.397402597402603,
      "p95FrameDurationMs": 33.30000000000109
    },
    {
      "name": "agent-composer-long-conversation-typing",
      "durationMs": 1535.6420000000526,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 294.533,
      "layouts": 76,
      "layoutDurationMs": 31.451,
      "taskDurationMs": 1500.81,
      "heapDeltaBytes": 8618544,
      "heapUsedBytes": 113712952,
      "domNodes": 76,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 476.676,
      "eventListeners": 876,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 19.134567901234565,
      "p95FrameDurationMs": 33.399999999999636
    }
  ]
}

🔬 E2E Coverage

Metric Covered Total Pct
Lines 53917 82698 65.2% 🟡
Functions 0 0 — —
Branches 0 0 — —
Top 10 files by uncovered lines
File Coverage Missed
src/LGraphCanvas.ts 66.4% 1180
src/LGraphNode.ts 70.5% 387
src/platform/workspace/stores/billingOperationStore.ts 7.8% 366
src/renderer/extensions/layerEditor/composables/useLayerEditorSession.ts 40.1% 332
src/core/billing/operationLifecycle.ts 1.3% 300
src/LGraph.ts 79.0% 272
src/platform/workspace/stores/teamWorkspaceStore.ts 39.2% 258
src/scripts/app.ts 73.2% 255
src/core/webSessionIdentity.ts 3.3% 231
src/scripts/pnginfo.ts 20.7% 222

🧩 Custom Nodes Ecosystem Matrix: ✅ Passed

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

Stage Result What a failure here means
pin-status success Informational. It never fails the build; it warns when the corpus snapshot is over 30 days old.
corpus success Infrastructure: the pack mirror could not be fetched, validated or cached. Not your diff.
shards success Harness integrity, not pack breakage. A shard only checks that every built spec wrote its row; vitest's own exit code is deliberately ignored because pack code leaks unhandled rejections.
verdicts success The population verdict per renderer. This is the stage that judges packs. Exit 1 is FAIL; exit 2 is withheld — rows were missing, so nothing was measured, which is not the same as your change breaking packs.
detection-proofs success The instrument self-test: the matrix must FAIL on a deliberately poisoned corpus. A failure here means the gate cannot be trusted this run, in either direction.

On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff.

Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Oct 3, 2026
@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.79006% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/stores/executionStore.ts 98.19% 3 Missing ⚠️
src/scripts/api.ts 83.33% 1 Missing ⚠️
@@                             Coverage Diff                             @@
##           cbyrne/ws-execution-concurrency-harness   #20050      +/-   ##
===========================================================================
- Coverage                                    85.75%   85.61%   -0.15%     
===========================================================================
  Files                                         2430     2422       -8     
  Lines                                       138816   138359     -457     
  Branches                                     35698    37536    +1838     
===========================================================================
- Hits                                        119040   118453     -587     
- Misses                                       19401    19532     +131     
+ Partials                                       375      374       -1     
Flag Coverage Δ
e2e 65.14% <93.12%> (+0.07%) ⬆️
unit 82.44% <92.39%> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/remote/comfyui/execution/types.ts 100.00% <ø> (ø)
src/platform/remote/comfyui/useQueuePolling.ts 100.00% <100.00%> (ø)
src/scripts/app.ts 80.79% <100.00%> (+0.03%) ⬆️
src/stores/queueStore.ts 85.97% <100.00%> (+0.25%) ⬆️
src/scripts/api.ts 79.14% <83.33%> (+0.13%) ⬆️
src/stores/executionStore.ts 96.32% <98.19%> (+0.90%) ⬆️

... and 48 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Playwright videos for new tests

Download the recorded videos and HTML report

Recorded projects: chromium

Recorded test titles:

  • all tests in browser_tests/tests/twoTabExecutionLeak.spec.ts
  • all tests in browser_tests/tests/workflowScopedExecution.spec.ts

@christian-byrne

Copy link
Copy Markdown
Contributor Author

First CI run found two real things, both fixed in f33c146:

1. A regression I introduced. Gating the whole execution_success handler meant a background tab's status badge never reached Completed — workflowTabStatus.spec.ts caught it on shard 13. Per-workflow status is keyed by the job's own workflow and is not shared state, so only the execution reset below it belongs behind the gate (the interrupted and error handlers already had this ordering). Added a unit regression test for it, and verified with a control that it fails on the old ordering and passes on the new one.

2. One of my own browser specs asserted something the transport makes impossible. "an output that arrives after the terminal frame still renders" assumed a late executed would be applied; a single WebSocket delivers in send order, so that ordering only happens on a reconnect replay, by which point the run has been torn down and the output comes back through history instead. The scenario now pins that actual behaviour so a future change to the teardown is a deliberate decision rather than a silent one.

The other six scenarios passed on their first run.

@christian-byrne

Copy link
Copy Markdown
Contributor Author

7bb4ed9 closes the last leak path and fills in the frame types that had no coverage.

The leak. handleExecuting was ungated and could not gate: api.ts dispatches the public executing event with only a node id, since extensions depend on that shape. So the final executing: null of a job started in another workflow tab cleared the visible tab's activeJobId and node progress — the same bug class this PR exists for, just on the one path the ids never reached. api now records the raw message alongside the event (lastExecutingMessage) and the handler gates on it; the public event shape is untouched.

Verified with a control: the new test reports null instead of job-a with the gate removed, and passes with it.

New coverage — the gating suite is now 42 cases:

  • executing: cross-tab teardown blocked, own terminal frame still clears, node progress preserved, and a defensive case for an executing dispatched without a raw message (extensions do this).
  • progress: applied for the active workflow, dropped for another — it was gated inside the RAF coalescer and had no test.
  • mixed backend: a server that starts sending workflow_id mid-session, accepted for its own job and still rejected for a foreign one both before and after the field appears.
  • switching tabs mid-run: the mirror stops updating when the user leaves and resumes when they come back; per-job state keeps advancing throughout.

Three more browser scenarios through the harness: another workflow finishing does not end the visible run, a reconnect replay does not duplicate the output, and a binary preview from another workflow stays off the visible canvas (binary frames carry no workflow_id — core does not stamp them — so that one leans on the queue-time mapping, pinned here because the binary contract is a separate follow-up).

1515 unit tests passing; both typechecks clean.

@github-actions github-actions Bot added risk:xhigh PR risk grade (advisory shadow check; grader-owned) and removed risk:high PR risk grade (advisory shadow check; grader-owned) labels Oct 4, 2026

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed only the stack-tip delta, fca32e8e..2a342f90 (12 files, +2354/-65) — the base PR's own review is separate and I have not duplicated it. Unit suites for the touched paths are green locally as claimed (executionStore.workflowGating, executionStore.terminalRecovery, useQueuePolling, executionStore, queueStore → 269 passed).

Four things I think are blocking, and the first one explains the other three: the topbar badge and the output-history panel are the two surfaces these specs measure, and neither can observe the state the gate actually changes.

1 · blocking — twoTabExecutionLeak.spec.ts:114 asserts something the component is built never to render

twoTabExecutionLeak.spec.ts:90 is red in CI through all three retries (shard 13, new-test videos) — deterministic, not flake. The cause is in the component, not the gate:

// WorkflowTab.vue:235-241
// The active tab doesn't badge its own status - the user is already looking
// at it. Background tabs surface the recorded execution status.
const workflowStatus = computed(() =>
  isActiveTab.value ? undefined : executionStore.getWorkflowStatus(...)
)

The test does switchToTab(WORKFLOW_A) at :108 and then expects a Completed badge on tab A at :114. Tab A is now the active tab, so no role="img" status icon is rendered at all and that assertion cannot pass under any store state.

The same fact makes the neighbouring assertions vacuous rather than failing, which is the part I'd want fixed even more than the red:

  • :113 — tabA Running count 0, on the tab that was just made active. Cannot fail. This is the assertion carrying "not a stuck one", i.e. the whole point of the scenario.
  • :85 and :87 — tabB Running/Completed count 0, asserted right after openPersistedWorkflow(WORKFLOW_B) made B active. Both cannot fail. That leaves :86 (tab A reaches Completed in the background) as the only live assertion in the test named "a run in one tab leaves the other tab idle" — and that one proves the f33c146 ungating, not the leak.

Only the third test (:122) measures a genuinely background tab throughout.

The badge is per-workflow status, which was never the shared state at risk. To pin "switching back shows the finished run, not a stuck one" the assertion has to be on the restored tab's canvas — node progress / progress bar on node 3 — which is also where finding 2 lives.

2 · blocking — the gate leaves the previous workflow's progress in the mirror the canvas reads

handleExecutionSuccess now returns before resetExecutionState for a frame that isn't the active workflow's (executionStore.ts:573). resetExecutionState was the only thing clearing nodeProgressStates, the shared mirror. So: run in tab A → switch to tab B → A finishes in the background → the mirror still holds A's last running entries, and nothing clears them until a queue poll lands.

nodeLocationProgressStates then resolves those node ids against app.rootGraph, which is now B (executionStore.ts:335, graphTraversalUtil.ts:702-713 — a top-level id becomes createNodeLocatorId(null, id), with no workflow or graph scoping), and GraphCanvas.vue:447 syncs the result onto the visible canvas. Any node in B sharing an id with a node in A shows a stale spinning progress bar. executionIdToLocatorCache is cleared only on the active workflow's execution_start/reset, never on a tab switch, so it carries A-era entries across too.

Confirmed red/green across the stack boundary with a unit probe (mocks copied verbatim from the head of executionStore.workflowGating.test.ts):

useWorkflowStore().activeWorkflow = workflowA
queueJobFrom('job-a', workflowA)
fire('execution_start', { prompt_id: 'job-a', workflow_id: WORKFLOW_A_ID, timestamp: 1 })
fire('progress_state', {
  prompt_id: 'job-a', workflow_id: WORKFLOW_A_ID,
  nodes: { '3': nodeState('job-a', '3', 'running', 1) }
})

useWorkflowStore().activeWorkflow = workflowB   // user switches tabs

fire('progress_state', {
  prompt_id: 'job-a', workflow_id: WORKFLOW_A_ID,
  nodes: { '3': nodeState('job-a', '3', 'running', 3) }
})
fireExecuting(null, { prompt_id: 'job-a', workflow_id: WORKFLOW_A_ID })
fire('execution_success', { prompt_id: 'job-a', workflow_id: WORKFLOW_A_ID, timestamp: 9 })

expect(store.nodeProgressStates).toEqual({})
  • at fca32e8e (this PR's base): passes.
  • at 2a342f90: fails — { '3': { state: 'running', value: 1, max: 10, prompt_id: 'job-a', … } }.

Which is this PR's own bug class, pointed the other way: a background workflow's progress painted on the visible one. Recovery exists but is a poll away (8–32 s), and is skipped entirely when api.getQueue rejects, because reconcileTerminalJobs is guarded on activeJobIds being non-null (queueStore.ts:369).

evictTerminalJob already does exactly the right thing here and is already in this diff — it clears the mirror only when mirrorOwnerJobId() === jobId. Replacing the bare return in the terminal handlers with evictTerminalJob(jobId) would release a background job's own shared state without touching a live run, and would not need the poll.

3 · blocking — executed → node outputs is not gated, so a foreign output does land on the visible node

The summary says every execution handler resolves the owning workflow before writing shared state. The handler that writes the output image doesn't:

// app.ts:893-907 — untouched by this PR
api.addEventListener('executed', ({ detail }) => {
  const executionId = tryNormalizeNodeExecutionId(detail.display_node || detail.node)
  if (!executionId) return
  nodeOutputStore.setNodeOutputsByExecutionId(executionId, detail.output, { merge: detail.merge })
  const node = getNodeByExecutionId(this.rootGraph, executionId)
  if (node && node.onExecuted) node.onExecuted(detail.output)
})

setNodeOutputsByExecutionId resolves against app.rootGraph with no ownership check (nodeOutputStore.ts:285-293), so a foreign workflow's executed writes its image onto the visible workflow's same-id node and fires that node's onExecuted. The gated handleExecuted in the store only sets activeJob.nodes[node] = true, which is not the user-visible half.

workflowScopedExecution.spec.ts:115 is the spec that claims this: it plays foreign.executed before mine.executed and asserts outputHistory.imageOutputs is 1. The foreign write is simply overwritten by the own write a frame later, and the panel it asserts on isn't the canvas either. swapFrames the two executed frames — the helper is already imported in that file — and node 9 should keep theirs.png. Worth checking before deciding whether to gate app.ts or document it as out of scope.

4 · blocking — the binary-preview spec passes with or without a gate, and there is no gate

workflowScopedExecution.spec.ts:339 ("a binary preview for another workflow does not reach the visible tab") asserts only outputHistory.imageOutputs count 0 and inProgressItems.first() visible. A latent preview never produces an output-history image and the own run is still in progress, so both hold regardless. Neither looks at the node preview, which is where the write happens:

// app.ts:928-945 — also untouched
revokePreviewsByExecutionId(displayNodeExecutionId)
for (const executionId of getAncestorExecutionIds(displayNodeExecutionId))
  setNodePreviewsByExecutionId(executionId, [blobUrl])

Both calls resolve against the visible workflow, so a foreign job's binary frame sets a preview on the visible node and revokes whatever the visible node had. The comment says this leans on the queue-time mapping — I can't find the path where that mapping is consulted for this frame type; jobPreviewStore.setPreviewUrl(jobId, …) is per-job, but the two nodeOutputStore calls above it are not. Happy to be shown wrong. Either way the assertion should be on the node's preview, or the title should say what it actually pins.


Non-blocking:

5 · the terminal-recovery half has no end-to-end proof. All ten scenarios in workflowScopedExecution.spec.ts plus all three in twoTabExecutionLeak.spec.ts are gating scenarios. dropFrames — added in the base PR for exactly this — is used only in BackendSimulator.test.ts, never in a product spec. reconcileTerminalJobs has 8 unit cases that call it directly, and the call site that wires it to polling (queueStore.ts:369-375) has no test at all. Given the title is half dropped-terminal recovery, one dropFrames(script, '<label>:execution_success') scenario asserting the progress bar clears would close the gap.

6 · the new polling backoff never engages in the case the change targets. useQueuePolling.ts:16 and :25 now poll whenever activeJobsCount >= 1, but the watcher at :29-35 resets delay to BASE_INTERVAL_MS on every activeJobsCount change and then calls scheduleNextPoll, which calls start() and restarts the timer. A draining multi-job queue changes the count once per job, so it polls at the 8 s floor instead of backing off — and if the count changes faster than 8 s the timer is perpetually restarted and the poll that recovery depends on may not fire. Resetting the delay only on a 0 → n transition would fix both.

7 · #11951 is still open, and the supersession drops one of its fixes. The body says it supersedes #11951; #11866 is already closed but #11951 is still an open draft, so something has to close it. One carried-over item is missing: #11951 also widened ApiToEventType so executing is SerializedNodeId | null (api.ts:314-320). This PR types handleExecuting's parameter as nullable but leaves the public event type saying non-null, while api.ts:1145 demonstrably dispatches null. Otherwise the delta is a strict superset of #11951's store work, and it fixes the one real defect #11951 carried — #11951 gated setWorkflowStatus inside handleExecutionSuccess, which is the background-tab regression f33c146 landed here to undo.

8 · two tabs of the same workflow aren't distinguished. The gate compares graph ids and paths, so two instances of one workflow resolve identically. jobIdToWorkflowInstanceId is populated by ensureSessionWorkflowPath but never read by messageMatchesActiveWorkflow. Probably fine to declare out of scope, but it's the one multi-tab shape the gate can't see.


Reviewed at 2a342f90e99a3805891e6c461401755ab4a856d5. Not merging — not my call on this repo, and CI is red.

@christian-byrne

Copy link
Copy Markdown
Contributor Author

Ran the full stack locally against a real CPU backend (ComfyUI --cpu --multi-user serving this branch's built dist, same invocation CI uses).

13/13 of twoTabExecutionLeak.spec.ts + workflowScopedExecution.spec.ts pass.

Regression sweep over the execution-adjacent specs — topbar/workflowTabStatus, outputHistory, wsReconnectStaleJob, execution — gives 21 passed / 4 failed. A control run on a pristine origin/main worktree with its own built dist produces exactly the same 21/4, so none of those four are from this PR: one is a @screenshot test with no local baseline, one a progress-bar case, two @vue-nodes reconnect cases. Without the control that number would have been meaningless either way.

Also verified the core side end to end against the live server with a real websocket client rather than a fixture: metadata lands on every prompt-bearing frame when supplied, is absent everywhere when not, an oversized dict is rejected so it stays absent, and status is never stamped. It also confirms the one ordering detail that is easy to get wrong — the trailing executing: null of a finished prompt still carries that prompt's id, because core clears the slot after that send.

Worth recording: my first run of that checker reported a leak, and the checker was wrong, not the code. It stopped collecting at execution_success, which left the trailing executing frame in the socket for the next prompt's pass to misattribute. Keying frames on prompt_id fixed it.

@christian-byrne

Copy link
Copy Markdown
Contributor Author

A manual QA pass on a GPU box found a real leak that none of the tests here caught: with two saved workflows open, the KSampler in the tab the user had switched to showed the other tab's progress bar and running outline.

Cause was mine. Gating stops a background workflow from writing the shared progress mirror, but it does not clear what that workflow wrote while it was in front, and node progress is keyed by a locator resolved against whichever graph is currently in view. Two workflows that share a node id — any two workflows derived from the default graph share 3 — resolve to the same key, so the stale entry rendered on the newly visible node. An earlier revision had a reconcile-on-switch step and I dropped it; 2fbcff6764 puts it back, re-pointing the mirror at the active workflow's own job or clearing it when that workflow has no running job.

Two reasons the suite missed it:

  • The two-tab specs only asserted the topbar badges, which are per-workflow state and were already correct. Nothing asserted the canvas, which is where the bug was visible. The new case reads node.progress and the running stroke style off the node — the same two values the renderer consumes.
  • openPersistedWorkflow called workflowStore.openWorkflow, which registers the tab without loading the graph, so the canvas stayed on whatever it had. Those specs were passing against the wrong graph; node 3 was not even present. 420ae9b9aa clicks the sidebar entry instead, which is the path a user takes. That helper is not mine, it predates this stack, and its other four callers (26 cases in workflowPersistence, plus preview3dExecution) still pass.

Verified in both directions: with the reconcile removed and the dist rebuilt, the new browser case fails with progress: 0.25, outlined: true on the foreign tab — the QA report, reproduced — and the three new unit cases fail too. With it restored, 14 browser scenarios pass against a real ComfyUI and the store suites are at 1338.

A job started from one workflow tab could steal activeJobId, write the
global node-progress mirror, mark nodes on another tab's job and clear the
visible tab's execution state, because every execution handler wrote shared
state unconditionally. Each handler now resolves the owning workflow —
`workflow_id` on the frame first, then the mapping registered when the job
was queued, then the session path — and skips shared writes when the frame
belongs to another workflow. Per-job progress is still recorded for every
frame, and behaviour is unchanged when ownership cannot be resolved, so a
job queued in another browser session keeps working as before.

Reworked from #11951 onto current main, where the WS message types moved out
of the deleted apiSchema.ts. Also revokes a node's stale previews when it
transitions pending -> running, not only when it appears for the first time.
Seven scenarios driven by BackendSimulator: the visible workflow's own
frames render, a foreign workflow's start/progress/output never touch the
visible tab, interleaved prompts keep one output each, an `executed` that
arrives after its terminal frame still renders, a repeated terminal frame
does not duplicate the output, and a backend that sends no workflow id
behaves exactly as before.

Each loads a workflow asset that carries an id, because ownership gating has
nothing to resolve for an unsaved workflow and would pass for the wrong
reason there.
`execution_success` and friends are broadcast once and never retried, so a
single dropped frame leaves a node's progress bar and elapsed timer pinned
with no way for the user to clear it — the queue and history panels update
correctly while the canvas stays stuck. Queue polling now reconciles: a job
the backend reports in history while the frontend still holds progress for
it is evicted, clearing the shared mirror only when it still belongs to that
job so a live run is never blanked. Polling also no longer stops when more
than one job is active, which is exactly when this happens.
applyProgressState had grown three responsibilities and tripped the
complexity gate once ownership gating was added. Preview revocation and the
backwards-compatible executing-node mirror are now their own functions, the
ownership resolution reads the active graph id once, and the text-preview
gate is named rather than inlined. No behavioural change.
Gating the whole `execution_success` handler stopped a background tab's
status badge from ever reaching Completed, which `workflowTabStatus.spec.ts`
caught: per-workflow status is keyed by the job's own workflow and is not
shared state, so only the execution reset below it belongs behind the gate.
The interrupted and error handlers already had this ordering.

Also pins the out-of-order case to what actually happens: one WebSocket
delivers in send order, so an `executed` after the terminal frame only
occurs on a reconnect replay, and the run has already been torn down by
then — the late output is dropped and comes back through history instead.
The public `executing` event carries only a node id — extensions depend on
that shape — so the handler had no way to tell which run a frame came from,
and the final `executing: null` of a job started in another workflow tab
cleared the visible tab's active job and node progress. `api` now records the
raw message alongside the event and the handler gates on it.

Adds coverage for the frame types that had none: `executing`, `progress`, a
backend that starts sending `workflow_id` mid-session, and switching tabs
while a run is in flight. Browser scenarios cover the cross-tab teardown, a
reconnect replay not duplicating the output, and a binary preview from
another workflow.
The scoped-execution specs inject frames tagged with a foreign workflow id,
which exercises the gate but takes the frontend's own tab bookkeeping on
trust. These open two persisted workflows and run the reported sequence —
queue in one, switch to the other — asserting per-tab badge state rather
than a screenshot, since this is a state bug.

Also closes a staleness window in the raw-executing-message hand-off: it is
now cleared straight after dispatch, so an `executing` dispatched later by an
extension is not read as belonging to whichever run arrived last.
The active tab deliberately carries no status badge (WorkflowTab.vue:235 —
the user is already looking at it), so asserting Completed after switching
back tested a UI contract that does not exist. The terminal frames are now
asserted while the tab is still backgrounded, and after switching back the
assertion is that no tab anywhere still reads as running.
Captured the real frames from a running server and diffed them against what
the simulator sends: the node-start `executing` frame carries `display_node`
and ours did not, so every spec was exercising the app's `display_node ||
node` fallback rather than the normal path. The terminal `node: null` frame
genuinely has no `display_node`, so it stays omitted there.

Worth the correction: with the faithful shape, three of the foreign-workflow
scenarios fail against a pristine main build and pass against this branch,
which is the first time these specs have demonstrated the bug in both
directions rather than only asserting the fix.
Gating stops a background workflow writing the shared progress mirror, but
whatever it wrote while it was in front stayed there, and node progress is
keyed by a locator resolved against the graph currently in view. Two
workflows sharing a node id therefore showed the stale entry on the newly
visible node.
openPersistedWorkflow went through workflowStore.openWorkflow, which
registers the tab without loading the graph, so the canvas kept whatever it
already had. Click the sidebar entry instead, and assert node progress on
the two-tab leak scenario now that the nodes under test are really there.
nodeRunning returns the progress_state and progress frames separately now,
so spread it into the scripts, and duplicateFrame is duplicateFrames.
@christian-byrne
christian-byrne force-pushed the cbyrne/ws-workflow-gating branch from 420ae9b to 179755b Compare October 4, 2026 04:57
Ownership falls back to the session path the client recorded at queue time,
so the mirror clears on switch there too. QA saw foreign progress on that
backend before this.
…atcher

The canvas stamps progress onto the new graph's nodes when the graph changes,
reading whatever the shared mirror holds at that moment, and two workflows
derived from the default graph both own node 3. Clearing the mirror on a
watcher is a race against that, which GPU QA lost on the second and later tab
switches. Filter by owning workflow where the states are projected instead, so
no ordering can leak.
@christian-byrne

Copy link
Copy Markdown
Contributor Author

Round 2 of the GPU QA failed, and the failure was in my previous fix rather than in the original bug: progress isolation held for the first tab switch and broke on later ones.

The mechanism is a race. nodeProgressCanvasSync.replaceGraph runs when the open graph changes and stamps every node of the new graph with whatever nodeLocationProgressStates holds at that moment; node progress is keyed by locator, and two workflows derived from the default graph both own node 3, so A's entry lands on B's node. Clearing the mirror on an activeWorkflow watcher — what I did before — races that sync, and the winner depends on flush order. It went my way on every local run and the other way on the QA machine.

a58f38a144 filters by owning workflow where the states are projected instead, so a foreign entry cannot render even while it is still in the mirror. One of the new tests leaves it there deliberately; it fails without the filter. The reconcile-on-switch remains, since it is what re-points the mirror and clears the executing-node title when you return to a tab, but correctness no longer depends on when it runs.

Two things about the verification, since they matter more than the fix:

  • The simulated specs could not see this. They drive a scripted socket, so nothing exercised replaceGraph against a live mirror. I built a real-backend rig — a custom node that emits genuine progress frames slowly, so a 60-second run is reproducible on CPU without a GPU or a checkpoint, plus two saved workflows that share node 3 — and drove six tab switches on a live run reading node.progress and the running stroke style off the canvas. It is not in this PR because the node is not in the repo and CI cannot run it.
  • My first attempt at that rig tested nothing and looked green. Leftover 60-second jobs from earlier runs were still in the server queue, so the prompt under test sat pending and the tab showed no progress at all, which is indistinguishable from correct isolation. Interrupting and clearing the queue before each run fixed it.

Also audited the wire during a real run: every execution frame carries workflow_id — progress_state, progress, executing, executed, execution_start, execution_cached, execution_success — and only status does not, as documented. So the contract side is confirmed independently of the frontend.

Unit suites are at 1343, the 16 browser scenarios pass against a real ComfyUI, and a re-run on the GPU box is in flight.

LoadedComfyWorkflow types both graph states as present but the running store
does not always honour it, and reading the id from a watcher and a computed
turned that into a throw inside a watcher callback, which took the tab title,
status dismissal and linear output stores down with it: 20 tests across three
untouched suites. Return null instead, and fix the simulator expectation for
the display_node field on executing.
A workflow id names a workflow, not an open tab, and several tabs can carry
the same one: ensureWorkflowId keeps whatever id the json already has, so
copying a workflow into a new tab duplicates it, and loading one can leave
both a temporary and a persisted entry holding it. Checking the id first
therefore matched foreign tabs. Consult the per-tab instance and session path
first and treat the id as the weakest signal.

Also gates ComfyApp's own executed listener, which resolves the node against
the visible graph and so wrote a finished job's output onto the same-numbered
node of whatever tab was in front, and releases a finished job's own records
even when it belongs to another tab so they do not leak for the session.

QA reproduced both with three unsaved copies of the default graph.
The order is load-bearing and was wrong once, so reordering the legs now
fails here rather than in QA: the tab instance beats a matching graph id,
the session path is used when no instance is known, the graph id only when
neither is, and an unresolvable job stays permissive. Also pins that a run
survives its tab being renamed, and that the copy Save As creates does not
claim it.
@alexisrolland
alexisrolland merged commit 6a892b2 into cbyrne/ws-execution-concurrency-harness Oct 6, 2026
122 checks passed
@alexisrolland
alexisrolland deleted the cbyrne/ws-workflow-gating branch October 6, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants