Repository navigation
[backport core/1.54] fix: flag a freshly created, unsaved tab as unbound for the agent (PM-1430) - #18381
Conversation
…-1430) Hand-port of #18278 onto core/1.54's pre-#16856-refactor useAgentSession shape (this branch still has the monolithic sendMessage/postTurn, not the buildPostInput/acceptTurn split main has). A brand-new, never-saved tab plus a brand-new chat session sends a turn with neither workflow_id nor any signal that a tab was selected at all - indistinguishable, server-side, from no tab being selected - so the agent refused to edit ("I can't because you don't have a workflow selected"). Computes the same isUnboundTarget condition (wfContext defined, its id undefined, and no workflow bound yet this session) inline in postTurn, and sends current_tab_unbound: true plus the tab's draft alongside it so the server's mint doesn't start from an empty canvas. Once any turn this session has bound a workflow, later turns on the same still-unbound tab stop re-flagging it, matching #18278's behavior on main. current_tab_unbound is not yet in this branch's generated ingest-types (cloud#10068 unmerged), but postMessage's wire body here was already a plain Record<string, unknown>, not the generated AgentPostMessageRequest, so no AgentPostMessageRequestWithUnboundFlag type shim is needed - the field is just an additional key on that same loosely-typed body.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1935 passed, 0 failed📊 Browser Reports
📦 Bundle Size
⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-22T06:01:24.475Z",
"gitSha": "0b888fb2f79bba2eb4421e2bc5e3eb9a32fc59c2",
"branch": "backport-18278-to-core-1.54",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2018.4040000000323,
"styleRecalcs": 11,
"styleRecalcDurationMs": 6.413,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 445.28799999999995,
"heapDeltaBytes": -2618836,
"heapUsedBytes": 66482776,
"domNodes": -275,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 7.817000000000001,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2017.6279999999451,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.378,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 424.71899999999994,
"heapDeltaBytes": -10654144,
"heapUsedBytes": 59954200,
"domNodes": -280,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 7.507,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1933.2390000000146,
"styleRecalcs": 78,
"styleRecalcDurationMs": 26.62,
"layouts": 14,
"layoutDurationMs": 4.6129999999999995,
"taskDurationMs": 903.892,
"heapDeltaBytes": -6690944,
"heapUsedBytes": 63594708,
"domNodes": -280,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 151.613,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1760.091999999986,
"styleRecalcs": 74,
"styleRecalcDurationMs": 21.715999999999998,
"layouts": 14,
"layoutDurationMs": 3.9,
"taskDurationMs": 715.032,
"heapDeltaBytes": -3184444,
"heapUsedBytes": 66997192,
"domNodes": -281,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 118.544,
"eventListeners": -194,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1709.7210000000018,
"styleRecalcs": 31,
"styleRecalcDurationMs": 11.751,
"layouts": 6,
"layoutDurationMs": 0.9389999999999997,
"taskDurationMs": 300.414,
"heapDeltaBytes": 4385316,
"heapUsedBytes": 74255168,
"domNodes": 74,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 10.422,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1671.2420000000066,
"styleRecalcs": 33,
"styleRecalcDurationMs": 12.795000000000002,
"layouts": 6,
"layoutDurationMs": 1.1309999999999998,
"taskDurationMs": 305.68600000000004,
"heapDeltaBytes": 4384736,
"heapUsedBytes": 74606032,
"domNodes": 78,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 10.322,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 547.869999999989,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.48,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 358.439,
"heapDeltaBytes": 18444692,
"heapUsedBytes": 83173608,
"domNodes": 18,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 124.11500000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 542.3030000000608,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.121,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 355.675,
"heapDeltaBytes": -7829516,
"heapUsedBytes": 62715792,
"domNodes": 18,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 122.08399999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2026.4300000000048,
"styleRecalcs": 7,
"styleRecalcDurationMs": 4.139,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 513.8000000000001,
"heapDeltaBytes": 11259632,
"heapUsedBytes": 87007340,
"domNodes": -266,
"jsHeapTotalBytes": -2203648,
"scriptDurationMs": 27.605999999999998,
"eventListeners": -190,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2056.1890000000176,
"styleRecalcs": 7,
"styleRecalcDurationMs": 4.945999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 538.915,
"heapDeltaBytes": 5721820,
"heapUsedBytes": 81972608,
"domNodes": -280,
"jsHeapTotalBytes": -1155072,
"scriptDurationMs": 30.786,
"eventListeners": -194,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2068.6400000000162,
"styleRecalcs": 64,
"styleRecalcDurationMs": 8.791,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1281.071,
"heapDeltaBytes": 22297896,
"heapUsedBytes": 88641144,
"domNodes": 4,
"jsHeapTotalBytes": 1011712,
"scriptDurationMs": 613.555,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2161.687000000029,
"styleRecalcs": 69,
"styleRecalcDurationMs": 13.722999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1410.639,
"heapDeltaBytes": 4397048,
"heapUsedBytes": 81903600,
"domNodes": -243,
"jsHeapTotalBytes": 118784,
"scriptDurationMs": 673.957,
"eventListeners": -190,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3240.489000000025,
"styleRecalcs": 62,
"styleRecalcDurationMs": 12.208999999999998,
"layouts": 60,
"layoutDurationMs": 13.062,
"taskDurationMs": 1442.6979999999999,
"heapDeltaBytes": 9744748,
"heapUsedBytes": 76760996,
"domNodes": -276,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 629.567,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3235.1770000000215,
"styleRecalcs": 61,
"styleRecalcDurationMs": 11.018999999999998,
"layouts": 60,
"layoutDurationMs": 12.905,
"taskDurationMs": 1412.337,
"heapDeltaBytes": 8516148,
"heapUsedBytes": 75858476,
"domNodes": 2,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 611.928,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2334.5110000000204,
"styleRecalcs": 43,
"styleRecalcDurationMs": 6.628000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1509.612,
"heapDeltaBytes": 14272248,
"heapUsedBytes": 81366020,
"domNodes": -276,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 719.974,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2500.8129999999937,
"styleRecalcs": 45,
"styleRecalcDurationMs": 7.826000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1569.751,
"heapDeltaBytes": 22407932,
"heapUsedBytes": 102919876,
"domNodes": 10,
"jsHeapTotalBytes": 5922816,
"scriptDurationMs": 759.628,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2049.4520000000875,
"styleRecalcs": 6,
"styleRecalcDurationMs": 4.125,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 527.1629999999999,
"heapDeltaBytes": 8528004,
"heapUsedBytes": 86074312,
"domNodes": -272,
"jsHeapTotalBytes": -892928,
"scriptDurationMs": 30.02599999999999,
"eventListeners": -190,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2021.3959999999815,
"styleRecalcs": 7,
"styleRecalcDurationMs": 4.456999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 500.48099999999994,
"heapDeltaBytes": 10313812,
"heapUsedBytes": 87608004,
"domNodes": -267,
"jsHeapTotalBytes": -2203648,
"scriptDurationMs": 33.32599999999999,
"eventListeners": -190,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 570.8819999999832,
"styleRecalcs": 49,
"styleRecalcDurationMs": 11.867,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 333.49999999999994,
"heapDeltaBytes": 15066156,
"heapUsedBytes": 87745228,
"domNodes": 24,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 107.363,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 525.8119999999735,
"styleRecalcs": 48,
"styleRecalcDurationMs": 8.642,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 331.36,
"heapDeltaBytes": 14246508,
"heapUsedBytes": 86602980,
"domNodes": 22,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 107.726,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2023.1600000000185,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.457000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 419.12899999999996,
"heapDeltaBytes": 3841696,
"heapUsedBytes": 76821868,
"domNodes": -295,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 7.760999999999999,
"eventListeners": -212,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2001.3509999999997,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.04,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 422.16200000000003,
"heapDeltaBytes": -6807352,
"heapUsedBytes": 65570540,
"domNodes": -295,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.348999999999999,
"eventListeners": -242,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1705.3750000000036,
"styleRecalcs": 78,
"styleRecalcDurationMs": 19.243000000000002,
"layouts": 18,
"layoutDurationMs": 3.477,
"taskDurationMs": 664.689,
"heapDeltaBytes": -5337792,
"heapUsedBytes": 67803428,
"domNodes": -295,
"jsHeapTotalBytes": 6807552,
"scriptDurationMs": 75.911,
"eventListeners": -242,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1688.7540000000172,
"styleRecalcs": 79,
"styleRecalcDurationMs": 21.358,
"layouts": 18,
"layoutDurationMs": 4.192,
"taskDurationMs": 684.1850000000001,
"heapDeltaBytes": -14667968,
"heapUsedBytes": 58046424,
"domNodes": -293,
"jsHeapTotalBytes": 6807552,
"scriptDurationMs": 81.233,
"eventListeners": -210,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 933.228999999983,
"styleRecalcs": 21,
"styleRecalcDurationMs": 25.494000000000003,
"layouts": 17,
"layoutDurationMs": 11.106000000000002,
"taskDurationMs": 717.749,
"heapDeltaBytes": 21087288,
"heapUsedBytes": 110495380,
"domNodes": 13751,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 23.083,
"eventListeners": 2385,
"totalBlockingTimeMs": 117,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "viewport-pan-sweep",
"durationMs": 8179.474999999968,
"styleRecalcs": 249,
"styleRecalcDurationMs": 39.809,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4810.044,
"heapDeltaBytes": -7567156,
"heapUsedBytes": 68847804,
"domNodes": -276,
"jsHeapTotalBytes": 4087808,
"scriptDurationMs": 2152.3849999999998,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8195.311999999944,
"styleRecalcs": 249,
"styleRecalcDurationMs": 37.747,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4875.282999999999,
"heapDeltaBytes": 5450668,
"heapUsedBytes": 82157164,
"domNodes": -270,
"jsHeapTotalBytes": -143360,
"scriptDurationMs": 2211.35,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 13742.493000000082,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12903.403,
"heapDeltaBytes": -34607004,
"heapUsedBytes": 183099692,
"domNodes": -8068,
"jsHeapTotalBytes": -3944448,
"scriptDurationMs": 213.42,
"eventListeners": -14935,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 13535.938999999984,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12815.492,
"heapDeltaBytes": -34153548,
"heapUsedBytes": 183286396,
"domNodes": -8068,
"jsHeapTotalBytes": -3366912,
"scriptDurationMs": 224.21799999999996,
"eventListeners": -14933,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 16433.832999999937,
"styleRecalcs": 104,
"styleRecalcDurationMs": 22.915999999999993,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15913.305999999999,
"heapDeltaBytes": -41748320,
"heapUsedBytes": 188576432,
"domNodes": -8068,
"jsHeapTotalBytes": -26460160,
"scriptDurationMs": 811.489,
"eventListeners": -14929,
"totalBlockingTimeMs": 32,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 16836.16900000004,
"styleRecalcs": 121,
"styleRecalcDurationMs": 17.331999999999987,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16358.337,
"heapDeltaBytes": -35379424,
"heapUsedBytes": 182322660,
"domNodes": -8068,
"jsHeapTotalBytes": -12070912,
"scriptDurationMs": 845.7349999999999,
"eventListeners": -14931,
"totalBlockingTimeMs": 97,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-node-resize-workload",
"durationMs": 4882.415999999921,
"styleRecalcs": 20,
"styleRecalcDurationMs": 65.91200000000002,
"layouts": 20,
"layoutDurationMs": 23.574000000000012,
"taskDurationMs": 4782.16,
"heapDeltaBytes": -56655924,
"heapUsedBytes": 181990268,
"domNodes": -8068,
"jsHeapTotalBytes": 11096064,
"scriptDurationMs": 89.574,
"eventListeners": -14931,
"totalBlockingTimeMs": 199,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-node-resize-workload",
"durationMs": 4710.667000000058,
"styleRecalcs": 20,
"styleRecalcDurationMs": 66.00799999999998,
"layouts": 20,
"layoutDurationMs": 22.466,
"taskDurationMs": 4551.286999999999,
"heapDeltaBytes": -37407788,
"heapUsedBytes": 181106880,
"domNodes": -8068,
"jsHeapTotalBytes": 12156928,
"scriptDurationMs": 88.92599999999999,
"eventListeners": -14931,
"totalBlockingTimeMs": 166,
"frameDurationMs": 17.220000000000013,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6483.735000000024,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6268.661000000002,
"heapDeltaBytes": 11647488,
"heapUsedBytes": 177485884,
"domNodes": 0,
"jsHeapTotalBytes": -12058624,
"scriptDurationMs": 99.78700000000006,
"eventListeners": -8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6421.073999999976,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6198.321999999999,
"heapDeltaBytes": -2018604,
"heapUsedBytes": 177820068,
"domNodes": 0,
"jsHeapTotalBytes": -25952256,
"scriptDurationMs": 141.15799999999996,
"eventListeners": -10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 91.79300000005242,
"styleRecalcs": 7,
"styleRecalcDurationMs": 11.939000000000002,
"layouts": 2,
"layoutDurationMs": 0.9370000000000002,
"taskDurationMs": 62.032999999999994,
"heapDeltaBytes": 3087316,
"heapUsedBytes": 71501632,
"domNodes": 107,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 4.849999999999999,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999998,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 439.6110000000135,
"styleRecalcs": 14,
"styleRecalcDurationMs": 13.613999999999997,
"layouts": 2,
"layoutDurationMs": 0.4940000000000001,
"taskDurationMs": 81.969,
"heapDeltaBytes": 4781268,
"heapUsedBytes": 72733236,
"domNodes": 121,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 7.0219999999999985,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999727
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.54 #18381 +/- ##
==========================================
Coverage 83.55% 83.55%
==========================================
Files 2094 2094
Lines 123520 123526 +6
Branches 33296 33301 +5
==========================================
+ Hits 103202 103209 +7
+ Misses 20139 20138 -1
Partials 179 179
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…ound for the agent (PM-1430) (#18385) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789934540391489?thread_ts=1789934540.391489&cid=C0BGH348Z0C)_ Backport of #18278 to `cloud/1.54`. ## Why this is a hand-port, not a cherry-pick `cloud/1.54`'s `useAgentSession.ts` predates #16856's refactor that split the monolithic `sendMessage` into `buildPostInput`/`acceptTurn`/etc. on `main`. A mechanical cherry-pick of #18278's `isUnboundTarget()`/`buildTargetFields()` helpers has nothing to attach to on this branch, so the fix is re-implemented directly inside the old `sendMessage`/`postTurn` closure, using the same inputs (`wfContext`, `boundWorkflowId`) that are available there. This is the same approach as the sibling hand-port #18381 to `core/1.54`; `cloud/1.54`'s `useAgentSession.ts`/`agentRestClient.ts`/their tests and `AgentPanelRoot.vue`/`AgentPanelRoot.test.ts` were byte-identical to `core/1.54`'s pre-port versions, so #18381's diff ported over directly. ## The bug A brand-new, never-saved tab plus a brand-new chat session sends a turn with neither `workflow_id` nor any signal that a tab was selected at all — indistinguishable, server-side, from no tab being selected. The agent then refuses to edit: "I can't because you don't have a workflow selected to edit," even though the panel shows the tab as bound. ## The port - Inside `postTurn` (nested in `sendMessage`), compute `unboundTarget = wfContext !== undefined && wfContext.id === undefined && boundWorkflowId.value === null` — the same condition #18278's `isUnboundTarget()` expresses, evaluated with the old shape's own captured `wfContext` and the session's `boundWorkflowId` ref. - When `unboundTarget` is true, add `currentTabUnbound: true` to the outbound `input`, and extend `shouldSendDraft` so the draft rides along even past a thread's literal first ("new") turn — otherwise the server's mint of a workflow for this tab would start from an empty canvas. - `agentRestClient.ts`: added `PostMessageInput.currentTabUnbound` and serialize it as `current_tab_unbound` on the wire, mirroring #18278. - **No type shim needed, for a different reason than #18381's**: `packages/ingest-types` on `cloud/1.54` already generates `current_tab_unbound` on `AgentPostMessageRequest` (unlike `core/1.54`, where cloud#10068 hasn't landed in the generated types yet). But this branch's `postMessage` predates the refactor and already types its outbound `body` as a plain `Record<string, unknown>`, not the generated `AgentPostMessageRequest`, so there's nothing to shim around either way — the field is just another key on that loosely-typed body. - Ported the regression coverage from #18278/#18381, unchanged in substance since the test files were byte-identical to `core/1.54`'s: - `AgentPanelRoot.test.ts`: fresh unsaved tab + fresh chat is flagged unbound; an unbound tab on a restored thread is flagged and keeps its draft; a workflow bound before reload resolves from persisted `localStorage` binding storage without re-flagging. - `useAgentSession.test.ts`: an unbound target on an existing thread is flagged and keeps its draft; a second turn on a still-unbound tab does not re-flag it. - `agentRestClient.test.ts`: `currentTabUnbound` serializes to `current_tab_unbound`; it's omitted when not provided. ## Testing - `pnpm exec vitest run src/workbench/extensions/agent/AgentPanelRoot.test.ts src/workbench/extensions/agent/composables/agent/useAgentSession.test.ts src/workbench/extensions/agent/services/agent/agentRestClient.test.ts`: 322 passed, 2 expected-fail, 3 pre-existing/unrelated failures (verified identical on a clean `cloud/1.54` checkout before this change — an attach-flow content/attachments assertion and an uploading-chip test that throws on a `Blob.stream` polyfill gap, unrelated to this change) - `pnpm exec oxlint` / `pnpm exec oxfmt --check` on the changed files: clean - `pnpm typecheck`: clean ## Deviations Same caveat as #18278/#18381: `current_tab_unbound` is merged to cloud's `main` (cloud#10068), but not yet deployed to production — no production release PR has been opened yet — so this PR cannot fully close the loop (the agent actually acting instead of refusing) until that server-side change ships to prod. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01JJ6wnHBJsZs88S22MCKGLT --- _Generated by [Claude Code](https://claude.ai/code/session_01JJ6wnHBJsZs88S22MCKGLT)_ Co-authored-by: Claude <noreply@anthropic.com>
<!-- ccr-slack-attribution -->
Requested by Christian Byrne · Slack thread
Backport of #18278 to
core/1.54.Why this is a hand-port, not a cherry-pick
core/1.54'suseAgentSession.tspredates #16856's refactor that split the monolithicsendMessageintobuildPostInput/acceptTurn/etc. onmain. A mechanical cherry-pick of #18278'sisUnboundTarget()/buildTargetFields()helpers has nothing to attach to on this branch, so the fix is re-implemented directly inside the oldsendMessage/postTurnclosure, using the same inputs (wfContext,boundWorkflowId) that are available there.The bug
A brand-new, never-saved tab plus a brand-new chat session sends a turn with neither
workflow_idnor any signal that a tab was selected at all — indistinguishable, server-side, from no tab being selected. The agent then refuses to edit: "I can't because you don't have a workflow selected to edit," even though the panel shows the tab as bound.The port
postTurn(nested insendMessage), computeunboundTarget = wfContext !== undefined && wfContext.id === undefined && boundWorkflowId.value === null— the same condition fix: flag a freshly created, unsaved tab as unbound for the agent (PM-1430) #18278'sisUnboundTarget()expresses, evaluated with the old shape's own capturedwfContextand the session'sboundWorkflowIdref.unboundTargetis true, addcurrentTabUnbound: trueto the outboundinput, and extendshouldSendDraftso the draft rides along even past a thread's literal first ("new") turn — otherwise the server's mint of a workflow for this tab would start from an empty canvas.agentRestClient.ts: addedPostMessageInput.currentTabUnboundand serialize it ascurrent_tab_unboundon the wire, mirroring fix: flag a freshly created, unsaved tab as unbound for the agent (PM-1430) #18278.AgentPostMessageRequestWithUnboundFlagtype shim: checkedpackages/ingest-typeson this branch first —current_tab_unboundisn't in the generated types here either (cloud#10068 is merged to cloud'smainbut not yet deployed to production, so the generated types haven't picked it up) — but this branch'spostMessagealready types its outboundbodyas a plainRecord<string, unknown>, not the generatedAgentPostMessageRequest, so there's nothing to shim around; the field is just another key on that loosely-typed body.AgentPanelRoot.vue(which requires an explicitagentPanelStore.setWorkflowTarget— via the existingrenderWithSelectedTarget()test helper — rather than auto-selecting the active workflow on mount, a latermain-only behavior):AgentPanelRoot.test.ts: fresh unsaved tab + fresh chat is flagged unbound; an unbound tab on a restored thread is flagged and keeps its draft; a workflow bound before reload resolves from persistedlocalStoragebinding storage without re-flagging.useAgentSession.test.ts: an unbound target on an existing thread is flagged and keeps its draft; a second turn on a still-unbound tab does not re-flag it.agentRestClient.test.ts:currentTabUnboundserializes tocurrent_tab_unbound; it's omitted when not provided.Testing
pnpm vitest run src/workbench/extensions/agent/AgentPanelRoot.test.ts src/workbench/extensions/agent/composables/agent/useAgentSession.test.ts src/workbench/extensions/agent/composables/agent/useAgentWorkflowResolver.test.ts src/workbench/extensions/agent/services/agent/agentRestClient.test.ts: 334 passed, 2 expected-fail, 3 pre-existing/unrelated failures (verified identical on a cleancore/1.54checkout before this change — an attach-flow content/attachments assertion and an uploading-chip test that throws on aBlob.streampolyfill gap, unrelated to this change)pnpm typecheck: cleanpnpm exec oxlint/pnpm exec oxfmt --checkon the changed files: clean (pre-commit hook additionally raneslint --fixandpnpm typecheck, no changes needed beyond an oxfmt line-wrap)Deviations
Same caveat as #18278:
current_tab_unboundis merged to cloud'smain(cloud#10068), but not yet deployed to production — no production release PR has been opened yet — so this PR cannot fully close the loop (the agent actually acting instead of refusing) until that server-side change ships to prod.🤖 Generated with Claude Code
https://claude.ai/code/session_01JJ6wnHBJsZs88S22MCKGLT
Generated by Claude Code