Repository navigation
feat: scope progress events and UI state by active workflow - #11951
christian-byrne wants to merge 7 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds optional ChangesExecution State Multi-Tab Isolation
Sequence DiagramsequenceDiagram
actor TabA as Tab A (Active Workflow)
actor TabB as Tab B (Other Workflow)
participant Backend as Backend
participant WS as WebSocket
participant Store as Execution Store
participant UI as UI State
TabA->>Backend: Start execution (workflow_id: "w1")
Backend->>WS: ExecutionStartWsMessage {prompt_id:"p1", workflow_id:"w1"}
WS->>Store: deliver message
Store->>Store: messageMatchesActiveWorkflow("p1","w1") -> true
Store->>UI: set activeJobId="p1", reset execution state
TabB->>Backend: Start execution (workflow_id: "w2")
Backend->>WS: ExecutionStartWsMessage {prompt_id:"p2", workflow_id:"w2"}
WS->>Store: deliver message
Store->>Store: messageMatchesActiveWorkflow("p2","w2") -> false
Store--xUI: ignore message (no state change)
Backend->>WS: ProgressStateWsMessage {prompt_id:"p1", workflow_id:"w1", node:...}
WS->>Store: deliver message
Store->>Store: matches active -> update nodeProgressStates, revoke previews if entering running
Store->>UI: reflect node progress
Backend->>WS: ProgressTextWsMessage {prompt_id:"p2", workflow_id:"w2", text:"..."}
WS->>Store: deliver message
Store->>Store: does not match active -> skip showTextPreview
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Replaced by #11951. Closing this in favour of the split. Splitting per Christian's review request:
All review feedback from this thread carried into the new PR (jaeone94's terminal-handler clobbering fix, Christian's tab-switch / |
📦 Bundle: 5.35 MB gzip 🔴 +728 BDetailsSummary
Category Glance App Entry Points — 31.8 kB (baseline 31.8 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.24 MB (baseline 1.24 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 82.6 kB (baseline 82.6 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 2 unchanged Panels & Settings — 526 kB (baseline 526 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 14 unchanged User & Accounts — 17.7 kB (baseline 17.7 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed / 2 unchanged Editors & Dialogs — 112 kB (baseline 112 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 4 added / 4 removed UI Components — 57.9 kB (baseline 57.9 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 8 unchanged Data & Services — 3.15 MB (baseline 3.15 MB) • 🔴 +3.35 kBStores, services, APIs, and repositories
Status: 13 added / 13 removed / 4 unchanged Utilities & Hooks — 369 kB (baseline 369 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 13 added / 13 removed / 19 unchanged Vendor & Third-Party — 9.94 MB (baseline 9.94 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 9.13 MB (baseline 9.13 MB) • ⚪ 0 BBundles that do not match a named category
Status: 57 added / 57 removed / 85 unchanged ⚡ Performance Report
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-05-13T20:10:08.555Z",
"gitSha": "0479abf3e477a36779796d6e527eeddb4f671181",
"branch": "glary/scope-progress-by-workflow",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2059.353999999985,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.736,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 507.94700000000006,
"heapDeltaBytes": 20671472,
"heapUsedBytes": 69905436,
"domNodes": -263,
"jsHeapTotalBytes": 19001344,
"scriptDurationMs": 22.736000000000004,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2009.0910000000122,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.155,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 415.27899999999994,
"heapDeltaBytes": 23203900,
"heapUsedBytes": 72229620,
"domNodes": 18,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 21.214999999999996,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1845.0319999999465,
"styleRecalcs": 72,
"styleRecalcDurationMs": 36.374,
"layouts": 12,
"layoutDurationMs": 3.216999999999999,
"taskDurationMs": 882.005,
"heapDeltaBytes": 13978844,
"heapUsedBytes": 63452196,
"domNodes": -263,
"jsHeapTotalBytes": 22671360,
"scriptDurationMs": 121.84899999999999,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1833.0929999999626,
"styleRecalcs": 74,
"styleRecalcDurationMs": 37.473000000000006,
"layouts": 12,
"layoutDurationMs": 3.6690000000000005,
"taskDurationMs": 839.39,
"heapDeltaBytes": -2130812,
"heapUsedBytes": 46700480,
"domNodes": -265,
"jsHeapTotalBytes": 15069184,
"scriptDurationMs": 120.50500000000001,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1730.6230000000369,
"styleRecalcs": 32,
"styleRecalcDurationMs": 18.580000000000002,
"layouts": 6,
"layoutDurationMs": 0.619,
"taskDurationMs": 348.005,
"heapDeltaBytes": 799132,
"heapUsedBytes": 50267848,
"domNodes": 80,
"jsHeapTotalBytes": 14942208,
"scriptDurationMs": 30.277,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1751.408999999967,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.962,
"layouts": 6,
"layoutDurationMs": 0.771,
"taskDurationMs": 398.699,
"heapDeltaBytes": -3832308,
"heapUsedBytes": 45389984,
"domNodes": -211,
"jsHeapTotalBytes": 20312064,
"scriptDurationMs": 25.241,
"eventListeners": -120,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 630.6510000000571,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.569000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 383.9320000000001,
"heapDeltaBytes": 9497036,
"heapUsedBytes": 57887548,
"domNodes": 10,
"jsHeapTotalBytes": 14680064,
"scriptDurationMs": 62.70900000000002,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 574.4539999999461,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.247000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 367.45300000000003,
"heapDeltaBytes": 15222528,
"heapUsedBytes": 64283384,
"domNodes": 18,
"jsHeapTotalBytes": 16777216,
"scriptDurationMs": 56.88299999999999,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "large-graph-idle",
"durationMs": 2026.4989999999443,
"styleRecalcs": 11,
"styleRecalcDurationMs": 11.628,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 644.2249999999999,
"heapDeltaBytes": 8363508,
"heapUsedBytes": 65649568,
"domNodes": -258,
"jsHeapTotalBytes": 1073152,
"scriptDurationMs": 103.094,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2039.3270000000712,
"styleRecalcs": 9,
"styleRecalcDurationMs": 10.435,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 699.0730000000001,
"heapDeltaBytes": 39505480,
"heapUsedBytes": 98566512,
"domNodes": -264,
"jsHeapTotalBytes": 33054720,
"scriptDurationMs": 99.43,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2186.148000000003,
"styleRecalcs": 69,
"styleRecalcDurationMs": 18.826999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1341.7330000000002,
"heapDeltaBytes": 42801708,
"heapUsedBytes": 103375944,
"domNodes": -265,
"jsHeapTotalBytes": 43278336,
"scriptDurationMs": 454.693,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2134.0920000000096,
"styleRecalcs": 68,
"styleRecalcDurationMs": 18.470999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1160.253,
"heapDeltaBytes": -952320,
"heapUsedBytes": 58827396,
"domNodes": -263,
"jsHeapTotalBytes": 5996544,
"scriptDurationMs": 385.78100000000006,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3266.9969999999466,
"styleRecalcs": 65,
"styleRecalcDurationMs": 20.190999999999995,
"layouts": 60,
"layoutDurationMs": 8.045,
"taskDurationMs": 1489.192,
"heapDeltaBytes": 44797028,
"heapUsedBytes": 107735104,
"domNodes": -271,
"jsHeapTotalBytes": 35471360,
"scriptDurationMs": 494.1599999999999,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3180.4559999999356,
"styleRecalcs": 65,
"styleRecalcDurationMs": 18.947000000000003,
"layouts": 60,
"layoutDurationMs": 8.053999999999998,
"taskDurationMs": 1375.918,
"heapDeltaBytes": 8377980,
"heapUsedBytes": 69831996,
"domNodes": -269,
"jsHeapTotalBytes": 5005312,
"scriptDurationMs": 482.666,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2027.928999999972,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.447999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 622.995,
"heapDeltaBytes": 2315840,
"heapUsedBytes": 63014108,
"domNodes": -266,
"jsHeapTotalBytes": 5005312,
"scriptDurationMs": 95.104,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2017.741000000001,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.813,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 571.0710000000001,
"heapDeltaBytes": -3771520,
"heapUsedBytes": 54874256,
"domNodes": -265,
"jsHeapTotalBytes": 4481024,
"scriptDurationMs": 88.12,
"eventListeners": -159,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 554.2279999999664,
"styleRecalcs": 45,
"styleRecalcDurationMs": 10.435,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 376.258,
"heapDeltaBytes": 15472472,
"heapUsedBytes": 64655044,
"domNodes": 16,
"jsHeapTotalBytes": 17039360,
"scriptDurationMs": 123.696,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 573.5090000000582,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.988000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 370.886,
"heapDeltaBytes": 9451728,
"heapUsedBytes": 58114880,
"domNodes": 19,
"jsHeapTotalBytes": 15466496,
"scriptDurationMs": 121.13099999999999,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2031.7440000000033,
"styleRecalcs": 8,
"styleRecalcDurationMs": 9.599,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 476.275,
"heapDeltaBytes": 10925144,
"heapUsedBytes": 60906404,
"domNodes": -246,
"jsHeapTotalBytes": 14372864,
"scriptDurationMs": 22.513000000000005,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1998.9450000000488,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.118,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 396.509,
"heapDeltaBytes": 23010908,
"heapUsedBytes": 71959468,
"domNodes": 17,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 18.522999999999996,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1766.858999999954,
"styleRecalcs": 76,
"styleRecalcDurationMs": 38.455999999999996,
"layouts": 16,
"layoutDurationMs": 4.939,
"taskDurationMs": 807.549,
"heapDeltaBytes": 12233580,
"heapUsedBytes": 61542924,
"domNodes": -261,
"jsHeapTotalBytes": 19263488,
"scriptDurationMs": 93.68200000000002,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 2013.1169999999656,
"styleRecalcs": 87,
"styleRecalcDurationMs": 48.358,
"layouts": 16,
"layoutDurationMs": 4.675999999999999,
"taskDurationMs": 984.383,
"heapDeltaBytes": 14376112,
"heapUsedBytes": 63190204,
"domNodes": 73,
"jsHeapTotalBytes": 14417920,
"scriptDurationMs": 94.574,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 932.6680000000351,
"styleRecalcs": 16,
"styleRecalcDurationMs": 24.371000000000002,
"layouts": 5,
"layoutDurationMs": 10.569000000000003,
"taskDurationMs": 738.4560000000002,
"heapDeltaBytes": 30193952,
"heapUsedBytes": 95072000,
"domNodes": 13433,
"jsHeapTotalBytes": 16777216,
"scriptDurationMs": 27.88500000000001,
"eventListeners": 2527,
"totalBlockingTimeMs": 128,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8169.04199999999,
"styleRecalcs": 249,
"styleRecalcDurationMs": 55.946,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4142.706999999999,
"heapDeltaBytes": 5845188,
"heapUsedBytes": 65833576,
"domNodes": -260,
"jsHeapTotalBytes": 5763072,
"scriptDurationMs": 1279.7299999999998,
"eventListeners": -113,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8204.279000000042,
"styleRecalcs": 249,
"styleRecalcDurationMs": 55.08099999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4091.952,
"heapDeltaBytes": 6149228,
"heapUsedBytes": 65632576,
"domNodes": -249,
"jsHeapTotalBytes": 782336,
"scriptDurationMs": 1286.825,
"eventListeners": -113,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 13685.961000000021,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13648.345,
"heapDeltaBytes": 33644404,
"heapUsedBytes": 286961072,
"domNodes": -8331,
"jsHeapTotalBytes": 46985216,
"scriptDurationMs": 718.936,
"eventListeners": -16488,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 10801.275999999916,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10784.437,
"heapDeltaBytes": -35877896,
"heapUsedBytes": 163837316,
"domNodes": -8331,
"jsHeapTotalBytes": 13955072,
"scriptDurationMs": 581.77,
"eventListeners": -16466,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 13038.959999999974,
"styleRecalcs": 67,
"styleRecalcDurationMs": 18.676000000000027,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13012.850999999999,
"heapDeltaBytes": -32283776,
"heapUsedBytes": 165953032,
"domNodes": -8331,
"jsHeapTotalBytes": -5443584,
"scriptDurationMs": 883.502,
"eventListeners": -16464,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 15503.917000000001,
"styleRecalcs": 76,
"styleRecalcDurationMs": 18.497000000000014,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15473.031000000003,
"heapDeltaBytes": -3103820,
"heapUsedBytes": 258411332,
"domNodes": -8331,
"jsHeapTotalBytes": 7925760,
"scriptDurationMs": 1009.8029999999998,
"eventListeners": -16490,
"totalBlockingTimeMs": 6,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 460.5350000000499,
"styleRecalcs": 14,
"styleRecalcDurationMs": 22.387999999999998,
"layouts": 5,
"layoutDurationMs": 1.7510000000000001,
"taskDurationMs": 131.31699999999998,
"heapDeltaBytes": 5300940,
"heapUsedBytes": 57204076,
"domNodes": 164,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 27.087,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 465.9349999999449,
"styleRecalcs": 16,
"styleRecalcDurationMs": 23.74,
"layouts": 5,
"layoutDurationMs": 1.311,
"taskDurationMs": 119.90899999999999,
"heapDeltaBytes": 5072836,
"heapUsedBytes": 56388116,
"domNodes": 156,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 23.894000000000002,
"eventListeners": 69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
}🎨 Storybook: ❌ FailedDetails⏰ Completed at: 09/02/2026, 07:16:33 PM UTC Links
🎭 Playwright: ❌ 1897 passed, 2 failed · 1 flaky❌ Failed Tests📊 Browser Reports
📦 Bundle: 9.68 MB gzip 🔴 +916 BDetailsSummary
Category Glance App Entry Points — 3.74 kB (baseline 3.74 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.42 MB (baseline 1.42 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 124 kB (baseline 124 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 13 added / 13 removed / 4 unchanged Panels & Settings — 621 kB (baseline 621 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 17 unchanged User & Accounts — 27.8 kB (baseline 27.8 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 5 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 117 kB (baseline 117 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed / 8 unchanged Data & Services — 3.59 MB (baseline 3.59 MB) • 🔴 +3.24 kBStores, services, APIs, and repositories
Status: 13 added / 13 removed / 3 unchanged Utilities & Hooks — 560 kB (baseline 560 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 18 added / 18 removed / 18 unchanged Vendor & Third-Party — 18.1 MB (baseline 18.1 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 16.4 MB (baseline 16.4 MB) • ⚪ 0 BBundles that do not match a named category
Status: 72 added / 72 removed / 223 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-02T19:28:46.418Z",
"gitSha": "9ded424a0e364897669b30b93725bd79358a3fd9",
"branch": "glary/scope-progress-by-workflow",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2053.229999999985,
"styleRecalcs": 9,
"styleRecalcDurationMs": 6.869,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 490.07900000000006,
"heapDeltaBytes": -13213596,
"heapUsedBytes": 56628564,
"domNodes": -279,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 8.326,
"eventListeners": -150,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2051.456999999914,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.991,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 515.485,
"heapDeltaBytes": -11152736,
"heapUsedBytes": 58583452,
"domNodes": -279,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 8.763,
"eventListeners": -150,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2016.0570000000462,
"styleRecalcs": 81,
"styleRecalcDurationMs": 48.300999999999995,
"layouts": 14,
"layoutDurationMs": 5.76,
"taskDurationMs": 1059.6460000000002,
"heapDeltaBytes": -8560252,
"heapUsedBytes": 62233828,
"domNodes": -281,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 163.388,
"eventListeners": -150,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1858.667999999966,
"styleRecalcs": 77,
"styleRecalcDurationMs": 41.336999999999996,
"layouts": 14,
"layoutDurationMs": 4.559,
"taskDurationMs": 902.947,
"heapDeltaBytes": -8760644,
"heapUsedBytes": 61551972,
"domNodes": -279,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 148.66199999999998,
"eventListeners": -150,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1722.091999999975,
"styleRecalcs": 33,
"styleRecalcDurationMs": 16.114,
"layouts": 6,
"layoutDurationMs": 1.0269999999999997,
"taskDurationMs": 354.109,
"heapDeltaBytes": 5054340,
"heapUsedBytes": 75412636,
"domNodes": 77,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 11.019999999999998,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1723.4280000000126,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.890999999999995,
"layouts": 6,
"layoutDurationMs": 1.1890000000000003,
"taskDurationMs": 362.37800000000004,
"heapDeltaBytes": 5073856,
"heapUsedBytes": 75707608,
"domNodes": 76,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 11.167999999999997,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 660.7359999999289,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.388999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 450.22399999999993,
"heapDeltaBytes": 18249912,
"heapUsedBytes": 88657084,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 154.60100000000003,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 673.9000000000033,
"styleRecalcs": 13,
"styleRecalcDurationMs": 9.177999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 465.654,
"heapDeltaBytes": -7917816,
"heapUsedBytes": 62454148,
"domNodes": 22,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 160.70000000000002,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2071.152999999981,
"styleRecalcs": 5,
"styleRecalcDurationMs": 5.142,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 744.895,
"heapDeltaBytes": -14161892,
"heapUsedBytes": 86115652,
"domNodes": -269,
"jsHeapTotalBytes": -2158592,
"scriptDurationMs": 38.019,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2078.9589999999407,
"styleRecalcs": 4,
"styleRecalcDurationMs": 4.930000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 643.0690000000001,
"heapDeltaBytes": -14127500,
"heapUsedBytes": 87054464,
"domNodes": -270,
"jsHeapTotalBytes": -1634304,
"scriptDurationMs": 38.400999999999996,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2351.7850000000635,
"styleRecalcs": 65,
"styleRecalcDurationMs": 11.803,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1700.513,
"heapDeltaBytes": 23168144,
"heapUsedBytes": 89116136,
"domNodes": -271,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 804.361,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2181.2640000000556,
"styleRecalcs": 63,
"styleRecalcDurationMs": 9.716,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1564.821,
"heapDeltaBytes": 17713316,
"heapUsedBytes": 83859236,
"domNodes": 2,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 758.6579999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3513.851999999929,
"styleRecalcs": 60,
"styleRecalcDurationMs": 10.713000000000001,
"layouts": 60,
"layoutDurationMs": 12.901,
"taskDurationMs": 1661.7839999999999,
"heapDeltaBytes": 8473100,
"heapUsedBytes": 76233480,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 744.305,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3524.193999999966,
"styleRecalcs": 60,
"styleRecalcDurationMs": 10.542999999999997,
"layouts": 60,
"layoutDurationMs": 13.006,
"taskDurationMs": 1668.0639999999999,
"heapDeltaBytes": 8467044,
"heapUsedBytes": 75893768,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 745.8549999999999,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3141.3479999999936,
"styleRecalcs": 40,
"styleRecalcDurationMs": 5.547,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1992.1519999999998,
"heapDeltaBytes": 24540968,
"heapUsedBytes": 92032344,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 985.1860000000001,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3098.388,
"styleRecalcs": 40,
"styleRecalcDurationMs": 5.708999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1899.8680000000002,
"heapDeltaBytes": 22473640,
"heapUsedBytes": 89394928,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 938.8449999999999,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2030.1709999999957,
"styleRecalcs": 2,
"styleRecalcDurationMs": 1.021000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 561.7129999999999,
"heapDeltaBytes": 21970092,
"heapUsedBytes": 88127636,
"domNodes": -273,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 35.98599999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2025.42399999993,
"styleRecalcs": 3,
"styleRecalcDurationMs": 2.555999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 580.2439999999999,
"heapDeltaBytes": 10577984,
"heapUsedBytes": 87236832,
"domNodes": -276,
"jsHeapTotalBytes": -2195456,
"scriptDurationMs": 31.752999999999997,
"eventListeners": -180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 593.2470000000194,
"styleRecalcs": 46,
"styleRecalcDurationMs": 9.235,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 393.278,
"heapDeltaBytes": 15202700,
"heapUsedBytes": 88120516,
"domNodes": 18,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 137.631,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 590.0820000000522,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.714000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 400.80400000000003,
"heapDeltaBytes": 15198672,
"heapUsedBytes": 87909488,
"domNodes": 20,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 139.10299999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2018.1800000000294,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.608999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 506.313,
"heapDeltaBytes": -14227516,
"heapUsedBytes": 58287816,
"domNodes": -296,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 8.892000000000001,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2054.194999999936,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.8599999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 493.98800000000006,
"heapDeltaBytes": -6743464,
"heapUsedBytes": 66000648,
"domNodes": -295,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 7.914000000000001,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1790.915000000041,
"styleRecalcs": 79,
"styleRecalcDurationMs": 44.401,
"layouts": 18,
"layoutDurationMs": 6.559,
"taskDurationMs": 870.1550000000001,
"heapDeltaBytes": -12028012,
"heapUsedBytes": 60790736,
"domNodes": -296,
"jsHeapTotalBytes": 7069696,
"scriptDurationMs": 109.96799999999999,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1750.6499999999505,
"styleRecalcs": 77,
"styleRecalcDurationMs": 40.221,
"layouts": 18,
"layoutDurationMs": 5.976,
"taskDurationMs": 846.7209999999999,
"heapDeltaBytes": -10573636,
"heapUsedBytes": 62065212,
"domNodes": -296,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 108.33599999999998,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 1400.3149999999778,
"styleRecalcs": 19,
"styleRecalcDurationMs": 47.39,
"layouts": 15,
"layoutDurationMs": 18.517000000000003,
"taskDurationMs": 939.4429999999998,
"heapDeltaBytes": -5239352,
"heapUsedBytes": 84267004,
"domNodes": 13751,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 29.518000000000004,
"eventListeners": 2381,
"totalBlockingTimeMs": 150,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8282.332999999995,
"styleRecalcs": 248,
"styleRecalcDurationMs": 38.847,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5571.156,
"heapDeltaBytes": -7082464,
"heapUsedBytes": 93550996,
"domNodes": -266,
"jsHeapTotalBytes": -884736,
"scriptDurationMs": 2515.92,
"eventListeners": -134,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8368.53199999996,
"styleRecalcs": 245,
"styleRecalcDurationMs": 36.762,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5754.936,
"heapDeltaBytes": 24932112,
"heapUsedBytes": 90144896,
"domNodes": -271,
"jsHeapTotalBytes": 487424,
"scriptDurationMs": 2606.671,
"eventListeners": -134,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 17827.264000000014,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17291.148,
"heapDeltaBytes": -35024808,
"heapUsedBytes": 168706768,
"domNodes": -6548,
"jsHeapTotalBytes": -4075520,
"scriptDurationMs": 351.166,
"eventListeners": -7471,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17977.022000000034,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17261.93,
"heapDeltaBytes": -25278364,
"heapUsedBytes": 179101332,
"domNodes": -6548,
"jsHeapTotalBytes": -3026944,
"scriptDurationMs": 293.70799999999997,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 22208.813999999962,
"styleRecalcs": 175,
"styleRecalcDurationMs": 20.689999999999987,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21922.331,
"heapDeltaBytes": -36024452,
"heapUsedBytes": 166570116,
"domNodes": -6548,
"jsHeapTotalBytes": 1814528,
"scriptDurationMs": 934.188,
"eventListeners": -7469,
"totalBlockingTimeMs": 98,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 21773.77799999999,
"styleRecalcs": 170,
"styleRecalcDurationMs": 20.01200000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21452.012,
"heapDeltaBytes": -12543768,
"heapUsedBytes": 190525428,
"domNodes": -6577,
"jsHeapTotalBytes": 1511424,
"scriptDurationMs": 896.861,
"eventListeners": -7469,
"totalBlockingTimeMs": 159,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6486.266999999998,
"styleRecalcs": 20,
"styleRecalcDurationMs": 98.49200000000002,
"layouts": 20,
"layoutDurationMs": 29.576000000000004,
"taskDurationMs": 6338.2429999999995,
"heapDeltaBytes": -34022828,
"heapUsedBytes": 174617396,
"domNodes": -6548,
"jsHeapTotalBytes": 6631424,
"scriptDurationMs": 114.871,
"eventListeners": -7469,
"totalBlockingTimeMs": 652,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6370.259000000033,
"styleRecalcs": 20,
"styleRecalcDurationMs": 72.86400000000003,
"layouts": 20,
"layoutDurationMs": 23.045999999999996,
"taskDurationMs": 6243.594,
"heapDeltaBytes": -20586112,
"heapUsedBytes": 182280308,
"domNodes": -6548,
"jsHeapTotalBytes": 20193280,
"scriptDurationMs": 116.26899999999999,
"eventListeners": -7469,
"totalBlockingTimeMs": 427,
"frameDurationMs": 17.776666666666703,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 479.41900000000714,
"styleRecalcs": 18,
"styleRecalcDurationMs": 23.563000000000002,
"layouts": 3,
"layoutDurationMs": 1.7309999999999999,
"taskDurationMs": 116.937,
"heapDeltaBytes": 5040500,
"heapUsedBytes": 73568592,
"domNodes": 149,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 12.698,
"eventListeners": 67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 454.586000000063,
"styleRecalcs": 12,
"styleRecalcDurationMs": 17.313999999999997,
"layouts": 3,
"layoutDurationMs": 0.9459999999999998,
"taskDurationMs": 94.495,
"heapDeltaBytes": 4789768,
"heapUsedBytes": 73151856,
"domNodes": 119,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 7.341,
"eventListeners": 67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/stores/executionStore.ts (2)
273-292:⚠️ Potential issue | 🟠 Major | ⚡ Quick winGate
execution_cachedandexecutedbefore mutatingactiveJob.These two handlers still write into the foreground job without checking
prompt_id/workflow_id, so a background workflow can mark nodes on the active workflow as cached/executed and skewnodesExecuted/executionProgress.Suggested fix
function handleExecutionCached(e: CustomEvent<ExecutionCachedWsMessage>) { - if (!activeJob.value) return + if ( + !activeJob.value || + !messageMatchesActiveWorkflow(e.detail.prompt_id, e.detail.workflow_id) + ) { + return + } for (const n of e.detail.nodes) { activeJob.value.nodes[n] = true } } function handleExecuted(e: CustomEvent<ExecutedWsMessage>) { - if (!activeJob.value) return + if ( + !activeJob.value || + !messageMatchesActiveWorkflow(e.detail.prompt_id, e.detail.workflow_id) + ) { + return + } activeJob.value.nodes[e.detail.node] = true }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/stores/executionStore.ts` around lines 273 - 292, The handlers handleExecutionCached and handleExecuted currently mutate activeJob without verifying the message belongs to the foreground workflow; modify both to first extract jobId (e.detail.prompt_id) and workflowId (e.detail.workflow_id) and call messageMatchesActiveWorkflow(jobId, workflowId) (after the existing activeJob.value guard); if it returns false return early, otherwise proceed to mutate activeJob.value.nodes as before. Ensure you reference the same symbols: handleExecutionCached, handleExecuted, messageMatchesActiveWorkflow, and use e.detail.prompt_id / e.detail.workflow_id for the check.
435-456:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
execution_errorstill clears the active workflow for background jobs.This handler writes
lastExecutionError/lastPromptErrorand callsresetExecutionState()unconditionally. If another workflow errors while the current tab is running, that background error will wipeactiveJobId,nodeProgressStates, and previews for the foreground workflow.Suggested fix
function handleExecutionError(e: CustomEvent<ExecutionErrorWsMessage>) { if (isCloud) { useTelemetry()?.trackExecutionError({ jobId: e.detail.prompt_id, nodeId: String(e.detail.node_id), nodeType: e.detail.node_type, error: e.detail.exception_message }) - // Cloud wraps validation errors (400) in exception_message as embedded JSON. - if (handleCloudValidationError(e.detail)) return + // Cloud wraps validation errors (400) in exception_message as embedded JSON. + if (handleCloudValidationError(e.detail)) return } + + if (!messageMatchesActiveWorkflow(e.detail.prompt_id, e.detail.workflow_id)) { + return + } // Service-level errors (e.g. "Job has stagnated") have no associated node. // Route them as job errors if (handleServiceLevelError(e.detail)) return🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/stores/executionStore.ts` around lines 435 - 456, handleExecutionError currently writes executionErrorStore.lastExecutionError and calls clearInitializationByJobId/resetExecutionState for every job error; change it to only mutate the active workflow state when the error's prompt_id matches the currently active job id (e.g., compare e.detail.prompt_id against the store's activeJobId or equivalent). For non-active/background jobs, avoid calling resetExecutionState and clearInitializationByJobId; instead record the error scoped to that job (e.g., a per-job map like lastExecutionErrorByJob[prompt_id] or lastPromptErrorByJob) or just return after telemetry/cloud validation handling so background errors don't wipe activeJobId, nodeProgressStates, or previews. Ensure handleExecutionError, executionErrorStore.lastExecutionError, clearInitializationByJobId, and resetExecutionState are the places you guard/replace.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/extensions/core/groupNode.ts`:
- Around line 1465-1471: The event handler created by handleEvent for
'executing' currently ignores legacy string payloads because the id-extractor
returns undefined for string details (breaking callers that dispatch string
payloads); update the second/third arguments passed to handleEvent so they
accept a string detail form: when the incoming detail (d) is a string, treat it
as the node id (return d from the id extractor and build the normalized payload
with node/display_node set to that id), and keep the existing object branch
intact; reference handleEvent, the 'executing' handler, getEvent(), and getId()
when locating where to add the string-aware branches.
In `@src/stores/executionStore.ts`:
- Around line 347-355: The current code only revokes previews when a node is
first seen (checking !previousForJob[nodeId]) which misses pending->running
transitions; update the loop in the isActiveWorkflowMessage branch to inspect
the previous state (previousForJob[nodeId]?.state) and revoke when
nodeState.state === 'running' and previousForJob[nodeId]?.state === 'pending' by
calling revokePreviewsByExecutionId(nodeId) from useNodeOutputStore, rather than
checking for absence of previousForJob.
---
Outside diff comments:
In `@src/stores/executionStore.ts`:
- Around line 273-292: The handlers handleExecutionCached and handleExecuted
currently mutate activeJob without verifying the message belongs to the
foreground workflow; modify both to first extract jobId (e.detail.prompt_id) and
workflowId (e.detail.workflow_id) and call messageMatchesActiveWorkflow(jobId,
workflowId) (after the existing activeJob.value guard); if it returns false
return early, otherwise proceed to mutate activeJob.value.nodes as before.
Ensure you reference the same symbols: handleExecutionCached, handleExecuted,
messageMatchesActiveWorkflow, and use e.detail.prompt_id / e.detail.workflow_id
for the check.
- Around line 435-456: handleExecutionError currently writes
executionErrorStore.lastExecutionError and calls
clearInitializationByJobId/resetExecutionState for every job error; change it to
only mutate the active workflow state when the error's prompt_id matches the
currently active job id (e.g., compare e.detail.prompt_id against the store's
activeJobId or equivalent). For non-active/background jobs, avoid calling
resetExecutionState and clearInitializationByJobId; instead record the error
scoped to that job (e.g., a per-job map like lastExecutionErrorByJob[prompt_id]
or lastPromptErrorByJob) or just return after telemetry/cloud validation
handling so background errors don't wipe activeJobId, nodeProgressStates, or
previews. Ensure handleExecutionError, executionErrorStore.lastExecutionError,
clearInitializationByJobId, and resetExecutionState are the places you
guard/replace.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c9cd62e1-b11a-40ba-beb9-2d3b3fee162f
📒 Files selected for processing (5)
src/extensions/core/groupNode.tssrc/schemas/apiSchema.tssrc/scripts/api.tssrc/stores/executionStore.test.tssrc/stores/executionStore.ts
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #11951 +/- ##
==========================================
+ Coverage 80.82% 82.42% +1.60%
==========================================
Files 2444 2032 -412
Lines 124795 117538 -7257
Branches 33024 29482 -3542
==========================================
- Hits 100869 96884 -3985
+ Misses 23423 20476 -2947
+ Partials 503 178 -325
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 417 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Addressed both outside-diff concerns in 7e75921:
Plus regression tests for execution_cached / executed / execution_error cross-workflow cases. 82 unit tests passing. |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/stores/executionStore.test.ts (2)
1399-1412: ⚡ Quick winMake this test hit the explicit active-workflow branch.
The new title says “belongs to active workflow”, but this payload still omits
workflow_idand the test never setsmockActiveWorkflow.current. Right now it only covers the legacy unresolved-ownership fallback, and it can even pass because earlier suites leave the hoisted workflow mock populated. Please set an active workflow in the test and sendworkflow_id: 'wf-active'here, then keep the missing-workflow_idfallback covered separately.As per coding guidelines, "Keep module mocks contained; do not use global mutable state within test files; use vi.hoisted() if necessary."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/stores/executionStore.test.ts` around lines 1399 - 1412, The test 'clears _executingNodeProgress when message belongs to active workflow' is not exercising the explicit active-workflow branch; set mockActiveWorkflow.current = { id: 'wf-active' } (or hoist via vi.hoisted() if needed) before firing events and include workflow_id: 'wf-active' in the executing event payload passed to fire, so the code path that compares workflow ownership on store._executingNodeProgress (and the executing handler) is hit; keep the existing legacy missing-workflow_id fallback covered in a separate test.
852-886: ⚡ Quick winAssert the non-active
execution_errorbookkeeping path too.This only proves the foreign error does not clear the active workflow state. The PR behavior also depends on
execution_errorstill seeding/updating per-job bookkeeping for the errored job; if that handler returned early before doing that work, this test would still pass. Please add an assertion for the non-active job’s own state here as well.As per coding guidelines, "Write tests for all changes, especially bug fixes to catch future regressions."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/stores/executionStore.test.ts` around lines 852 - 886, Add an assertion that the non-active job's bookkeeping was created/updated when the execution_error handler ran: after invoking the execution_error handler (the handler retrieved from apiEventHandlers.get('execution_error')), assert that the per-job record for prompt_id 'job-other' exists on the store and contains the error details (e.g., has exception_message 'oops' and/or exception_type 'RuntimeError' and/or a status/traceback entry). Locate the test's existing use of store and add an assertion like "expect(<store accessor for job-other>).toBeDefined()" and checks for the error fields so the test verifies bookkeeping for the errored job in addition to not clearing store.activeJobId.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/stores/executionStore.test.ts`:
- Around line 1399-1412: The test 'clears _executingNodeProgress when message
belongs to active workflow' is not exercising the explicit active-workflow
branch; set mockActiveWorkflow.current = { id: 'wf-active' } (or hoist via
vi.hoisted() if needed) before firing events and include workflow_id:
'wf-active' in the executing event payload passed to fire, so the code path that
compares workflow ownership on store._executingNodeProgress (and the executing
handler) is hit; keep the existing legacy missing-workflow_id fallback covered
in a separate test.
- Around line 852-886: Add an assertion that the non-active job's bookkeeping
was created/updated when the execution_error handler ran: after invoking the
execution_error handler (the handler retrieved from
apiEventHandlers.get('execution_error')), assert that the per-job record for
prompt_id 'job-other' exists on the store and contains the error details (e.g.,
has exception_message 'oops' and/or exception_type 'RuntimeError' and/or a
status/traceback entry). Locate the test's existing use of store and add an
assertion like "expect(<store accessor for job-other>).toBeDefined()" and checks
for the error fields so the test verifies bookkeeping for the errored job in
addition to not clearing store.activeJobId.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9f646894-5535-4679-8a26-7a73f4383013
📒 Files selected for processing (3)
src/extensions/core/groupNode.tssrc/stores/executionStore.test.tssrc/stores/executionStore.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/stores/executionStore.ts
|
Both nitpicks addressed in a67e3db:
|
|
Thanks for the self-review. All five findings remain "Accept" dispositions and don't need code changes here, but worth noting how they map to the split: Carried into #11951:
Specific to the closed PR (no longer applicable):
Closing this thread; continuing on #11951 (CodeRabbit-approved, 83 tests passing). |
christian-byrne
left a comment
There was a problem hiding this comment.
Automated review findings (2 issues, 5 suggestions)
Additional Review Findingsissue: Missing
|
There was a problem hiding this comment.
🧹 Nitpick comments (3)
src/stores/executionStore.test.ts (3)
1383-1387: 💤 Low valueRemove unnecessary type cast.
The double cast
as unknown as Set<string>is unnecessary sincenew Set(['job-1', 'job-2'])already infers asSet<string>.♻️ Proposed fix
- store.initializingJobIds = new Set([ - 'job-1', - 'job-2' - ]) as unknown as Set<string> + store.initializingJobIds = new Set(['job-1', 'job-2'])🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/stores/executionStore.test.ts` around lines 1383 - 1387, The test is casting the Set unnecessarily; replace the assignment to store.initializingJobIds so it directly uses new Set(['job-1','job-2']) instead of using "as unknown as Set<string>" (update the assignment to store.initializingJobIds = new Set(['job-1','job-2'])); if TypeScript complains, adjust the declaration/type of initializingJobIds or its mock to accept Set<string> so the explicit double-cast is not required.
1468-1477: ⚡ Quick winMissing test coverage for
initializingJobIdsclearing on execution_success.Per the PR objectives, the reviewer flagged that
handleExecutionSuccessmay be missing theclearInitializationByJobId(jobId)call. The current test does not verify thatinitializingJobIdsis cleared upon execution success, unlike theexecution_errortest (lines 877-915) which explicitly asserts this behavior.Consider adding a test case to verify this:
💚 Proposed test addition
it('clears initializing state for the completed job', () => { store.initializingJobIds = new Set(['job-1', 'job-2']) fire('execution_start', { prompt_id: 'job-1', timestamp: 0 }) fire('execution_success', { prompt_id: 'job-1', timestamp: 0 }) expect(store.initializingJobIds.has('job-1')).toBe(false) expect(store.initializingJobIds.has('job-2')).toBe(true) })🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/stores/executionStore.test.ts` around lines 1468 - 1477, The execution_success test is missing verification that initializingJobIds is cleared; update the 'execution_success' spec to assert that clearInitializationByJobId is invoked or that store.initializingJobIds no longer contains the completed job ID: set store.initializingJobIds to include 'job-1' and another id, call fire('execution_start', { prompt_id: 'job-1', ... }) then fire('execution_success', { prompt_id: 'job-1', ... }) and assert store.initializingJobIds.has('job-1') is false while the other id remains true (this ensures handleExecutionSuccess calls clearInitializationByJobId).
331-345: 💤 Low valueExtract duplicate
makeProgressNodeshelper to a shared scope.The
makeProgressNodeshelper is defined identically in both the "nodeProgressStatesByJob eviction" (lines 331-345) and "active workflow gating" (lines 459-473) describe blocks. Consider extracting it to a shared scope at the top of the file to reduce duplication.♻️ Proposed refactor
Move the helper to module scope near the top of the file (after line 36):
function makeProgressNodes( nodeId: string, jobId: string ): Record<string, NodeProgressState> { return { [nodeId]: { value: 5, max: 10, state: 'running', node_id: nodeId, prompt_id: jobId, display_node_id: nodeId } } }Then remove the duplicate definitions inside the describe blocks.
Also applies to: 459-473
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/stores/executionStore.test.ts` around lines 331 - 345, Extract the duplicate makeProgressNodes helper to module scope (e.g., just after the imports at the top of the test file) and export/define it once; remove the duplicate definitions inside the "nodeProgressStatesByJob eviction" and "active workflow gating" describe blocks and have those tests call the shared makeProgressNodes(nodeId, jobId) function instead. Ensure the function signature and returned shape remain identical (Record<string, NodeProgressState> with value, max, state, node_id, prompt_id, display_node_id) so existing tests using makeProgressNodes need no other changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/stores/executionStore.test.ts`:
- Around line 1383-1387: The test is casting the Set unnecessarily; replace the
assignment to store.initializingJobIds so it directly uses new
Set(['job-1','job-2']) instead of using "as unknown as Set<string>" (update the
assignment to store.initializingJobIds = new Set(['job-1','job-2'])); if
TypeScript complains, adjust the declaration/type of initializingJobIds or its
mock to accept Set<string> so the explicit double-cast is not required.
- Around line 1468-1477: The execution_success test is missing verification that
initializingJobIds is cleared; update the 'execution_success' spec to assert
that clearInitializationByJobId is invoked or that store.initializingJobIds no
longer contains the completed job ID: set store.initializingJobIds to include
'job-1' and another id, call fire('execution_start', { prompt_id: 'job-1', ...
}) then fire('execution_success', { prompt_id: 'job-1', ... }) and assert
store.initializingJobIds.has('job-1') is false while the other id remains true
(this ensures handleExecutionSuccess calls clearInitializationByJobId).
- Around line 331-345: Extract the duplicate makeProgressNodes helper to module
scope (e.g., just after the imports at the top of the test file) and
export/define it once; remove the duplicate definitions inside the
"nodeProgressStatesByJob eviction" and "active workflow gating" describe blocks
and have those tests call the shared makeProgressNodes(nodeId, jobId) function
instead. Ensure the function signature and returned shape remain identical
(Record<string, NodeProgressState> with value, max, state, node_id, prompt_id,
display_node_id) so existing tests using makeProgressNodes need no other
changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4ab9d265-b4d5-4c6e-9349-92c1a0ac097b
📒 Files selected for processing (2)
src/stores/executionStore.test.tssrc/stores/executionStore.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/stores/executionStore.ts
f8c3ea9 to
07283ce
Compare
|
Addressed CodeRabbit nitpicks in 4f7f8e7:
Skipping the Also responding to Christian's "non-blocking suggestions" comment 4424783992 separately — most are moot now that the |
|
@christian-byrne — disposition of your non-blocking suggestions list: Type safety
Code organization Test improvements (5, 6, 7) — All reasonable. Leaving as follow-up; duplication is contained to one file and the next PR will rework most of these tests. Performance The one blocking finding ( |
christian-byrne
left a comment
There was a problem hiding this comment.
Remaining Non-Blocking Suggestions (for future consideration)
Type Safety
-
as unknown as ExecutingWsMessagedouble-cast (src/extensions/core/groupNode.ts:1450)- Bypasses type safety; consider refactoring
getEvent()to return properly typed object
- Bypasses type safety; consider refactoring
-
prompt_id: ''in synthetic events (src/extensions/core/groupNode.ts:1471)- Empty string fails Map lookups, forcing fallback to
return true - Consider preserving original
prompt_idfrom incoming event if available
- Empty string fails Map lookups, forcing fallback to
Code Organization
-
Duplicated resolution logic in
handleProgressText(src/stores/executionStore.ts:600)- Duplicates ownership resolution check from
messageMatchesActiveWorkflow - Consider extracting "can resolve ownership" into the existing helper or returning
{ matches, wasResolved }
- Duplicates ownership resolution check from
-
Repetitive workflow-gating pattern (
src/stores/executionStore.ts:283-490)if (!messageMatchesActiveWorkflow(...)) returnrepeated in 10+ handlers- Consider decorator/wrapper or centralized pre-check layer
Test Improvements
-
Magic strings in tests (
src/stores/executionStore.test.ts)'wf-active','wf-other','job-1'repeated without constants- Consider
const WF_ACTIVE = 'wf-active'etc.
-
Duplicated test setup
mockActiveWorkflow.current = { activeState: { id: 'wf-active' }, ... }repeated 15+ times- Consider
setActiveWorkflow(id, path)helper
-
Duplicated handler retrieval pattern
const handler = apiEventHandlers.get(...); if (!handler) throwrepeated- Consider
getRequiredHandler(name)utility
Performance (micro-optimizations)
-
Object spread on every progress_state event (
src/stores/executionStore.ts:361){ ...nodeProgressStatesByJob.value, [jobId]: nodes }creates new object each time- Consider direct assignment for reduced GC pressure
-
Triple Map lookup in fallback path (
src/stores/executionStore.ts:399-409)- Sequential lookups when
workflow_idmissing - Consider caching resolution result for same job
- Sequential lookups when
|
All review comments have been addressed in commits
All checks pass locally: typecheck, lint, and 82/82 unit tests. |
|
Thanks for confirming. PR is ready for your final review/merge whenever you have a moment. |
christian-byrne
left a comment
There was a problem hiding this comment.
Please fix merge conflicts with latest main.
4f7f8e7 to
d25f9f9
Compare
|
Rebased onto latest
85 unit tests pass. |
|
Rebased onto latest On the failing E2E (
This appears to be either a pre-existing flake (note the long Happy to re-run CI on this rebase to see if the failure reproduces, but I don't see a code-path-level mechanism by which this PR could cause it. |
d25f9f9 to
1d14f13
Compare
When multiple workflow tabs are open and a job initiated from one tab sends progress messages, those messages can leak into the active tab's canvas because the global nodeProgressStates mirror, _executingNodeProgress, and progress_text preview state are written unconditionally. Add an optional workflow_id field to the WS schema for execution-related messages (progress, progress_state, executing, executed, progress_text, execution_start/success/cached/interrupted/error, NodeProgressState), and gate handleProgressState, handleProgress, and handleProgressText on whether the incoming message belongs to the currently active workflow. Resolution order for ownership: 1. workflow_id carried on the WS message (when backend supports it). 2. jobIdToWorkflowId mapping populated when the job was queued from this tab. 3. jobIdToSessionWorkflowPath mapping (path-based fallback). When ownership is unresolvable (e.g. job queued in a different browser session), the message is treated as belonging to the active workflow to preserve current single-tab behaviour. Per-job state (nodeProgressStatesByJob) is always written regardless of ownership so the source of truth covers every workflow's jobs. handleProgressText prefers the workflow gate over the legacy activeJobId guard when ownership can be resolved, since activeJobId is global and may point at a different workflow's job — falling through to the legacy guard only when ownership is genuinely unresolvable. 12 new unit tests cover workflow_id match/mismatch, both fallback resolution paths, default-to-legacy when unresolvable, no-active-workflow short-circuit, per-job state always updating, preview revocation gating, _executingNodeProgress gating, and progress_text gating. Eventual-consistency fallback for dropped terminal WebSocket messages will be addressed in a follow-up PR using a reactive watcher pattern rather than queue polling, per design discussion.
… workflow Extend the active-workflow gate to lifecycle events that previously operated globally: - handleExecutionStart: only adopts activeJobId / clears shared UI state when the starting job belongs to the active workflow. Per-job bookkeeping (queuedJobs, jobIdToSessionWorkflowPath, initialization clearing) still runs for every job. - handleExecutionSuccess / handleExecutionInterrupted: only call resetExecutionState when the terminating job belongs to the active workflow. Initialization clearing for the terminated job still runs. - handleExecuting: now receives the full ExecutingWsMessage from the api dispatcher (instead of just NodeId) and gates _executingNodeProgress clearing on workflow ownership. To support handleExecuting gating, drop the ApiToEventType override that narrowed the executing event to NodeId, forward the full payload through api.dispatchCustomEvent, and update the groupNode forwarding wrapper to extract display_node/node from the new object detail and synthesise a matching ExecutingWsMessage when re-dispatching. 5 new tests cover the cross-workflow cases: execution_start from a non-active workflow does not steal activeJobId, execution_success and execution_interrupted from a non-active workflow do not clear the active job's state, executing from a non-active workflow does not clear _executingNodeProgress, and execution_start from the active workflow still adopts activeJobId. Eventual-consistency cleanup of non-active terminal jobs (which used to be handled by the dropped polling/eviction code) will be implemented in a follow-up PR using a reactive watcher pattern over a derived finishedJobs set.
…sitions Three handlers and one revocation rule were missed in the first gating pass and could still let a non-active workflow's events bleed into the active workflow's UI: - handleExecutionCached and handleExecuted mutated activeJob.value.nodes unconditionally, skewing executionProgress / nodesExecuted on the visible workflow when a background workflow emitted those events. - handleExecutionError, handleServiceLevelError and handleCloudValidationError called resetExecutionState and wrote executionErrorStore.* unconditionally, meaning a background error wiped activeJobId and node progress for the visible workflow. Initialization clearing for the errored job still runs in every case. - handleProgressState revoked previews only when a node was first seen (!previousForJob[nodeId]). Once progress_state begins emitting pending entries that node is already 'seen', so the pending->running transition never revoked. Switch to checking previous state. groupNode forwarder: reinstate the legacy string detail path in the 'executing' id-extractor so callers still dispatching the pre-change string payload keep bubbling execution up to the group node. 4 new unit tests cover: execution_cached gated, executed gated, execution_error gated, and pending->running preview revocation.
Address two coverage nitpicks from review: - The 'executing clears _executingNodeProgress' test in the WebSocket-event-handlers suite did not reset mockActiveWorkflow.current in beforeEach and did not pass workflow_id, so it relied on the hoisted mock leaking from earlier suites and only ever exercised the unresolvable-ownership fallback. Reset the mock per-test, set an active workflow explicitly with workflow_id: 'wf-active', and add a separate test for the legacy unresolvable-ownership fallback. - The 'execution_error from a non-active workflow' test only proved the active job's state was untouched. It now also asserts the errored job's initializing flag is cleared (the per-job bookkeeping that runs unconditionally) and that executionErrorStore.lastExecutionError stays null (proving the global gate held).
…g leak
Revert the 'executing' WS event payload back to the legacy
NodeId-only shape so extensions consuming api.addEventListener('executing')
keep working. The extension ecosystem (40+ custom node repos per
AGENTS.md) accesses e.detail directly as a string, and the marginal
workflow gating we added on handleExecuting did not justify the
breaking change.
Drop the corresponding gate in handleExecuting and the groupNode
forwarding-wrapper changes that depended on the object payload. The
gating on progress, progress_state, progress_text, execution_start,
execution_success, execution_interrupted, execution_error, execution_cached,
and executed remains intact (those events carry prompt_id and workflow_id
natively in their WS payload).
Additional fixes from review:
- handleExecutionSuccess now calls clearInitializationByJobId(jobId)
before the workflow gate so a non-active workflow job's initializing
flag still clears, matching handleExecutionInterrupted and
handleExecutionError.
- Extract canResolveWorkflowOwnership helper and reuse it in
handleProgressText to remove the duplicated resolution check.
…t timing - ApiToEventType 'executing' narrows to SerializedNodeId | null (not the branded NodeId, which the raw dispatchCustomEvent call site can't satisfy) - handleExecuting drops the duplicate 'delete queuedJobs' leak-fix that collided with resetExecutionState's existing per-jobId cleanup and fired on every mid-run 'executing: null' transition instead of only on completion - active-workflow-gating tests advance fake timers past the RAF coalescer batching progress/progress_state now go through - execution_error-from-non-active-workflow test updated: recordExecutionError runs unconditionally for diagnostics; only the active-tab UI reset is gated - drop unused mockNodeExecutionIdToNodeLocatorId mock and redundant vi.clearAllMocks() (project setup already resets mocks)
1d14f13 to
8bd9f0b
Compare
|
Rebased onto Conflicts resolved in
Verified: |
|
Superseded by #20050, which reworks this onto current Closing in favour of that one. |
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.
…y-Org#22013) ## Summary Uses the websocket contract Comfy-Org/ComfyUI#16763 and Comfy-Org#16809 shipped, which the frontend never adopted: `queuePrompt` sent no `workflow_metadata`, so the server had nothing to stamp beyond the id inside `extra_pnginfo`. This sends it, reads what comes back, and uses it to place a job that no per-tab mapping knows about. Replaces Comfy-Org#20045. Comfy-Org#21666 landed the instance-keyed gate for the Agent while that PR was in review, so the headline cross-tab fix is already on main. What was left is here, rebuilt on top of it. ## Changes - `queuePrompt` sends `workflow_metadata: { workflow_id }`, and the stamped id is forwarded to the gate from `execution_start`, `progress_state`, the `executed` listener, and the binary preview header, whose decoder was dropping it. - The ownership gate — now `rememberStampAndCheckActiveWorkflow`, named for the per-job stamp it records — gains two legs below `instanceId`: the session path, then the frame's own workflow id. The graph id is the weakest leg on purpose, because every copy of a workflow shares it, so copy-paste into a new tab gives two tabs one id and keying on it first makes each match the other's jobs. - The all-zero UUID is discarded rather than compared, on both sides. It is `LGraph._id`'s default and the codebase reads it as "no id yet", so comparing it as a real id matched nothing and rejected a fresh graph's own frames. - `forgetFinishedJobs` releases the tab's workflow status. Only a terminal frame cleared it, so a job that ended without one left the badge claiming the tab was running for the rest of the session. It releases an orphaned Running badge only: a workflow whose newer job already completed keeps its Completed or Failed badge when an older unreadable job is forgotten. - ADR-EXECUTION-ROUTING-0049 records the resolution order and that the unresolvable-frame fallback departs from ADR-GRAPH-DOCUMENT-0026 D2, with the condition for removing the exception. ## Review focus - **Comfy-Org#21666's gate had no unit coverage**, and the existing `executionStore` fixtures carry no `instanceId`, so nothing exercised the instance leg. `executionStore.workflowOwnership.test.ts` covers it first, so the behaviour this builds on is pinned before anything is added to it. - **The unresolvable fallback is the weakest point.** It is narrower than permissive, since a foreign job's unresolvable frame is dropped while another job is active, but with two tabs open and a frame unresolvable it can still land on the wrong one. The ADR says so. - **`progress_text` is still unattributable on current core.** Core packs it as a binary frame `send_sync` cannot stamp, and the frontend decodes a job id out of it only under `supports_progress_text_metadata`, which no core version sets — so the gate is called with no job id and returns before any stamp lookup. Comfy-Org/ComfyUI#16887 is what unblocks the leg. ## Tests Every change is verified by mutation: the fix reverted and the test confirmed to fail. Each wire boundary falsifies on its own — dropping the `workflow_metadata` spread fails the request rows, dropping the `!== zeroUuid` guard fails the sentinel row, removing `workflowId` from the type-4 decoder fails the preview decode, and removing either app forwarding argument fails the unmapped-routing case. Removing the instance comparison fails the shared-graph case, the path leg two, the workflow-id leg one, and the status release one. Store, request and decoder coverage lives in `executionStore.workflowOwnership.test.ts`, `executionStore.terminalRecovery.test.ts`, `api.queuePrompt.test.ts`, `api.previewMetadata.test.ts` and `app.test.ts`. `typecheck:app`, `typecheck:browser` and the `fallow` audit gate are clean, with 0 introduced findings of any kind. Both store suites register tabs through `workflowStore.attachWorkflow` rather than assigning `openWorkflows`, because `applyWorkflowStatus` refuses to record a status for a workflow the real `isOpen` does not consider open. Assigning the computed made the premise silently false. `browser_tests/tests/wsReconnectStaleJob.spec.ts` carries the black-box regression for the status release. It strands one unreadable job on each of two workflows — one of them the workflow's only job, the other alongside a live sibling — and uses the orphaned workflow's badge disappearing as the cleanup barrier before asserting the sibling's badge survives, because the detail-request counters move before the responses are fulfilled and cannot establish completion. Verified three ways on `--project=chromium`: 6/6 green on the repair and 3/3 on `--repeat-each=3`; failing at the barrier when cleanup is prevented from running, so the barrier is not vacuous; and failing at the sibling assertion under the pre-Comfy-Org#22013 clear ordering. Comfy-Org#20700 still covers replacing the remaining scripted reconnect specs with real-backend tests. ## Sibling overlap Overlaps Comfy-Org#20982 (draft) at `packages/api-client/src/ComfyApi.ts`, where both add a different member to the same `BackendApiCalls` interface: that PR an `agent_status` entry, this one `workflowId` on the existing `b_preview_with_metadata` entry. No shared behaviour or symbol. **Comfy-Org#11951 conflicts on policy, not on text.** It proposes a `messageMatchesActiveWorkflow` resolver that consults the frame's workflow id ahead of session ownership — the inverse of the order decided here, and the order that makes two tabs sharing one copied graph id match each other's jobs. Its resolver is superseded; remaining work there should be carried onto this gate rather than restoring the id-first policy during integration. Recorded in ADR-EXECUTION-ROUTING-0049 under the rejected alternatives. Needs a human call rather than being settled by this PR. **Comfy-Org#22186 landed first, and this branch carried the contracts across.** It merged 2026-10-30 (`d9290b0`), moving the API and execution contracts into `packages/api-client`. The merge of `main` at `24b64d62` relocated this PR's request field, preview decoding and stamped types into `packages/api-client/src/ComfyApi.ts` and `packages/api-client/src/executionTypes.ts`. The relocation is content-identical: comparing this PR's own diff before the merge (`9facf6c7`..`a8e25943`) against after it (`1bbea48f`..`24b64d62`), the entire changed-line delta is two lines out and six in, all in `api.previewMetadata.test.ts` — the `ComfyApi` import path and the constructor options the package now requires. No production line changed. **Comfy-Org#22271 (open) overlaps on ownership policy.** It adds an unconditional `detail.workflow_id !== this.rootGraph.id` rejection after the output ownership check, which can reject a job this PR's stronger instance/path identity accepts, and treats the all-zero UUID as a real identity rather than the "no id yet" default this PR discards. Its remaining coverage should be carried onto this PR's single ownership decision rather than kept as an independent guard. Same class of conflict as Comfy-Org#11951, and the same kind of human call. Proposed order is this PR first, since Comfy-Org#20982 is a draft that has not moved since 2026-10-18, then a one-line rebase there. Reversed is equally cheap: this branch would merge main and re-add its line. ## Derivation, and the control that it is load-bearing `workflow_metadata` is no longer hand-declared. Comfy-Org#22426 is on `main`, so both wire types now come from `@comfyorg/comfyui-api-types`, which generates core's `PromptRequest` from `openapi.yaml` pinned at `4281eb0a14`: ```ts // request — the spec's map narrowed to the one key this client sends workflow_metadata?: Pick<PromptWorkflowMetadata, 'workflow_id'> // frame — the map's VALUE type, not the map type StampedWorkflowId = { workflow_id?: PromptWorkflowMetadata[string] } ``` Core's spec defines no websocket frame schemas. It documents that `workflow_metadata` is echoed onto every JSON frame carrying a `prompt_id`, so the frame field is that request contract read back. The frame carries the map's contents merged into the frame object, which is why the value type is what transfers — a `Pick` or `Partial` of the map would describe the wrong shape here even though it would compile. The dependency is on `packages/api-client`, not the app, since `ComfyApi` builds the body. ### Verification Evidence **1. Delete the member from the pinned spec, regenerate — `pnpm typecheck` fails.** ``` packages/comfyui-api-types/src/index.ts(9,29): error TS2339: Property 'workflow_metadata' does not exist on type 'PromptRequest'. ``` Restored: spec hash back to `8f0da854…`, `check:generated` 0, `typecheck` 0. **2. That is not sufficient on its own.** The error above surfaces at the package's own alias — the first link in the chain — so it does not show that consumers are tied to the spec. Isolating them: retype the spec's value to `integer` *and* relax the package's `Record<string, string>` constraint, leaving consumers as the only thing that can fail. The retype reaches real call sites: ``` src/stores/executionStore.ts(592,38): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'string | undefined'. src/stores/executionStore.ts(593,55): error TS2345: … src/stores/executionStore.ts(752,64): error TS2345: … src/scripts/app.ts(782,11): error TS2345: … ``` Both controls reverted. Gates after restore: `typecheck` 0, `typecheck:browser` 0, `oxlint --type-aware` on both changed files 0 (verified scanning — an injected `no-explicit-any` is reported), 239 `packages/api-client` tests passing. `main` was merged rather than rebased, so existing review anchors are preserved.
PR Created by the Glary-Bot Agent
Replaces #11866 (will be closed) per Christian's review request to split that PR. This is the gating-only half. The eventual-consistency fallback for dropped terminal WebSocket messages will land in a separate follow-up PR using a reactive watcher pattern (per Christian's design feedback in #11866 (comment)) rather than queue polling.
Summary
When multiple workflow tabs are open and a job initiated from one tab sends WS messages, those messages can leak into the active tab's canvas because the global
nodeProgressStatesmirror,_executingNodeProgress,activeJobId, andprogress_textpreview state are all written unconditionally. This PR adds an optionalworkflow_idfield to the WS schema and gates every execution-related WS handler on whether the incoming message belongs to the currently active workflow.Changes
Schema (
apiSchema.ts): adds optionalworkflow_idtoprogress,progress_state,executing,executed,progress_text,execution_start,execution_success,execution_cached,execution_interrupted,execution_error, and toNodeProgressState. Optional so the schema is correct both before and after the Cloud deploy that adds the field.Active-workflow gate (
executionStore.ts):messageMatchesActiveWorkflow(jobId, workflowId)helper. Resolution order:workflow_idon message →jobIdToWorkflowIdmapping →jobIdToSessionWorkflowPathmapping → fall through to active when unresolvable (preserves single-tab behaviour).handleProgressState— gate writes tonodeProgressStates,_executingNodeProgress, andrevokePreviewsByExecutionIdcalls. Per-job state (nodeProgressStatesByJob) always written.handleProgress— gate_executingNodeProgress.handleProgressText— prefer the workflow gate over the legacyactiveJobIdguard when ownership can be resolved.handleExecutionStart— only adoptactiveJobId/ clear shared UI state when the starting job belongs to the active workflow. Per-job bookkeeping always runs.handleExecutionSuccess/handleExecutionInterrupted— only callresetExecutionStatewhen the terminating job belongs to the active workflow.handleExecuting— now receives the fullExecutingWsMessageand gates_executingNodeProgressclearing on ownership.API plumbing (
api.ts): drop theApiToEventTypeoverride that narrowedexecutingtoNodeId, and forward the fullExecutingWsMessagepayload throughdispatchCustomEventso downstream consumers can apply the gate.Group node forwarding (
groupNode.ts): the existingexecutingre-dispatch path was written for the old detail-as-string shape; updated to extractdisplay_node || nodefrom the object detail and re-emit a matchingExecutingWsMessage.Tests
17 unit tests in
executionStore.test.tscovering every gate point:progress_state: per-job state always updates; mirror only when active; preview revocation only when active; both fallback resolution paths; no-active-workflow short-circuit.progress:_executingNodeProgressonly when workflow matches.progress_text: skipped on workflow mismatch, forwarded on match, falls back toactiveJobIdonly when ownership unresolvable.execution_start: from a non-active workflow does not stealactiveJobId; from the active workflow adopts it.execution_success/execution_interrupted: from a non-active workflow do not clear the active job's state.executing: from a non-active workflow does not clear_executingNodeProgress.pnpm test:unit src/stores/executionStore.test.ts→ 78 passed.pnpm typecheck,pnpm lint,pnpm format→ clean.Out of scope (follow-ups)
finishedJobsref off the queue/history store, evict per-job state on first appearance) rather than imperative queue polling.workflow_idpropagation in core ComfyUI — tracked in BE-672.nodeProgressStatesByJob[activeJobId]. The gate already prevents leakage at every WS write seam.┆Issue is synchronized with this Notion page by Unito