Repository navigation
[backport cloud/1.58] fix(agent): keep an unopened unsaved tab when the workflow picker saves it (FRONT-3774) - #22819
Conversation
…ve or its first load (#22649) ## Summary Two ways an unsaved tab's draft could be deleted while the tab was still unsaved. Both showed up in release QA case C-163 (stagingcloud 1.59.3), where picking an unopened unsaved tab in the Agent's workflow picker after a reload deleted that tab's draft, and the next reload lost the tab. 1. **Moving a draft onto its own path deleted it.** `moveDraft` writes the payload under the new key, then deletes the old key. When the path does not change, both keys are the same, so the draft is deleted. Saving an unsaved tab under its current name hits this, because `saveWorkflowAs` renames it to the same path before saving. Now a same-key move only updates the index. 2. **A restored unsaved tab's first load deleted its draft.** A reload rebuilds each unsaved tab from its draft but gives the tab the current time. The first `load()` then sees the draft as older than the tab and removes it as stale. Opening the tab normally writes the draft again, but a load without a canvas switch (the Agent picker) leaves the tab with no draft. The restored tab now gets the draft's own time. This applies only to a tab created at the draft's own path from a draft with a valid id, never to a workflow that `createTemporary` reused. Linear: [FRONT-3774](https://linear.app/comfyorg/issue/FRONT-3774). The Agent picker side (loading the tab before saving it) is #22648. Merge this before #22648. Not a 1.59 regression: the same code is on every current train (1.56 to 1.59). ## Verification - `workflowDraftStoreV2.test.ts` "keeps the draft when moved onto its own path": red on `main` (`getDraft` returns null), green with the fix. - `useWorkflowPersistenceV2.test.ts` "keeps the draft of an unsaved background tab when it is first loaded": red on `main` (draft gone after `load()`), green with the fix. "leaves a reused workflow outside the workflows folder unstamped" is red without the path guard. All 42 tests in the file pass, and all 25 in `workflowDraftStoreV2.test.ts`. - Human QA after deploy: repeat the C-163 steps on stagingcloud. Expected: after the pick and another reload, the tab and its contents are still there. (cherry picked from commit 9580dff)
…aves it (#22648) After a reload, unsaved tabs that have not been opened yet stay unloaded. Picking one in the Agent's workflow picker saved it before loading it, so the pick failed with "Save failed · Cannot save workflow 'workflows/<tab name>.json' before it is loaded" and the chat did not switch. The picker now loads an unloaded tab with a new `workflowService.loadWorkflowInBackground` before saving it, so the pick succeeds. The helper loads through the serialized load queue and sets the tab's app/graph mode the way opening it would (so an app is saved as `.app.json`). It does not switch the canvas, so a reference pick leaves the visible workflow alone. The unsaved check runs again right before the save, so a tab saved meanwhile is not saved twice. Found in release QA case C-163 on stagingcloud 1.59.3. Linear: [FRONT-3774](https://linear.app/comfyorg/issue/FRONT-3774). **Merge order:** merge #22649 first. It fixes the draft being deleted (on a same-path save and on a restored tab's first load); without it, a failed save here would still lose the restored tab's draft. Not a 1.59 regression: the same code is on every current train (1.56 to 1.59). - Unit: `useAgentWorkflowSelection.test.ts` "loads an unsaved tab a reload left unopened before saving it". Red on `main` with the reported toast text, green with the fix. Plus "does not save a second copy when loading the tab finds it already saved" and "keeps the visible workflow when an unopened unsaved tab is picked as a reference" (red on the earlier open-first version). All 31 tests pass. `workflowService.test.ts` pins the helper's mode for `linearMode` true and false (151 pass), and all 573 in `AgentPanelRoot.test.ts`. The panel test's mock tabs now report `isLoaded: true`, matching a real workflow with a change tracker. - Browser (`@cloud`): `agentWorkflowSelection.spec.ts` "picks an unsaved tab a reload left unopened" follows the QA steps: two unsaved tabs, a Note node in the first, reload, check the first tab is restored unloaded, pick it. It then checks the picker switches, no "Save failed" toast shows, and the saved file contains the Note node. Runs in CI. - Human QA after deploy: repeat the C-163 steps on stagingcloud. Expected: the chat switches to the picked tab and no "Save failed" toast appears. (cherry picked from commit 816ea98)
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords: 2
Please check the settings in the CodeRabbit UI or the
|
📦 Bundle: ⏳ Size data collection in progress…⚡ Performance: ❌ 7 below 52 FPS target · ℹ️ No baseline — significance unavailable
DetailsScenario timings
Absolute values
Raw data{
"timestamp": "2026-11-03T14:40:21.749Z",
"gitSha": "3573c566c917271049051b4f2307b59d6dd7563f",
"branch": "backport-22648-to-cloud-1.58",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2051.7300000000205,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.412,
"layouts": 8,
"layoutDurationMs": 2.112,
"taskDurationMs": 575.6840000000001,
"heapDeltaBytes": 501288,
"heapUsedBytes": 88309516,
"domNodes": -200,
"jsHeapTotalBytes": -2031616,
"scriptDurationMs": 9.474,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2055.2449999999567,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.259000000000001,
"layouts": 10,
"layoutDurationMs": 2.9720000000000004,
"taskDurationMs": 675.9340000000001,
"heapDeltaBytes": 2894820,
"heapUsedBytes": 90429504,
"domNodes": -180,
"jsHeapTotalBytes": -2293760,
"scriptDurationMs": 13.188999999999997,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1775.4059999999754,
"styleRecalcs": 76,
"styleRecalcDurationMs": 12.63,
"layouts": 9,
"layoutDurationMs": 2.5589999999999997,
"taskDurationMs": 897.145,
"heapDeltaBytes": -5639576,
"heapUsedBytes": 98144620,
"domNodes": 0,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 166.305,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66603773584906,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1758.4279999999808,
"styleRecalcs": 73,
"styleRecalcDurationMs": 13.474,
"layouts": 8,
"layoutDurationMs": 2.363,
"taskDurationMs": 846.352,
"heapDeltaBytes": -437620,
"heapUsedBytes": 89044712,
"domNodes": -200,
"jsHeapTotalBytes": 851968,
"scriptDurationMs": 171.995,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666037735849056,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1703.726999999958,
"styleRecalcs": 19,
"styleRecalcDurationMs": 5.385,
"layouts": 11,
"layoutDurationMs": 2.993,
"taskDurationMs": 298.61299999999994,
"heapDeltaBytes": 21583772,
"heapUsedBytes": 109446520,
"domNodes": 47,
"jsHeapTotalBytes": 2883584,
"scriptDurationMs": 12.273000000000003,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1780.8790000000272,
"styleRecalcs": 19,
"styleRecalcDurationMs": 5.566,
"layouts": 10,
"layoutDurationMs": 2.689,
"taskDurationMs": 461.421,
"heapDeltaBytes": 21593800,
"heapUsedBytes": 109507560,
"domNodes": 47,
"jsHeapTotalBytes": 2883584,
"scriptDurationMs": 13.116,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66635514018692,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 626.4150000000086,
"styleRecalcs": 13,
"styleRecalcDurationMs": 2.9840000000000004,
"layouts": 9,
"layoutDurationMs": 2.4989999999999997,
"taskDurationMs": 461.162,
"heapDeltaBytes": 614560,
"heapUsedBytes": 88565576,
"domNodes": 0,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 175.04500000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664864864864864,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 680.5249999999887,
"styleRecalcs": 13,
"styleRecalcDurationMs": 2.9769999999999994,
"layouts": 9,
"layoutDurationMs": 2.7050000000000005,
"taskDurationMs": 471.704,
"heapDeltaBytes": 252768,
"heapUsedBytes": 87834704,
"domNodes": 0,
"jsHeapTotalBytes": 2883584,
"scriptDurationMs": 178.356,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.092307692307678,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1227.1459999999763,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 962.0070000000001,
"heapDeltaBytes": -9724252,
"heapUsedBytes": 102231556,
"domNodes": -230,
"jsHeapTotalBytes": 14229504,
"scriptDurationMs": 71.141,
"eventListeners": -168,
"totalBlockingTimeMs": 556,
"frameDurationMs": 33.32972972972973,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1350.7960000000026,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1086.36,
"heapDeltaBytes": -16838456,
"heapUsedBytes": 102221784,
"domNodes": -210,
"jsHeapTotalBytes": 17453056,
"scriptDurationMs": 84.30100000000002,
"eventListeners": -168,
"totalBlockingTimeMs": 639,
"frameDurationMs": 35.52368421052633,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 856.4740000000199,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 455.53699999999964,
"heapDeltaBytes": -3731176,
"heapUsedBytes": 97719284,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 162.63099999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 229,
"frameDurationMs": 25.49117647058823,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 867.6649999999881,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 487.8689999999999,
"heapDeltaBytes": -2305904,
"heapUsedBytes": 99005688,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 173.32400000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 227,
"frameDurationMs": 24.762857142857136,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10281.680000000022,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9437.252,
"heapDeltaBytes": 8873916,
"heapUsedBytes": 129956108,
"domNodes": -296,
"jsHeapTotalBytes": 30998528,
"scriptDurationMs": 7386.73,
"eventListeners": -130,
"totalBlockingTimeMs": 847,
"frameDurationMs": 31.066163141993957,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11000.973999999986,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10182.312999999998,
"heapDeltaBytes": 46394632,
"heapUsedBytes": 150465744,
"domNodes": -276,
"jsHeapTotalBytes": 37105664,
"scriptDurationMs": 8219.709,
"eventListeners": -130,
"totalBlockingTimeMs": 1134,
"frameDurationMs": 31.42714285714286,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10702.409999999985,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9888.438,
"heapDeltaBytes": 14048264,
"heapUsedBytes": 135523932,
"domNodes": -296,
"jsHeapTotalBytes": 39911424,
"scriptDurationMs": 7996.390999999999,
"eventListeners": -130,
"totalBlockingTimeMs": 1015,
"frameDurationMs": 31.74925816023739,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10844.562999999995,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10032.027,
"heapDeltaBytes": 53129740,
"heapUsedBytes": 155790636,
"domNodes": -277,
"jsHeapTotalBytes": 44105728,
"scriptDurationMs": 8437.561,
"eventListeners": -130,
"totalBlockingTimeMs": 1258,
"frameDurationMs": 32.0047197640118,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "large-combo-open",
"durationMs": 220.704000000012,
"styleRecalcs": 24,
"styleRecalcDurationMs": 14.494,
"layouts": 11,
"layoutDurationMs": 3.5349999999999997,
"taskDurationMs": 160.405,
"heapDeltaBytes": 13251180,
"heapUsedBytes": 116104196,
"domNodes": 917,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 8.418999999999997,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.670000000000073,
"p95FrameDurationMs": 66.59999999999945
},
{
"name": "large-combo-open",
"durationMs": 233.271000000002,
"styleRecalcs": 25,
"styleRecalcDurationMs": 15.537999999999998,
"layouts": 12,
"layoutDurationMs": 3.7060000000000004,
"taskDurationMs": 172.47700000000003,
"heapDeltaBytes": 13252716,
"heapUsedBytes": 115740988,
"domNodes": 917,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 9.204000000000002,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.209090909090843,
"p95FrameDurationMs": 66.69999999999982
},
{
"name": "large-graph-idle",
"durationMs": 2054.479999999984,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.177,
"layouts": 7,
"layoutDurationMs": 1.9870000000000005,
"taskDurationMs": 505.6649999999999,
"heapDeltaBytes": 849480,
"heapUsedBytes": 102961344,
"domNodes": -296,
"jsHeapTotalBytes": -1245184,
"scriptDurationMs": 35.632000000000005,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2052.404999999908,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.7859999999999996,
"layouts": 8,
"layoutDurationMs": 2.934,
"taskDurationMs": 724.3739999999999,
"heapDeltaBytes": 1642376,
"heapUsedBytes": 103041160,
"domNodes": -276,
"jsHeapTotalBytes": -6225920,
"scriptDurationMs": 36.035000000000004,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2229.241000000002,
"styleRecalcs": 67,
"styleRecalcDurationMs": 8.018999999999998,
"layouts": 6,
"layoutDurationMs": 1.496,
"taskDurationMs": 1496.2589999999998,
"heapDeltaBytes": 2270640,
"heapUsedBytes": 104793804,
"domNodes": -296,
"jsHeapTotalBytes": -233472,
"scriptDurationMs": 801.172,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66616541353383,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2715.0389999999334,
"styleRecalcs": 68,
"styleRecalcDurationMs": 9.071,
"layouts": 7,
"layoutDurationMs": 1.7259999999999998,
"taskDurationMs": 1776.653,
"heapDeltaBytes": -7899164,
"heapUsedBytes": 98601552,
"domNodes": -296,
"jsHeapTotalBytes": -1990656,
"scriptDurationMs": 813.991,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.769135802469133,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3901.6530000000103,
"styleRecalcs": 71,
"styleRecalcDurationMs": 9.961,
"layouts": 64,
"layoutDurationMs": 10.993,
"taskDurationMs": 1853.0659999999998,
"heapDeltaBytes": 5283344,
"heapUsedBytes": 112518184,
"domNodes": -252,
"jsHeapTotalBytes": 13643776,
"scriptDurationMs": 790.472,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66581196581197,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3607.7360000000454,
"styleRecalcs": 71,
"styleRecalcDurationMs": 9.736999999999998,
"layouts": 65,
"layoutDurationMs": 10.96,
"taskDurationMs": 1677.005,
"heapDeltaBytes": -19476876,
"heapUsedBytes": 91326696,
"domNodes": -272,
"jsHeapTotalBytes": -1560576,
"scriptDurationMs": 793.2529999999999,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.743255813953486,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3235.377000000028,
"styleRecalcs": 43,
"styleRecalcDurationMs": 5.012999999999999,
"layouts": 4,
"layoutDurationMs": 1.206,
"taskDurationMs": 2115.3849999999998,
"heapDeltaBytes": -13690176,
"heapUsedBytes": 98951736,
"domNodes": 0,
"jsHeapTotalBytes": 19111936,
"scriptDurationMs": 1005.5020000000001,
"eventListeners": 182,
"totalBlockingTimeMs": 25,
"frameDurationMs": 17.014659685863876,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3161.192999999912,
"styleRecalcs": 42,
"styleRecalcDurationMs": 5.0009999999999994,
"layouts": 3,
"layoutDurationMs": 0.98,
"taskDurationMs": 2055.83,
"heapDeltaBytes": -10820588,
"heapUsedBytes": 91447164,
"domNodes": 0,
"jsHeapTotalBytes": -2072576,
"scriptDurationMs": 1009.754,
"eventListeners": 182,
"totalBlockingTimeMs": 24,
"frameDurationMs": 17.300543478260867,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2034.5869999999877,
"styleRecalcs": 6,
"styleRecalcDurationMs": 1.9359999999999993,
"layouts": 6,
"layoutDurationMs": 1.748,
"taskDurationMs": 519.1250000000001,
"heapDeltaBytes": 2616364,
"heapUsedBytes": 105117080,
"domNodes": -276,
"jsHeapTotalBytes": -6750208,
"scriptDurationMs": 35.236000000000004,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2047.729000000004,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.504,
"layouts": 7,
"layoutDurationMs": 2.5030000000000006,
"taskDurationMs": 509.05199999999996,
"heapDeltaBytes": -13955200,
"heapUsedBytes": 94202404,
"domNodes": -296,
"jsHeapTotalBytes": -2478080,
"scriptDurationMs": 32.01800000000001,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 548.6319999999978,
"styleRecalcs": 47,
"styleRecalcDurationMs": 5.703,
"layouts": 10,
"layoutDurationMs": 2.901,
"taskDurationMs": 381.994,
"heapDeltaBytes": 25230848,
"heapUsedBytes": 114673904,
"domNodes": 0,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 145.56999999999996,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666682,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 559.0740000000096,
"styleRecalcs": 47,
"styleRecalcDurationMs": 5.207000000000001,
"layouts": 9,
"layoutDurationMs": 2.666,
"taskDurationMs": 379.528,
"heapDeltaBytes": 22517108,
"heapUsedBytes": 112976164,
"domNodes": 0,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 146.90800000000002,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66470588235295,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2023.0230000000233,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.111,
"layouts": 9,
"layoutDurationMs": 2.8729999999999998,
"taskDurationMs": 434.04900000000004,
"heapDeltaBytes": 8367604,
"heapUsedBytes": 97871132,
"domNodes": -198,
"jsHeapTotalBytes": -3342336,
"scriptDurationMs": 9.953,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2055.3859999999986,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.574,
"layouts": 11,
"layoutDurationMs": 3.62,
"taskDurationMs": 617.715,
"heapDeltaBytes": 350380,
"heapUsedBytes": 90355848,
"domNodes": -218,
"jsHeapTotalBytes": -2031616,
"scriptDurationMs": 9.269,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1993.251000000015,
"styleRecalcs": 87,
"styleRecalcDurationMs": 14.815000000000001,
"layouts": 9,
"layoutDurationMs": 2.603,
"taskDurationMs": 972.6940000000001,
"heapDeltaBytes": -1387296,
"heapUsedBytes": 88063420,
"domNodes": -211,
"jsHeapTotalBytes": -2031616,
"scriptDurationMs": 114.79299999999999,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 2009.9500000000035,
"styleRecalcs": 86,
"styleRecalcDurationMs": 16.098000000000003,
"layouts": 9,
"layoutDurationMs": 3.1719999999999997,
"taskDurationMs": 1170.9959999999999,
"heapDeltaBytes": 12461400,
"heapUsedBytes": 105228404,
"domNodes": -218,
"jsHeapTotalBytes": 8007680,
"scriptDurationMs": 123.936,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1452.7610000000095,
"styleRecalcs": 19,
"styleRecalcDurationMs": 25.263,
"layouts": 5,
"layoutDurationMs": 16.431,
"taskDurationMs": 1094.66,
"heapDeltaBytes": 11597008,
"heapUsedBytes": 133203076,
"domNodes": 16030,
"jsHeapTotalBytes": 16654336,
"scriptDurationMs": 31.183999999999997,
"eventListeners": 3244,
"totalBlockingTimeMs": 169,
"frameDurationMs": 19.81756756756757,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8350.490999999976,
"styleRecalcs": 250,
"styleRecalcDurationMs": 28.919,
"layouts": 8,
"layoutDurationMs": 2.2099999999999995,
"taskDurationMs": 5265.071000000001,
"heapDeltaBytes": 2634780,
"heapUsedBytes": 104186560,
"domNodes": -276,
"jsHeapTotalBytes": -757760,
"scriptDurationMs": 2690.8089999999997,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.73293172690763,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 10491.535,
"styleRecalcs": 250,
"styleRecalcDurationMs": 29.325,
"layouts": 8,
"layoutDurationMs": 2.294,
"taskDurationMs": 6216.251,
"heapDeltaBytes": 7524464,
"heapUsedBytes": 109670324,
"domNodes": -296,
"jsHeapTotalBytes": -528384,
"scriptDurationMs": 2764.972,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.719298245614034,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 22964.04100000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22431.813,
"heapDeltaBytes": -46923184,
"heapUsedBytes": 277111088,
"domNodes": -3344,
"jsHeapTotalBytes": 16502784,
"scriptDurationMs": 329.61999999999995,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 42.138899082568805,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-large-graph-idle",
"durationMs": 22926.221000000056,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22246.559,
"heapDeltaBytes": -66244716,
"heapUsedBytes": 267739832,
"domNodes": -307,
"jsHeapTotalBytes": 9687040,
"scriptDurationMs": 309.105,
"eventListeners": -7,
"totalBlockingTimeMs": 0,
"frameDurationMs": 39.60708117443869,
"p95FrameDurationMs": 83.30000000000109
},
{
"name": "vue-large-graph-pan",
"durationMs": 27807.47100000002,
"styleRecalcs": 181,
"styleRecalcDurationMs": 19.173999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 27468.462,
"heapDeltaBytes": -46541892,
"heapUsedBytes": 283115228,
"domNodes": -3344,
"jsHeapTotalBytes": 12308480,
"scriptDurationMs": 856.0909999999999,
"eventListeners": -651,
"totalBlockingTimeMs": 55,
"frameDurationMs": 51.445841035120154,
"p95FrameDurationMs": 100.09999999999854
},
{
"name": "vue-large-graph-pan",
"durationMs": 19158.772999999997,
"styleRecalcs": 149,
"styleRecalcDurationMs": 14.495000000000008,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18689.616,
"heapDeltaBytes": -27359160,
"heapUsedBytes": 297432720,
"domNodes": -3344,
"jsHeapTotalBytes": 13619200,
"scriptDurationMs": 826.2230000000001,
"eventListeners": -651,
"totalBlockingTimeMs": 63,
"frameDurationMs": 35.102380952380955,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-node-resize-workload",
"durationMs": 8106.532000000016,
"styleRecalcs": 20,
"styleRecalcDurationMs": 62.316999999999986,
"layouts": 20,
"layoutDurationMs": 21.852999999999998,
"taskDurationMs": 7989.1140000000005,
"heapDeltaBytes": -36558760,
"heapUsedBytes": 268714044,
"domNodes": -3344,
"jsHeapTotalBytes": 16240640,
"scriptDurationMs": 118.992,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 47.3672514619883,
"p95FrameDurationMs": 100
},
{
"name": "vue-node-resize-workload",
"durationMs": 8192.56400000006,
"styleRecalcs": 20,
"styleRecalcDurationMs": 64.737,
"layouts": 20,
"layoutDurationMs": 24.326999999999988,
"taskDurationMs": 8097.553,
"heapDeltaBytes": -11507900,
"heapUsedBytes": 293708724,
"domNodes": -3344,
"jsHeapTotalBytes": 17289216,
"scriptDurationMs": 129.99499999999998,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 47.397687861271685,
"p95FrameDurationMs": 100
},
{
"name": "vue-zoom-out-idle",
"durationMs": 11372.900000000016,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11010.507,
"heapDeltaBytes": 7967308,
"heapUsedBytes": 286925024,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 147.23099999999994,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 38.660884353741494,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-zoom-out-idle",
"durationMs": 11470.412000000011,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11198.395000000002,
"heapDeltaBytes": 14519016,
"heapUsedBytes": 294788764,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 159.23399999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 39.40274914089348,
"p95FrameDurationMs": 83.30000000000291
},
{
"name": "workflow-execution",
"durationMs": 122.73600000003171,
"styleRecalcs": 10,
"styleRecalcDurationMs": 11.05,
"layouts": 9,
"layoutDurationMs": 3.9310000000000005,
"taskDurationMs": 101.163,
"heapDeltaBytes": -20717448,
"heapUsedBytes": 89027956,
"domNodes": 120,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 9.204000000000002,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66249999999991,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 113.8300000000072,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.481,
"layouts": 8,
"layoutDurationMs": 2.776,
"taskDurationMs": 85.13,
"heapDeltaBytes": -20878008,
"heapUsedBytes": 89111388,
"domNodes": 95,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 9.922,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.671428571428546,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 400.3060000000005,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.608,
"layouts": 76,
"layoutDurationMs": 14.024,
"taskDurationMs": 354.935,
"heapDeltaBytes": -15117872,
"heapUsedBytes": 80397292,
"domNodes": 4,
"jsHeapTotalBytes": 1310720,
"scriptDurationMs": 166.878,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 452.7909999999338,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.646,
"layouts": 76,
"layoutDurationMs": 14.734,
"taskDurationMs": 406.36100000000005,
"heapDeltaBytes": -14682400,
"heapUsedBytes": 80037556,
"domNodes": 4,
"jsHeapTotalBytes": 2359296,
"scriptDurationMs": 198.47899999999998,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66428571428573,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 558.4110000000919,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.691,
"layouts": 76,
"layoutDurationMs": 14.078999999999999,
"taskDurationMs": 528.625,
"heapDeltaBytes": 1084020,
"heapUsedBytes": 121691384,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 219.035,
"eventListeners": 300,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66470588235295,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 543.356000000017,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.7229999999999999,
"layouts": 76,
"layoutDurationMs": 14.253,
"taskDurationMs": 510.74300000000005,
"heapDeltaBytes": 617184,
"heapUsedBytes": 115691384,
"domNodes": 4,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 207.33499999999998,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E Coverage: 🟡 63.7% of linesCoverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 2998 passed, 0 failed · 2 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
Findings and check detailsThe matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was 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 🌾 Fallow: ✅ PassedFallow 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. Findings and check detailsFallow gates on new findings in changed files only, so everything below was introduced or moved by this PR (15 changed files).
Pre-existing findings are baselined in Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since e498721a9444eb9f08228284f1f75bc2bcf75b4b
Full docs: ADR-DEVEX-LINT-0015 🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (146)
Reproduce locallypnpm architecture:checkFull docs: Frontend domain catalog |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## cloud/1.58 #22819 +/- ##
=============================================
Coverage ? 84.29%
=============================================
Files ? 3172
Lines ? 165817
Branches ? 41663
=============================================
Hits ? 139780
Misses ? 25646
Partials ? 391
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…e workflow picker saves it (FRONT-3774) (#22818) Backport of #22649 then #22648 to `core/1.58`. Fixes [FRONT-3774](https://linear.app/comfyorg/issue/FRONT-3774): picking an unopened unsaved tab in the Agent workflow picker after a reload could not save it, and the tab's draft was deleted. Found in release QA case C-163 on 1.59.3; the same code is on 1.58. - **Applies here:** `core/1.58` has both defects. With the two fixes reverted, all five new tests fail on this branch (2 draft-deletion, 3 picker); with them, they pass. - **Worse symptom on this train:** `core/1.58` lacks #21326's "refuse to save an unloaded workflow" guard, so the picker's save of an unloaded tab writes an empty (`null`) workflow instead of failing. Loading the tab first fixes both shapes. #21326 itself is not carried. - **Two commits, source order.** Conflicts were imports only; behaviour hunks apply unchanged. <details><summary>Full context for agent readers</summary> Commits, in order (both `cherry-pick -x` from `main`): 1. #22649 `9580dff303`, fix(workflow): stop deleting an unsaved tab's draft on a same-path save or its first load. - `useWorkflowPersistenceV2.test.ts` import conflict: kept the train's `vue` import (this change adds no `computed`/`ref` use) and took the source's `vitest` import with `onTestFinished`, which the new test uses. - `useWorkflowPersistenceV2.ts` imports `ComfyWorkflowJSON` from `@/platform/workflow/validation/schemas/workflowSchema`, because 1.58 predates the `@comfyorg/graph-model` package. Same resolution the bot used on `core/1.59` (#22667). 2. #22648 `816ea98f48`, fix(agent): load an unopened unsaved tab before the workflow picker saves it. - `workflowService.test.ts` import conflict: kept the train's imports plus `blankGraph`, which the new `loadWorkflowInBackground` test uses (`getDefaultWorkflow` from `main` is not used by this change). - `agentWorkflowSelection.spec.ts`: same `ComfyWorkflowJSON` import-path change as above. Every `browser_tests/` hunk from both sources is carried; none is dropped. Local checks on this tree (Node 24): `typecheck` (pre-commit) and `typecheck:browser` pass; pre-push depcruise and knip pass. Vitest on `useAgentWorkflowSelection.test.ts`, `workflowService.test.ts`, `AgentPanelRoot.test.ts` and `src/platform/workflow/persistence/`: 808 passed, 1 expected fail, 14 files. The new browser case `picks an unsaved tab a reload left unopened` runs in CI (`e2e-status`). Authority: the program's release-backport grant for the current trains (`core/1.58` is listed). </details> Justification: FRONT-3774 backport to core/1.58 under the standing agent backport grant for the current trains. Production hunks match main #22648 (and #22649 persistence) line for line; all 132 exact-head checks at d0d9c5c are green after rerunning one flaky Playwright shard; no unresolved threads. Sibling carriers #22816, #22817 and #22819 merged the same way.
Backport of #22649 then #22648 to
cloud/1.58. Fixes FRONT-3774: picking an unopened unsaved tab in the Agent workflow picker after a reload could not save it, and the tab's draft was deleted. Found in release QA case C-163 on 1.59.3; the same code is on 1.58.cloud/1.58has both defects. With the two fixes reverted, all five new tests fail on this branch (2 draft-deletion, 3 picker); with them, they pass.cloud/1.58has fix: harden workflow load against null initial state and report occurrences #21326's guard (as [backport cloud/1.58] fix: harden workflow load against null initial state (#21326) #22397), so the pick fails with "Save failed · Cannot save workflow … before it is loaded".Full context for agent readers
Commits, in order: the two
core/1.58carrier commits (#22818, eachcherry-pick -xfrommain), which apply cleanly here. Their resolutions:9580dff303, fix(workflow): stop deleting an unsaved tab's draft on a same-path save or its first load.useWorkflowPersistenceV2.test.tsimport conflict: kept the train'svueimport (this change adds nocomputed/refuse) and took the source'svitestimport withonTestFinished, which the new test uses.useWorkflowPersistenceV2.tsimportsComfyWorkflowJSONfrom@/platform/workflow/validation/schemas/workflowSchema, because 1.58 predates the@comfyorg/graph-modelpackage. Same resolution the bot used oncore/1.59([backport core/1.59] fix(workflow): stop deleting an unsaved tab's draft on a same-path save or its first load #22667).816ea98f48, fix(agent): load an unopened unsaved tab before the workflow picker saves it.workflowService.test.tsimport conflict: kept the train's imports plusblankGraph, which the newloadWorkflowInBackgroundtest uses (getDefaultWorkflowfrommainis not used by this change).agentWorkflowSelection.spec.ts: sameComfyWorkflowJSONimport-path change as above.Every
browser_tests/hunk from both sources is carried; none is dropped.Local checks on this tree (Node 24):
typecheck(pre-commit) andtypecheck:browserpass; pre-push depcruise and knip pass. Vitest onuseAgentWorkflowSelection.test.ts,workflowService.test.ts,AgentPanelRoot.test.tsandsrc/platform/workflow/persistence/: 807 passed, 1 expected fail, 14 files. The new browser casepicks an unsaved tab a reload left unopenedruns in CI (e2e-status).Authority: the program's release-backport grant for the current trains (
cloud/1.58is listed).Justification: Release backport of FRONT-3774 fixes (#22648, plus #22649 where the train lacked it) to cloud/1.58 under the standing agent backport review-and-merge grant for the current trains. Production hunks match the source PRs line for line (only a train-local import path differs); the source unit tests fail on the train tip without the carrier and pass with it; all required checks pass at 8634d19; no unresolved threads.