Repository navigation
fix: flag a freshly created, unsaved tab as unbound for the agent (PM-1430) - #18278
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke 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: ✅ 2078 passed, 0 failed📊 Browser Reports
🌾 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. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since eca31830869f2222152350b45a210f1bde14082e
Full docs: ADR-DEVEX-LINT-0015 📦 Bundle: 9.96 MB gzip 🟢 -23 BDetailsSummary
Category Glance App Entry Points — 3.87 kB (baseline 3.87 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.46 MB (baseline 1.46 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 132 kB (baseline 132 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 14 added / 14 removed / 4 unchanged Panels & Settings — 639 kB (baseline 639 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 18 unchanged User & Accounts — 37.9 kB (baseline 37.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 8 added / 8 removed / 3 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 — 123 kB (baseline 123 kB) • ⚪ 0 BReusable component library chunks
Status: 9 added / 9 removed / 7 unchanged Data & Services — 3.88 MB (baseline 3.88 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 3 unchanged Utilities & Hooks — 577 kB (baseline 577 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 22 added / 22 removed / 16 unchanged Vendor & Third-Party — 17.4 MB (baseline 17.4 MB) • 🟢 -1.89 kBExternal libraries and shared vendor chunks
Status: 2 added / 2 removed / 16 unchanged Other — 17.8 MB (baseline 17.8 MB) • ⚪ 0 BBundles that do not match a named category
Status: 94 added / 94 removed / 208 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-22T00:37:18.455Z",
"gitSha": "76bfe1f137b48ff7425d4500ae01e2a4fc20eab0",
"branch": "fix/pm-1430-agent-unbound-tab-refusal",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 1991.9820000000072,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.534000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 462.526,
"heapDeltaBytes": -4570972,
"heapUsedBytes": 56864932,
"domNodes": -264,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 9.285000000000002,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2005.7539999999108,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.831000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 461.143,
"heapDeltaBytes": 9639492,
"heapUsedBytes": 71756728,
"domNodes": -264,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 9.512,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1758.5619999999835,
"styleRecalcs": 75,
"styleRecalcDurationMs": 27.505000000000003,
"layouts": 14,
"layoutDurationMs": 4.321999999999999,
"taskDurationMs": 833.901,
"heapDeltaBytes": -274248,
"heapUsedBytes": 61952752,
"domNodes": -262,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 163.01,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1783.5129999999708,
"styleRecalcs": 75,
"styleRecalcDurationMs": 27.943999999999996,
"layouts": 14,
"layoutDurationMs": 3.848,
"taskDurationMs": 845.3040000000001,
"heapDeltaBytes": 2479628,
"heapUsedBytes": 64675080,
"domNodes": -263,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 165.59400000000002,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1707.5680000000375,
"styleRecalcs": 31,
"styleRecalcDurationMs": 17.652,
"layouts": 6,
"layoutDurationMs": 1.324,
"taskDurationMs": 275.686,
"heapDeltaBytes": 2396152,
"heapUsedBytes": 63660892,
"domNodes": 74,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 12.274999999999999,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1738.1060000000161,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.502,
"layouts": 6,
"layoutDurationMs": 1.293,
"taskDurationMs": 345.3,
"heapDeltaBytes": 2168064,
"heapUsedBytes": 64364864,
"domNodes": 76,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 11.967999999999996,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 657.1710000000053,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.402999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 456.08399999999995,
"heapDeltaBytes": 18328744,
"heapUsedBytes": 80411424,
"domNodes": 18,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 171.323,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 666.0030000000461,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.621,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 456.33,
"heapDeltaBytes": 18303784,
"heapUsedBytes": 80430468,
"domNodes": 18,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 171.95,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1243.3919999999716,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 943.7099999999999,
"heapDeltaBytes": -12898244,
"heapUsedBytes": 73030612,
"domNodes": -296,
"jsHeapTotalBytes": 19005440,
"scriptDurationMs": 69.97599999999998,
"eventListeners": -217,
"totalBlockingTimeMs": 564,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1242.3410000000104,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 912.3779999999999,
"heapDeltaBytes": 8766176,
"heapUsedBytes": 94714596,
"domNodes": -298,
"jsHeapTotalBytes": 23220224,
"scriptDurationMs": 73.16600000000001,
"eventListeners": -195,
"totalBlockingTimeMs": 613,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 876.76799999997,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 502.6829999999993,
"heapDeltaBytes": 14839324,
"heapUsedBytes": 90144764,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 168.21599999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 255,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 843.2179999999789,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 478.0130000000007,
"heapDeltaBytes": 14095808,
"heapUsedBytes": 89132684,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 167.915,
"eventListeners": 0,
"totalBlockingTimeMs": 230,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11115.229999999996,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10179.548999999999,
"heapDeltaBytes": -9272828,
"heapUsedBytes": 72426120,
"domNodes": -14,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 8372.84,
"eventListeners": 0,
"totalBlockingTimeMs": 1363,
"frameDurationMs": 18.890000000000025,
"p95FrameDurationMs": 50
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10489.188000000013,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9600.93,
"heapDeltaBytes": 11098248,
"heapUsedBytes": 92973300,
"domNodes": -12,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 7925.142,
"eventListeners": 0,
"totalBlockingTimeMs": 1022,
"frameDurationMs": 18.886666666666617,
"p95FrameDurationMs": 49.899999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10423.963000000014,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9609.376,
"heapDeltaBytes": -4492012,
"heapUsedBytes": 72261908,
"domNodes": -12,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 7920.412,
"eventListeners": 0,
"totalBlockingTimeMs": 1108,
"frameDurationMs": 19.996666666666655,
"p95FrameDurationMs": 50
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10224.771000000033,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9395.872000000001,
"heapDeltaBytes": 7303884,
"heapUsedBytes": 84425416,
"domNodes": -12,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 7730.876,
"eventListeners": 0,
"totalBlockingTimeMs": 1026,
"frameDurationMs": 20,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "large-graph-idle",
"durationMs": 2009.8050000000285,
"styleRecalcs": 6,
"styleRecalcDurationMs": 5.566000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 561.289,
"heapDeltaBytes": 20624276,
"heapUsedBytes": 84343896,
"domNodes": -247,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 36.454999999999984,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2022.0889999999372,
"styleRecalcs": 5,
"styleRecalcDurationMs": 5.177999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 567.4549999999999,
"heapDeltaBytes": 2012988,
"heapUsedBytes": 83338148,
"domNodes": -248,
"jsHeapTotalBytes": -1019904,
"scriptDurationMs": 31.916,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2334.0709999999945,
"styleRecalcs": 63,
"styleRecalcDurationMs": 8.514999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1684.482,
"heapDeltaBytes": 21021760,
"heapUsedBytes": 85353396,
"domNodes": 2,
"jsHeapTotalBytes": 487424,
"scriptDurationMs": 905.222,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2342.7990000000136,
"styleRecalcs": 66,
"styleRecalcDurationMs": 10.500000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1711.1740000000002,
"heapDeltaBytes": -7148416,
"heapUsedBytes": 80080216,
"domNodes": -254,
"jsHeapTotalBytes": 778240,
"scriptDurationMs": 871.9720000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3619.8980000000347,
"styleRecalcs": 60,
"styleRecalcDurationMs": 10.047999999999998,
"layouts": 60,
"layoutDurationMs": 13.139999999999999,
"taskDurationMs": 1779.8600000000001,
"heapDeltaBytes": 11200804,
"heapUsedBytes": 75202316,
"domNodes": -265,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 849.022,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3596.5960000000905,
"styleRecalcs": 60,
"styleRecalcDurationMs": 9.658,
"layouts": 60,
"layoutDurationMs": 13.093,
"taskDurationMs": 1712.5030000000004,
"heapDeltaBytes": 8289576,
"heapUsedBytes": 74433944,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 804.042,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3075.985000000003,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.7159999999999975,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1902.2160000000001,
"heapDeltaBytes": 17638160,
"heapUsedBytes": 83763836,
"domNodes": -260,
"jsHeapTotalBytes": 679936,
"scriptDurationMs": 956.1590000000001,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3083.8340000000244,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.7399999999999975,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1934.6290000000001,
"heapDeltaBytes": 25814312,
"heapUsedBytes": 91782868,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 985.599,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2033.1879999999956,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.251000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 585.0979999999998,
"heapDeltaBytes": -4886112,
"heapUsedBytes": 83700464,
"domNodes": -250,
"jsHeapTotalBytes": -233472,
"scriptDurationMs": 34.789,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2033.3889999999428,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.772000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 591.8979999999999,
"heapDeltaBytes": -3579064,
"heapUsedBytes": 84321484,
"domNodes": -250,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 39.581999999999994,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 578.5460000000171,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.648,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 401.01200000000006,
"heapDeltaBytes": 13162072,
"heapUsedBytes": 76837160,
"domNodes": 18,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 146.874,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000007,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 567.8779999999506,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.022000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 395.259,
"heapDeltaBytes": 13339976,
"heapUsedBytes": 76914740,
"domNodes": 18,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 142.14300000000003,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1999.174000000039,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.673000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 480.03599999999994,
"heapDeltaBytes": 8952512,
"heapUsedBytes": 72709216,
"domNodes": -278,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 8.616999999999999,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2000.5239999999276,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.621,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 472.74300000000005,
"heapDeltaBytes": 14528760,
"heapUsedBytes": 78282548,
"domNodes": -278,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 9.027999999999999,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1717.9560000000151,
"styleRecalcs": 77,
"styleRecalcDurationMs": 25.378999999999998,
"layouts": 18,
"layoutDurationMs": 4.854000000000001,
"taskDurationMs": 791.2099999999999,
"heapDeltaBytes": 11562412,
"heapUsedBytes": 81081092,
"domNodes": -278,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 108.632,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1725.2880000000914,
"styleRecalcs": 77,
"styleRecalcDurationMs": 27.599999999999998,
"layouts": 18,
"layoutDurationMs": 5.328,
"taskDurationMs": 816.498,
"heapDeltaBytes": -4781812,
"heapUsedBytes": 64858688,
"domNodes": -278,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 113.01899999999999,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 1384.3520000000353,
"styleRecalcs": 16,
"styleRecalcDurationMs": 28.884999999999994,
"layouts": 5,
"layoutDurationMs": 13.333000000000002,
"taskDurationMs": 923.383,
"heapDeltaBytes": 20227876,
"heapUsedBytes": 102679344,
"domNodes": 13667,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 31.004000000000005,
"eventListeners": 2383,
"totalBlockingTimeMs": 142,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8476.511000000017,
"styleRecalcs": 249,
"styleRecalcDurationMs": 36.574,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5987.563,
"heapDeltaBytes": 3814376,
"heapUsedBytes": 84695108,
"domNodes": -246,
"jsHeapTotalBytes": -1089536,
"scriptDurationMs": 2824.934,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8305.836999999996,
"styleRecalcs": 246,
"styleRecalcDurationMs": 33.986000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5847.557,
"heapDeltaBytes": -5367196,
"heapUsedBytes": 75657124,
"domNodes": -253,
"jsHeapTotalBytes": 253952,
"scriptDurationMs": 2763.713,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16945.141000000036,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16664.574,
"heapDeltaBytes": -28564928,
"heapUsedBytes": 187372456,
"domNodes": -8061,
"jsHeapTotalBytes": -9375744,
"scriptDurationMs": 252.437,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 12832.019000000058,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12459.824999999999,
"heapDeltaBytes": -48433436,
"heapUsedBytes": 187875012,
"domNodes": -8061,
"jsHeapTotalBytes": -9502720,
"scriptDurationMs": 217.065,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20327.074000000037,
"styleRecalcs": 149,
"styleRecalcDurationMs": 16.737999999999975,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20092.300000000003,
"heapDeltaBytes": -32880008,
"heapUsedBytes": 191553652,
"domNodes": -8061,
"jsHeapTotalBytes": -18817024,
"scriptDurationMs": 883.358,
"eventListeners": -14928,
"totalBlockingTimeMs": 56,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 20436.85599999992,
"styleRecalcs": 149,
"styleRecalcDurationMs": 17.625,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20218.351,
"heapDeltaBytes": -41826552,
"heapUsedBytes": 193557592,
"domNodes": -8061,
"jsHeapTotalBytes": -13971456,
"scriptDurationMs": 909.5029999999999,
"eventListeners": -14928,
"totalBlockingTimeMs": 161,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6097.809999999981,
"styleRecalcs": 20,
"styleRecalcDurationMs": 76.865,
"layouts": 20,
"layoutDurationMs": 23.986999999999995,
"taskDurationMs": 6032.997000000001,
"heapDeltaBytes": -59675208,
"heapUsedBytes": 171399612,
"domNodes": -8061,
"jsHeapTotalBytes": 13824000,
"scriptDurationMs": 107.36599999999999,
"eventListeners": -14928,
"totalBlockingTimeMs": 419,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6138.717999999926,
"styleRecalcs": 20,
"styleRecalcDurationMs": 78.86100000000002,
"layouts": 20,
"layoutDurationMs": 22.528999999999993,
"taskDurationMs": 6095.973,
"heapDeltaBytes": -40949896,
"heapUsedBytes": 182443292,
"domNodes": -8061,
"jsHeapTotalBytes": 12517376,
"scriptDurationMs": 109.13099999999999,
"eventListeners": -14928,
"totalBlockingTimeMs": 389,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8430.177999999956,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8276.045000000002,
"heapDeltaBytes": -17030204,
"heapUsedBytes": 170802740,
"domNodes": 0,
"jsHeapTotalBytes": -27000832,
"scriptDurationMs": 138.64200000000005,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8471.307000000024,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8316.044999999998,
"heapDeltaBytes": 11212508,
"heapUsedBytes": 189098400,
"domNodes": 0,
"jsHeapTotalBytes": -28311552,
"scriptDurationMs": 126.14199999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 476.40799999999217,
"styleRecalcs": 20,
"styleRecalcDurationMs": 24.118999999999996,
"layouts": 4,
"layoutDurationMs": 2.106,
"taskDurationMs": 128.895,
"heapDeltaBytes": 5218492,
"heapUsedBytes": 67064140,
"domNodes": 147,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 15.043000000000001,
"eventListeners": 81,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 98.12099999999191,
"styleRecalcs": 8,
"styleRecalcDurationMs": 14.966,
"layouts": 4,
"layoutDurationMs": 1.6649999999999998,
"taskDurationMs": 75.231,
"heapDeltaBytes": 3007088,
"heapUsedBytes": 68369584,
"domNodes": 126,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.921000000000001,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 🌐 Website E2ETip All tests passed.
|
…ected A brand-new chat targeting a brand-new tab sends neither workflow_id nor current_tab (the tab has no cloud id yet). The server could not tell that apart from no tab being selected at all, so it seeded the model with "[No workflow is selected in the editor ... say that none is selected and ask the user to select one]" and the agent refused edit requests even though the panel correctly showed the tab as bound (PM-1429/PM-1430). Send current_tab_unbound: true for this case so the server mints a workflow for the tab and treats it as selected, matching the current_tab_unbound contract already on the server that no client ever exercised - it steered which workflow got minted but was never wired to the "workflow selected" framing shown to the model, which is fixed alongside this in a companion backend change tracked separately. Fixes PM-1430, PM-1429
43be611 to
7988d75
Compare
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 6 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 2 |
| 🟡 Medium | 2 |
| 🟢 Low | 2 |
Panel: 8/8 reviewers contributed findings.
| // this is a selected-but-unbound tab, not "nothing selected", is what | ||
| // keeps the seed from telling the model no workflow is selected - see | ||
| // PM-1429/PM-1430. | ||
| ...(wfContext !== undefined && wfContext.id === undefined |
There was a problem hiding this comment.
🟠 High — This flag and the canSendDraft gate on the next line disagree for the same turn: canSendDraft suppresses the draft when threadId !== 'new' and wfContext.id === undefined, which is exactly the case newly flagged here on any thread past its first message. The client then tells the server "selected but unbound" (so it mints a workflow) while sending none of that tab's graph, so the mint is empty and the user's on-screen nodes are dropped for that turn — and once the tab is bound to the empty mint, later agent edits can overwrite them. Either send the draft whenever the flag is set, or keep the flag suppressed until the tab's content exists server-side. Raised by 4 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case).
There was a problem hiding this comment.
Tracked as FE-2684. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| if (req.selection !== undefined) body.selection = req.selection | ||
| if (req.attachments !== undefined) body.attachments = req.attachments | ||
| if (req.draft !== undefined) body.draft = req.draft | ||
| if (req.currentTabUnbound !== undefined) |
There was a problem hiding this comment.
🟠 High — current_tab_unbound is absent from the generated ingest contract — neither AgentPostMessageRequest (packages/ingest-types/src/types.gen.ts) nor zAgentPostMessageRequest (zod.gen.ts) declares it — so the JSDoc reference on line 70 is dangling and the key rides along only as a loose Record<string, unknown> entry with no type checking of the wire name. If the deployed service validates strictly it 400s the exact fresh-tab path this PR targets; if it ignores unknown fields the fix is a silent no-op with no client-side signal. Regenerate ingest-types against a spec that includes the field (or gate on a negotiated capability) before relying on it. Raised by 5 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case, kimi-k3-max edge-case).
There was a problem hiding this comment.
Tracked as FE-2684. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| // keeps the seed from telling the model no workflow is selected - see | ||
| // PM-1429/PM-1430. | ||
| ...(wfContext !== undefined && wfContext.id === undefined | ||
| ? { currentTabUnbound: true } |
There was a problem hiding this comment.
🟡 Medium — Nothing makes the requested mint idempotent per tab: the flag is recomputed from cloudIdFor on every turn, including turns on a thread already bound to a workflow, and a temporary tab can stay id-less after its first turn (ack.workflow_id is optional in zAgentTurnAccepted, and onWorkflowAdopted refuses adoption when storedWorkflowFor(workflowId) !== null; boundInstances is in-memory only, so a reload also loses the binding). Each subsequent turn then re-asserts unbound and mints yet another workflow, scattering one conversation's edits across separate documents. Consider only asserting unbound when the session has no bound workflow (boundWorkflowId === null). Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Tracked as FE-2684. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| attachments: attachments?.map((attachment) => attachment.ref), | ||
| // wfContext identifies a target tab with no cloud id yet - a fresh, | ||
| // unsaved tab, not the absence of a tab (that case leaves wfContext | ||
| // itself undefined, see targetWorkflowTurnContext). Telling the server |
There was a problem hiding this comment.
🟡 Medium — The comment's invariant is not quite right: targetWorkflowTurnContext also returns undefined for a non-temporary tab whose cloud id failed to resolve (prepareWorkflow() swallows refreshCloudWorkflowIds errors and races a 3s timeout), so a saved tab can reach the send with no id and go out with neither workflow_id nor current_tab_unbound — the same "no tab selected" ambiguity this PR removes for fresh tabs, after which the server falls back to the thread's previous workflow. Either extend the flag to that case or correct the stated invariant. Raised by 2 of 8 reviewers (kimi-k3-max edge-case, kimi-k3-max adversarial).
There was a problem hiding this comment.
Tracked as FE-2684. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| // PM-1429/PM-1430. | ||
| ...(wfContext !== undefined && wfContext.id === undefined | ||
| ? { currentTabUnbound: true } | ||
| : {}), |
There was a problem hiding this comment.
🟢 Low — The unbound determination is snapshotted before the POST and never revalidated against the ack, so if the user saves the fresh tab (assigning a real cloud id) while the request is in flight, the server still mints from the stale signal and acceptTurn/onWorkflowAdopted bind the minted id to that tab path. The tab then carries two cloud identities: cloudIdFor prefers the saved id while the binding store and CRDT follower track the minted one, so the next turn targets one workflow while the session streams edits into the other. Raised by 1 of 8 reviewers (kimi-k3-max adversarial).
There was a problem hiding this comment.
Tracked as FE-2684. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| await renderAndSend('add one text input node') | ||
|
|
||
| expect(bodies[0]).not.toHaveProperty('workflow_id') | ||
| expect(bodies[0]).toMatchObject({ current_tab_unbound: true }) |
There was a problem hiding this comment.
🟢 Low — This regression test only exercises the brand-new-thread case, where threadAtSend === 'new' so canSendDraft still sends the draft alongside the flag; the riskier variant — an existing/restored thread with the same unsaved tab, where the flag goes out with no draft — is unexercised, so the content-loss path noted above would ship green. Add a case that sets a thread id (as the neighbouring test at line 4749 does) and asserts both current_tab_unbound and draft.content. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Tracked as FE-2684. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #18278 +/- ##
==========================================
+ Coverage 83.24% 84.22% +0.98%
==========================================
Files 2977 2278 -699
Lines 146444 129287 -17157
Branches 39692 34941 -4751
==========================================
- Hits 121908 108898 -13010
+ Misses 23260 20093 -3167
+ Partials 1276 296 -980
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 710 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Cursor review on the prior commit flagged two correctness gaps: - canSendDraft's own threadId==='new' gate disagreed with the new current_tab_unbound flag for any turn past a thread's first message: the flag fires whenever the target tab is still unbound, but the draft was only sent on a literal 'new' thread id or a resolved id, so a follow-up turn on a still-unbound tab told the server to mint a workflow while withholding the very content that mint should start from. canSendDraft now also sends the draft whenever the unbound-target condition holds. - the flag itself had no idempotency guard: it fired on every turn where the tab stayed unbound, which (paired with the draft gap above) meant a repeatedly-unresolved tab could re-mint on every turn. It now also requires boundWorkflowId to still be null, so it only fires before this session has bound anything - after the first successful ack, a still- unbound tab falls back to today's pre-existing behaviour instead of asking the server to mint again. Also fixes the two generated ingest-types files (types.gen.ts, zod.gen.ts) to actually declare current_tab_unbound, matching the field already added to services/ingest/openapi.yaml in the companion backend change - it was riding along as an untyped Record entry before. Doing so surfaced a pre-existing gap in the no-duplicate-ingest-type lint rule (it has no self-exclusion for the very package it is generated into, unlike its sibling packages/registry-types/src/comfyRegistryTypes.ts, already ignored); added both generated files to .oxlintrc.json's ignorePatterns alongside that existing entry. Adds regression coverage at both the composable level (useAgentSession.test.ts, an unbound target on an existing thread, and idempotency across two turns) and the component level (AgentPanelRoot.test.ts, a restored thread with the same unsaved tab).
dante01yoon
left a comment
There was a problem hiding this comment.
Thanks for this, and for the honest "Deviations" note — that note is actually what surfaces the main blocker. Requesting changes on 3 issue: items, with one question: I'd like answered before re-review.
What I verified first
The client-side half of the premise is real. I traced it rather than assuming:
targetWorkflowTurnContext(AgentPanelRoot.vue:468) returns{ tabPath }with noidfor a temporary tab, andundefinedfor a saved tab whose cloud id didn't resolve. On the actual send pathoriginis always non-undefined(useAgentSession.ts:420-426builds it as{ tabPath } | nullbefore re-resolving), so theorigin !== undefinedarm holds and an id-lesswfContextreally does mean "temporary, never-saved tab".postTurnthen doesif (wfContext?.id === undefined) return rest.postMessage(threadId, input)— noworkflow_id. Andcurrent_tabis a cloud workflow id, so it's absent too. So a fresh-tab turn does go out with neither field, indistinguishable on the wire from no tab selected. That part of the story checks out.
This is not a house-rule-C violation, and I want to say so explicitly so it doesn't get raised at you later: "this tab is a temporary, never-saved tab with no bound cloud workflow" is a genuinely client-local fact. The server cannot know it. Computing it in the frontend is correct — I'm not asking you to move it server-side.
The new tests are discriminating. I checked each fails for the reason it claims:
AgentPanelRoot.test.ts"restored thread" case —New ChatnullsboundWorkflowId, thensetThreadId('th-existing')makesthreadId !== 'new', socanSendDraft's pre-existing clauses are both false and only the newunboundTargetargument keeps the draft. It pins thecanSendDraftchange specifically.(h10)pins theboundWorkflowId === nullconjunct: turn 1's ack setsboundWorkflowId, so turn 2's assertion can only pass with that conjunct present.
No non-discriminating tests here, and Cursor's two 🟠 High findings are genuinely addressed on this head — the draft/flag disagreement is fixed, and its 🟡 Medium about targetWorkflowTurnContext returning {tabPath} for an unresolved saved tab does not hold on the send path, for the origin reason above. Your inline comment is accurate; that finding is stale.
Why I'm blocking
The blocker isn't the frontend logic — it's how the contract was obtained.
packages/ingest-types/src/{types.gen.ts,zod.gen.ts} are build outputs of openapi-ts (packages/ingest-types/package.json -> generate), and openapi-ts.config.ts reads input: './openapi.yaml' — which is gitignored (packages/ingest-types/.gitignore:2) — with output.clean: true. Hand-adding a field to those files means the next regeneration deletes it, silently. Details inline.
There's also an internal contradiction I'd like resolved: the Motivation says this is "a request field the server already understands", but Deviations says the server change "lives outside this repo and is tracked separately". Those can't both be true, and which one holds decides whether this is a small re-ordering or a blocked dependency.
Not blocking, to be clear
The frontend behaviour, the draft handling, and the test coverage are in good shape. If the field genuinely lands in the Cloud OpenAPI spec and you regenerate, items 1 and 2 collapse into a re-run of pnpm --filter @comfyorg/ingest-types generate plus one type annotation.
| /** | ||
| * The client's active editor tab has no workflow yet (a fresh, unsaved tab), so it sends neither workflow_id nor current_tab. Without this signal the turn falls back to the thread's remembered workflow and the fresh tab is presented to the model as having no workflow selected. With it, the turn mints a workflow for the tab instead and that workflow is treated as selected. An explicit workflow_id or a resolvable current_tab still wins. | ||
| */ | ||
| current_tab_unbound?: boolean |
There was a problem hiding this comment.
issue (blocking): this file is generated, so hand-adding the field here doesn't add it to the contract — it adds something that looks generated and will be deleted without warning.
packages/ingest-types/package.json defines "generate": "openapi-ts && ...", and packages/ingest-types/openapi-ts.config.ts is:
input: './openapi.yaml',
output: { path: './src', clean: true }Two consequences:
clean: truewipessrc/on every regeneration. The next time anyone runspnpm --filter @comfyorg/ingest-types generate— a spec bump, a dependency update, a scheduled sync —current_tab_unbounddisappears from bothtypes.gen.tsandzod.gen.ts(line 2680).agentRestClient.tskeeps compiling (see my note there — the body isn't typed against this), so nothing fails; the field just quietly stops being part of the contract while the client keeps sending it.openapi.yamlis gitignored (packages/ingest-types/.gitignore:2), so the spec isn't in this repo and this PR cannot have updated it. The generated output here is therefore ahead of the source of truth it claims to be derived from.
This is the case the contract-first workflow exists for: land the API change in ComfyUI/Cloud, let the spec regenerate the frontend types, merge the generated-types change, then build the feature against it. That also means the spec itself gets a review pass — worth having here, because the doc text you've written ("the turn mints a workflow for the tab") is a real behavioural commitment for the server, and right now it's being authored in the consumer.
This also intersects with the contradiction in the description: Motivation says the server "already understands" this field, but Deviations says the paired server change is tracked separately and outside this repo. Could you clarify which holds?
- If the field is already in the deployed Cloud OpenAPI spec: please just regenerate (
pnpm --filter @comfyorg/ingest-types generate) so these two files are true output, and the diff should then contain exactly this field with no hand-written prose. - If it isn't yet: this PR is ahead of its contract and should wait on the spec change, rather than encoding the field shape here first.
Happy to re-review promptly either way.
There was a problem hiding this comment.
Thanks for catching this precisely — you're right that I'd hand-written these two files, and the risk you describe (silently deleted on the next real clean: true regeneration) is real.
There is a local regeneration path, and I've now run it for real: services/ingest/openapi.yaml (cloud repo) is projected through go run ./services/ingest/scripts/openapi-project -fe -in services/ingest/openapi.yaml -out .../packages/ingest-types/openapi.yaml (strips the internal/M2M surface), then pnpm generate (openapi-ts + the zod plugin) — this is exactly what .github/workflows/push-ingest-types-to-frontend.yml does post-merge, just run locally since I have both repos checked out in this sandbox.
To your (a)/(b) split, honestly it's neither cleanly — current_tab_unbound is not yet on cloud's merged main; it only exists on the companion PR's branch (cloud#10068, still open). So I ran the regeneration against that branch's spec, not deployed main. To isolate exactly what this field changes (and rule out unrelated drift — cloud's main has moved since this frontend package was last regenerated: lineage_seq, op_ids, a topup-ceiling change, none of which are mine), I diffed a same-pipeline regeneration of cloud's actual current main (no changes) against the regeneration with the companion branch's spec. The isolated delta was exactly:
+ current_tab_unbound?: boolean(plus its doc comment and the matching zod line) — byte-for-byte what I'd hand-written. So the content is correct, but I agree the process matters independently of that, and now it's verified rather than asserted.
Resolving the Motivation/Deviations contradiction you flagged: Deviations is the accurate one — the server change is real but not merged. "Already understands" in Motivation should have said "the server code already understands CurrentTabUnbound bool, added in an earlier commit on the same not-yet-merged branch" — I'll tighten that wording.
My call: keep the generated-file diff in this PR (verified minimal and correct, and splitting it out just delays something I've now confirmed is right), but this PR must not merge before cloud#10068 does — which Deviations/Companion PR already said, now stated unambiguously here too. If you'd rather have the generated-file change land only as a real post-merge automated PR regardless, I'll split it — your call, and I'll act on whichever you prefer.
Latest commit: fc451cc.
There was a problem hiding this comment.
Tracked as FE-2684. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| if (req.attachments !== undefined) body.attachments = req.attachments | ||
| if (req.draft !== undefined) body.draft = req.draft | ||
| if (req.currentTabUnbound !== undefined) | ||
| body.current_tab_unbound = req.currentTabUnbound |
There was a problem hiding this comment.
issue (blocking): the generated type isn't load-bearing on this path, so the PR's stated benefit doesn't hold yet.
The summary says the field is "now part of the generated ingest contract (packages/ingest-types) rather than an untyped passenger". But five lines up, the payload is:
const body: Record<string, unknown> = { content: req.content }So body.current_tab_unbound = ... is an untyped property write on an index-signature object. Nothing on the request path references AgentPostMessageRequest — it's only imported for a field type on PostMessageInput (workflowReferences). Concretely, today:
- the wire key is never checked against the generated contract, so a typo (
current_tab_unbnd) compiles and ships; - when the field is removed or renamed by a regeneration (see my note on
types.gen.ts:4521), this line still compiles and the client keeps sending a key the server no longer declares.
So adding it to types.gen.ts buys no type safety here, which is most of the justification for having touched the generated file at all.
Would you consider typing the payload against the generated request type — e.g. const body: AgentPostMessageRequest = { content: req.content } — so the generated contract actually constrains the wire shape? Then the regeneration in the other comment is genuinely protective: if the field ever leaves the spec, this line fails to compile instead of silently drifting. That's the property the house rule is trying to buy, and it's a one-line change once the type is real.
There was a problem hiding this comment.
Agreed, and done — body is now typed as AgentPostMessageRequest instead of Record<string, unknown>:
const body: AgentPostMessageRequest = { content: req.content }pnpm typecheck passes with this, which is only meaningful now that the generated type genuinely declares the field (see my reply on types.gen.ts:4521) — before that it would have compiled either way. Latest commit: fc451cc.
There was a problem hiding this comment.
Tracked as FE-2684. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| const unboundTarget = | ||
| wfContext !== undefined && | ||
| wfContext.id === undefined && | ||
| boundWorkflowId.value === null |
There was a problem hiding this comment.
issue (blocking): the "only once" guard is scoped to the module, but the thread it's protecting is scoped to localStorage — so a page reload re-arms it and, per this field's own documented semantics, the server mints a second workflow for the same tab in the same thread.
The PR summary says this "fires only once per session". That's true for newChat/loadThread, but a reload is the gap:
boundWorkflowIdis seeded fromrememberedWorkflowId(line 122), which is a module-levellet rememberedWorkflowId: string | null = null(line 100). A reload resets the module, so it'snullagain.start()only clears it when there's no surviving thread (lines 159-165). With a thread restored fromlocalStorage['Comfy.Agent.ThreadId']it staysnull— the thread survives the reload, the binding memory does not.
So after F5 with the same unsaved tab and the same thread, this conjunct is true again. Whether it actually re-mints then depends on cloudIdFor recovering the binding, and that recovery can fail for exactly this kind of tab: agentWorkflowTabBindingStore.matchesWorkflow requires isVerifiedOwner for a temporary tab, which needs adoptOpenTab -> claimable to succeed — and claimable returns !tab.isTemporary (i.e. false for a temporary tab) whenever record.graphId === null or graphIdOf(tab) === undefined. record.graphId is written as graphIdOf(workflow) ?? null at bind() time, so a tab that had no graph id when it was bound is permanently unrecoverable after a reload.
In that case turn N+1 sends current_tab_unbound: true with no workflow_id, and by the contract text you added ("the turn mints a workflow for the tab") the server mints a fresh one — so the conversation's edits end up split across two workflow documents, which is the failure Cursor's 🟡 Medium was pointing at and which this conjunct only partly closes.
Two things would resolve this for me:
- Confirm whether a temporary tab reliably carries a
graphIdatbind()time — if it always does, the rehydration path saves this and I'm happy to drop it to a comment. - If it doesn't, could the "already minted for this thread" fact be persisted alongside the thread id (or read back off the hydrated thread) rather than held only in module state, so the guard's lifetime matches the thread's?
A regression test for "restored thread + still-unsaved tab, after the session's binding memory is gone" would also pin whichever answer is right — the current (h10) only covers the within-session case.
There was a problem hiding this comment.
Traced it — answer is (1): a temporary tab reliably carries a graphId at bind() time, for the flows this PR's unboundTarget actually goes through.
workflowStore.createNewWorkflow (called by createTemporary/createNewTemporary, which is how a "new tab" gets created) does:
const initialWorkflowData = ensureWorkflowId(structuredClone(workflowData ?? defaultGraph))
workflow.originalContent = workflow.content = JSON.stringify(initialWorkflowData)ensureWorkflowId mints a UUID whenever the content doesn't already have one, and this runs synchronously before originalContent is ever set — there's no window where a tab created this way has unset content. agentWorkflowTabBindingStore's graphIdOf(tab) reads tab.activeState?.id first, but falls back to parsing tab.originalContent when activeState (which depends on changeTracker) isn't populated yet:
function graphIdOf(tab) {
const activeId = tab.activeState?.id
if (activeId !== undefined) return activeId
if (typeof tab.originalContent !== 'string') return undefined
// ...parses originalContent, returns its `id`
}So either way, graphIdOf resolves a real id. Both bind() call sites this PR relies on — commitWorkflowTarget (explicit target selection, which already goes through prepareWorkflowSelection) and onWorkflowAdopted (the unbound-mint ack path) — pass the same live tab object/path, synchronously, with no async gap where content could still be unset. So: this closes as a non-issue for the path in question, not a "the FE happens to get lucky" answer — it's guaranteed by ensureWorkflowId running before the tab is ever open.
I did add the regression test you asked for either way, since the property that actually matters is "does the persisted binding (which is what survives a reload — boundWorkflowId doesn't) get recovered correctly", not just graphId non-nullness in isolation:
- New test:
resolves a workflow bound before reload from persisted storage, without re-flagging the tab as unbound— pre-seedslocalStorage['Comfy.Agent.WorkflowTabBindings.v2']with a binding record (simulating a binding established before reload, with a matchinggraphId), renders fresh (a fresh Pinia + freshagentWorkflowTabBindingStoreinstance, i.e. what a reload actually gives you), sets an existing thread id, and asserts the turn resolvesworkflow_idfrom that persisted record and does not sendcurrent_tab_unbound. - The existing
flags an unbound tab as unbound on a restored thread...test is the other half — "binding memory gone" (a fresh session with no persisted record at all) still behaves safely (flags unbound, sends the draft, mints once).
Both pass. Latest commit: fc451cc.
There was a problem hiding this comment.
Tracked as FE-2684. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| selection: selectedNodes(tags), | ||
| attachments: attachments?.map((attachment) => attachment.ref), | ||
| ...(canSendDraft(threadId, wfContext, draft) ? { draft } : {}) | ||
| ...(unboundTarget ? { currentTabUnbound: true } : {}), |
There was a problem hiding this comment.
question: the condition that sets this flag is narrower than the meaning you documented for it, and since the server half isn't written yet, I think the two should be reconciled before someone implements against the prose.
The doc you added at types.gen.ts:4519 defines the field as:
The client's active editor tab has no workflow yet (a fresh, unsaved tab), so it sends neither workflow_id nor current_tab.
That's a statement purely about the tab. But unboundTarget additionally requires boundWorkflowId.value === null. So on turn 2+ with a still-unbound tab, the client sends no workflow_id, no current_tab, and no current_tab_unbound — which by the written contract means "no tab selected", i.e. exactly the ambiguity this PR exists to remove. The client's behaviour is defensible (falling back to the thread's remembered workflow is the safer target); it just isn't what the field says.
That matters more than usual here because the server implementation doesn't exist yet, so whoever writes it will build to this text, not to useAgentSession.ts. Could the doc say what the client actually does — something like "sent only when the client has no workflow bound for this thread yet" — or, if the tab-only reading is the one the server wants, should the boundWorkflowId conjunct move server-side?
Related, non-blocking: the same conjunct means turn 2+ on a still-unbound tab also drops the draft (canSendDraft needs threadId === 'new', a resolved wfContext.id, or unboundTarget — none hold). So nodes the user hand-places after turn 1 aren't sent. That's pre-existing rather than introduced here, but it's the same content-loss shape your comment on line 304 is guarding against on turn 1, so it may be worth a follow-up.
There was a problem hiding this comment.
Good catch — I reconciled this by keeping the field's own doc comment as the tab-level fact (it's accurate to what the server does with it, and matches the server's own CurrentTabUnbound doc comment in agent_handler.go, which likewise knows nothing about "has this session bound anything" — that's a purely frontend-internal notion), and instead sharpened the comment at the actual gating site in useAgentSession.ts to spell out that boundWorkflowId === null is a client-side policy choice narrowing when the client asserts that fact, not part of what the field itself means.
I didn't move the conjunct server-side, because there isn't actually a safe server-side mechanism for it yet: doing that would mean the server, on seeing current_tab_unbound with an existing threadWorkflowID, needs to tell "this thread's remembered workflow is itself my own prior unbound mint for this tab" (reuse it) apart from "an unrelated workflow from a switch to a different tab" (must NOT reuse — this is exactly what TestPostMessageUnboundCurrentTabMintsInsteadOfReusingTheThreadWorkflow locks in on the companion PR). The wire contract as it stands can't distinguish those two cases, and building that disambiguation is a real design change I've deliberately deferred (flagged as a Deviation on cloud#10068) rather than rush without the Docker-backed test harness this sandbox lacks. So for now, boundWorkflowId === null on the client is the only thing preventing repeated minting, which is why I kept it here rather than server-side.
On your non-blocking note: confirmed, and it's not a new residual gap — unboundTarget is the exact same condition gating both the flag and the draft now (canSendDraft's third clause is literally unboundTarget), so whenever we assert unbound, the draft goes with it; once boundWorkflowId becomes non-null we also stop asserting unbound, so there's no state where we claim "unbound" without the draft. The remaining gap (turn 2+, tab still unbound, boundWorkflowId already non-null from turn 1) is pre-existing — canSendDraft's original two conditions had the identical shape for a saved-tab-lookup-failure case before this PR touched it — and fixing it for real needs the same server-side reuse-mint work above, so I'm leaving it as a follow-up rather than papering over it with an unconditional draft-send that could attach content to the wrong workflow once one turn's mint and another turn's save race each other.
Latest commit: fc451cc.
There was a problem hiding this comment.
Tracked as FE-2684. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| "coverage/*", | ||
| "dist/*", | ||
| "packages/ingest-types/src/types.gen.ts", | ||
| "packages/ingest-types/src/zod.gen.ts", |
There was a problem hiding this comment.
suggestion (non-blocking): adding the generated ingest files to ignorePatterns is consistent with the existing entries (packages/registry-types/src/comfyRegistryTypes.ts, src/types/generatedManagerTypes.ts), so no objection to the change itself.
It's worth noting it arrives here only because those files were edited by hand in this PR — it's unrelated to the PM-1429/PM-1430 fix. If the generated-types change moves to its own PR (see my note on types.gen.ts:4521), this belongs there with it, which also keeps this PR's diff to the behaviour change.
There was a problem hiding this comment.
Leaving this bundled here — since the generated-file change is staying in this PR (verified as genuine, minimal generated output; see my reply on types.gen.ts:4521), the ignorePatterns entry needs to stay with it, or the generated files fail lint on their own. If you'd rather the generated-type change moved to its own PR after all, this comes with it and I'll pull both out together.
Human review on the PR (dante01yoon) raised three blocking issues: - types.gen.ts/zod.gen.ts had been hand-edited rather than regenerated. Verified there IS a local regeneration path (services/ingest openapi.yaml is projected through services/ingest/scripts/openapi-project -fe, then openapi-ts + the zod plugin, exactly matching .github/workflows/push-ingest-types-to-frontend.yml) and ran it against the companion cloud PR's branch (current_tab_unbound isn't on cloud's merged main yet). Diffing that regeneration against a same-pipeline regeneration of cloud's actual main (no changes) isolated exactly one delta: this field, byte-for-byte what was already committed by hand. No file content changes as a result - the existing hand-written text turned out to already match genuine generated output - but this is now verified rather than asserted, and the process this documents is reproducible. - agentRestClient.ts's outbound body was typed as Record<string, unknown>, so current_tab_unbound wasn't checked against the generated contract at all. Retyped it as the real AgentPostMessageRequest now that the field is genuinely part of it; a typo or a future field removal is now a compile error. - Reviewer asked whether a temporary tab can have a null graphId at bind() time, which would permanently break rehydration after a reload. Traced it: workflowStore.createNewWorkflow always calls ensureWorkflowId before a temporary tab's originalContent is ever set, and agentWorkflowTabBindingStore's graphIdOf falls back to parsing originalContent when activeState isn't populated yet - so every tab this flow binds has a real graph id from the moment it exists. Added a regression test proving the actual property that matters across a reload: a workflow bound before reload (simulated via a pre-seeded localStorage-persisted binding record, since the binding store survives reload independently of the session-only boundWorkflowId ref) resolves through cloudIdFor without re-flagging the tab as unbound or minting a second workflow, alongside the existing "binding memory gone" test for the other half of that behaviour. Also sharpened the code comment at the actual gating site to spell out why boundWorkflowId narrows current_tab_unbound's assertion (a client-side throttle, since the server can't yet safely reuse its own prior unbound mint on a later turn) without that narrowing being part of the wire field's own contract, which its doc comment continues to describe accurately as a tab-level fact.
|
@dante01yoon — replied inline to all five threads. Summary of what changed (commit
Happy to split the generated-file change into its own PR if you'd still rather not have it here even verified — just say so and I'll pull it (and the |
|
CI note: The job log shows all tests in that shard passed: The step that actually failed came right after, during artifact upload: That's a transient network reset talking to the Actions artifact-storage backend while uploading |
This comment has been minimized.
This comment has been minimized.
|
issue: preserve the originating graph instance or incarnation through send and refuse a delayed acknowledgement when that identity no longer matches. The portable probe delays the unbound-message acknowledgement, closes the original tab, opens a different graph at the same path, then releases the response; the replacement path is incorrectly assigned Retry contract, downloadable evidence, and ownershipThe component result proves wrong binding, not executed wrong-canvas rendering. Separately, after a lost response the retry sends Download the exact probe patch and validation transcript. The gate matrix translates the internal role12 lane into its browser/service clearance responsibilities. Dante remains the frontend review owner. Real browser/service and distinct-model gates remain incomplete. |
|
Independently verified both points against our own code (not taking the linked report's characterization at face value — that repo is outside our scope and its claims aren't treated as verified evidence). 1. Adoption identity race — confirmed real by code reading, pre-existing, not introduced by this PR.
function bind(workflowId: string, tabPath: string): void {
unbind(tabPath)
refusedInstances.delete(workflowId)
const workflow = workflows.getWorkflowByPath(tabPath) // current occupant, evaluated now
if (workflow) boundInstances.set(workflowId, toRaw(workflow))
...
}
This is real, and matches "pre-existing rather than a regression": I did not independently reproduce this with a running probe/test (Docker/full-stack harness isn't available in this sandbox, and no existing test in our suite exercises "tab closes, a different graph opens at the same path, then a stale ack arrives" — I checked Closing it properly needs a captured tab/graph identity threaded through the async round-trip and checked at adopt time (exactly what's being asked) — that's a real design change to 2. Retry idempotency — this is the same shape as the design gap already documented as a Deviation on the companion PR, Comfy-Org/cloud#10068:
A lost-response retry sending |
|
Filed as PM-1498 in Linear — tab-adoption identity race, pre-existing, out of scope for this PR. Generated by Claude Code |
dante01yoon
left a comment
There was a problem hiding this comment.
Re-review at head fc451cc (1 commit since my review at cdd449c1). I read the full record — the prior review, all five of my threads and your replies — and verified each item against head source rather than against the replies.
Two of the three blocking items are fully resolved, and the third is resolved by disproving my premise rather than by changing the code, which is the better outcome. The remaining blocker is the one you explicitly asked me to decide, so I've decided it below.
Prior findings — verdicts
| # | Finding | Verdict | Evidence at head |
|---|---|---|---|
| 1 | Hand-edited generated files (types.gen.ts/zod.gen.ts are openapi-ts output; openapi.yaml gitignored; output.clean: true deletes the field on the next regen) |
Still open — narrowed | Real diligence here: you ran the actual projection + openapi-ts pipeline and isolated the delta against a same-pipeline regen of cloud's main, and you resolved the Motivation/Deviations contradiction (Deviations was the accurate one — the description now says so). But the field is still not on cloud's merged main; it exists only on cloud#10068, which is open. See below for my answer to your question |
| 2 | Generated type isn't load-bearing — body: Record<string, unknown>, so the wire key is unchecked and the claimed benefit doesn't exist |
Resolved | agentRestClient.ts:155 is now const body: AgentPostMessageRequest = { content: req.content }, and I checked every subsequent write (workflow_id, open_tabs, current_tab, workflow_references, selection, attachments, draft, current_tab_unbound) — all are declared fields, none rely on an index signature. So a typo in the wire key, or a regeneration that drops the field, is now a compile error. That's exactly the property I was after |
| 3 | "Once per session" guard is module-scoped while the thread is localStorage-scoped — after F5 the server mints a second workflow |
Resolved | Your answer (1) is correct, and I verified the chain independently rather than taking it: createNewWorkflow calls ensureWorkflowId(structuredClone(workflowData ?? defaultGraph)) and writes it into originalContent/content synchronously (workflowStore.ts:276-280); ensureWorkflowId mints a UUID when absent (workflowId.ts:18-27); graphIdOf falls back to parsing originalContent when activeState is unpopulated (agentWorkflowTabBindingStore.ts:67-81); bind() stores graphIdOf(workflow) ?? null, so non-null (:194-208); tabByWorkflow is useLocalStorage(STORAGE_KEY, {}) (:89), so it survives the reload. claimable's bail-out (record.graphId === null || graphId === undefined → !tab.isTemporary, i.e. false, :126-127) therefore doesn't fire, adoptOpenTab re-populates boundInstances, isVerifiedOwner → matchesWorkflow passes, and cloudIdFor resolves an id — so wfContext.id is defined and unboundTarget is false regardless of boundWorkflowId being null again. The re-mint path I traced doesn't exist. As promised, I'm happy to drop this to a comment |
| 4 | question: the documented field semantics (tab-only) don't match the client's extra boundWorkflowId === null condition |
Resolved | The comment at the gating site (useAgentSession.ts:280-297) now separates the field's own tab-level meaning from boundWorkflowId === null as an explicitly client-side policy narrowing, and names the server-side reason it can't move: the wire contract can't distinguish "the thread's remembered workflow is my own prior unbound mint for this tab" from "an unrelated workflow from a different tab". That's a specific and convincing answer, and deferring the disambiguation as a flagged Deviation is the right call over rushing it |
| 5 | suggestion: .oxlintrc.json ignorePatterns arrives only because the generated files were hand-edited |
Follows item 1 | Still correct on its own terms; it travels with wherever the generated-file change lands |
Your note on the non-blocking residual (turn 2+, tab still unbound, boundWorkflowId already non-null → no draft) is accurate and I agree it's pre-existing: canSendDraft's third clause is literally unboundTarget, so there's no state where the flag goes out without the draft. Leaving it for the server-side reuse-mint work rather than papering it over with an unconditional draft-send is the right trade.
Also worth recording: the new test does the thing I actually wanted. resolves a workflow bound before reload from persisted storage, without re-flagging the tab as unbound pre-seeds Comfy.Agent.WorkflowTabBindings.v2, renders fresh (the reload shape), sets an existing thread id, and asserts both workflow_id resolves and current_tab_unbound is absent. That pins the recovery property, not just graphId non-nullness in isolation.
Your question, answered
"If you'd rather have the generated-file change land only as a real post-merge automated PR regardless, I'll split it — your call, and I'll act on whichever you prefer."
Please split it. Concretely: drop packages/ingest-types/src/{types.gen.ts,zod.gen.ts} and the .oxlintrc.json entry from this PR, and let .github/workflows/push-ingest-types-to-frontend.yml produce them once cloud#10068 merges. Reasoning inline on types.gen.ts:4521 — short version is that I believe your content check, and this isn't about the bytes; it's that the repo's generated package would assert a request field cloud's deployed main doesn't accept, and that the mechanism for getting it here already exists and costs a rebase.
That does mean this PR waits on cloud#10068, which your description already commits to unambiguously ("this PR cannot merge before that one does") — so the ordering isn't a new constraint, just applied to the generated files too. If you'd rather keep the frontend half reviewable and ready in the meantime, splitting is also what lets items 1-5 here sit at approved-modulo-the-dependency.
One process note, offered gently and not as a finding: the regeneration you ran is good verification, but running it against an unmerged branch's spec is the step that makes the output not-yet-generated-output, however byte-identical it is. The check you did is the right check — it just belongs to the follow-up PR.
CI and validation
Green at fc451cc: test (22m), website-unit, all four website-e2e-shard jobs, verify-pack-contents (ingest-types) and the other three pack checks, validate-fonts, validate-licenses — nothing failing.
I did not run any tests or typecheck locally: /workspace is shared and read-only for me, and installing dependencies was out of scope. Everything above is from head source fetched at fc451cc, the cdd449c1...fc451cc compare, ripgrep over the checkout for the unchanged binding/workflow-store files, and CI. I could not verify anything in the cloud repo — cloud#10068's spec, the CurrentTabUnbound handler, or the TestPostMessageUnboundCurrentTabMintsInsteadOfReusingTheThreadWorkflow test — so those are taken from your replies, not checked. Nor could I independently confirm that the projection pipeline produces byte-identical output to what's committed; I'm taking your isolated-diff account at face value, and my ask above doesn't depend on it being wrong.
| /** | ||
| * The client's active editor tab has no workflow yet (a fresh, unsaved tab), so it sends neither workflow_id nor current_tab. Without this signal the turn falls back to the thread's remembered workflow and the fresh tab is presented to the model as having no workflow selected. With it, the turn mints a workflow for the tab instead and that workflow is treated as selected. An explicit workflow_id or a resolvable current_tab still wins. | ||
| */ | ||
| current_tab_unbound?: boolean |
There was a problem hiding this comment.
issue (blocking): my answer to your question — please split this out, and let the post-merge automation produce it.
First, credit where it's due: running the real pipeline (openapi-project -fe → openapi-ts) and isolating the delta against a same-pipeline regen of cloud's unmodified main is a genuinely better answer than I expected, and it rules out the thing I'd have worried about next (unrelated upstream drift riding along — lineage_seq, op_ids, the topup change). I believe the content is right. This isn't about the bytes.
What still doesn't hold is which repo owns the claim. You ran the projection against cloud#10068's branch, not merged main, so the committed output is derived from a spec that doesn't exist yet outside an open PR. Two consequences that survive the verification:
packages/ingest-typesis a shared package, not a private file. Merging this makesAgentPostMessageRequestdeclare a request field the deployed service doesn't accept, for every consumer that reads it — not just this call site, which knows the field is conditional.- Anyone who regenerates before cloud#10068 merges — a spec bump, a dependency update, the scheduled sync — drops the field. Your
body: AgentPostMessageRequestchange (thank you, that one's properly fixed) means that's now a compile error rather than silent drift, which is a real improvement. But it lands as an unrelated PR suddenly failing to build on a file it never touched, which is a confusing place to discover a cross-repo ordering constraint.
The deciding factor for me is that the mechanism already exists: .github/workflows/push-ingest-types-to-frontend.yml produces exactly this diff as a real generated-types PR once cloud#10068 merges. Using it costs a rebase and gets the spec its own review pass — worth having, because the doc text here ("the turn mints a workflow for the tab instead and that workflow is treated as selected") is a behavioural commitment for the server being authored in the consumer.
So: drop types.gen.ts, zod.gen.ts, and the .oxlintrc.json entry from this PR, keep the frontend half (which is in good shape — items 2, 3 and the doc-semantics question are all resolved), and rebase onto the generated-types PR when it lands. Your description already says this PR can't merge before cloud#10068, so the wait isn't new; this just applies the same ordering to the generated files.
Happy to re-review the frontend-only diff promptly.
There was a problem hiding this comment.
Done in f8bcb92.
- Reverted
packages/ingest-types/src/types.gen.ts,zod.gen.ts, and the.oxlintrc.jsonignore entries to exactly this PR's base state (e9a76712291ccfdce6b0912f3d513f597c00edd8) —current_tab_unboundis gone from both generated files, and the two ignore-pattern lines are removed. - Moved the field's typing to a local augmentation at the one call site instead:
agentRestClient.tsnow hastype AgentPostMessageRequestWithUnboundFlag = AgentPostMessageRequest & { current_tab_unbound?: boolean }, used only for the outboundbodyinpostMessage. A one-line comment marks it temporary and points at cloud#10068 / push-ingest-types-to-frontend as the removal trigger. This keeps the exact type-safety property you praised — a typo or a dropped field is still a compile error — without touching the shared package. - The rest of the diff (items 2-4 from your first review) is untouched.
Typecheck, targeted eslint/oxlint on the touched files, and AgentPanelRoot.test.ts + useAgentSession.test.ts (310 passed) all pass. One thing worth flagging: running pnpm oxlint full-repo (no path args) now flags types.gen.ts/zod.gen.ts against comfy/no-duplicate-ingest-type — I confirmed this reproduces identically against this PR's base commit with the ignore entries removed, so it's a pre-existing self-referential false positive in that rule (it has no exemption for the canonical file itself), not something this change introduces. Flagging in case it's worth a follow-up ignore-entry-forever or a rule fix, independent of this PR.
Generated by Claude Code
There was a problem hiding this comment.
Tracked as FE-2684. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
dante01yoon's re-review (PR #18278) asked to revert the hand-run regeneration of packages/ingest-types/src/{types,zod}.gen.ts and the matching .oxlintrc.json ignore entries: current_tab_unbound isn't on cloud's merged main yet (cloud#10068 is still open), so committing it into the shared generated package would let anyone who regenerates before that PR merges silently drop the field. - Revert types.gen.ts, zod.gen.ts, and .oxlintrc.json to their state on this PR's base. - agentRestClient.ts now types its outbound body as a local AgentPostMessageRequestWithUnboundFlag (the generated AgentPostMessageRequest intersected with the one extra field) instead of the bare generated type, so a typo or dropped field is still a compile error without touching the shared package. Delete this once push-ingest-types-to-frontend lands the real field.
|
Thanks for the thorough re-review, @dante01yoon — appreciate you catching the shared-package risk on the unmerged cloud#10068 field. Pushed f8bcb92 addressing the last blocking item: reverted Generated by Claude Code |
…ilding logic buildPostInput() picked up cyclomatic complexity 10 / CRAP 31.6 from the merge of the PM-1429/PM-1430 unbound-tab logic with main's selectedWorkflowId/selectedNodes logic. Extract the unboundTarget computation into isUnboundTarget() and the currentTabUnbound/draft field assembly into buildTargetFields(), moving their branches out of buildPostInput without changing behavior.
|
|
…und for the agent (PM-1430) (#18381) <!-- 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 `core/1.54`. ## Why this is a hand-port, not a cherry-pick `core/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. ## 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 `AgentPostMessageRequestWithUnboundFlag` type shim**: checked `packages/ingest-types` on this branch first — `current_tab_unbound` isn't in the generated types here either (cloud#10068 is merged to cloud's `main` but not yet deployed to production, so the generated types haven't picked it up) — but this branch's `postMessage` already types its outbound `body` as a plain `Record<string, unknown>`, not the generated `AgentPostMessageRequest`, so there's nothing to shim around; the field is just another key on that loosely-typed body. - Ported the regression coverage from #18278, adapted to the old shape and to this branch's `AgentPanelRoot.vue` (which requires an explicit `agentPanelStore.setWorkflowTarget` — via the existing `renderWithSelectedTarget()` test helper — rather than auto-selecting the active workflow on mount, a later `main`-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 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 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 clean `core/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 typecheck`: clean - `pnpm exec oxlint` / `pnpm exec oxfmt --check` on the changed files: clean (pre-commit hook additionally ran `eslint --fix` and `pnpm typecheck`, no changes needed beyond an oxfmt line-wrap) ## Deviations Same caveat as #18278: `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>
…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>
|
|
## Summary Backports the second batch of merged `main` Agent fixes to `cloud/1.54`: the Agent paywall and admission-error handling with its follow-ups, workflow-scoped node selection, the bounded attachment upload contract, and the turn request contract without the draft version. ## Changes - **What**: `cherry-pick -x` of #16856, #18204, #17327, #18229, #16985 and #18224, in `main` merge order. Two adaptation commits: #16856's PM-1430 behavior is replayed in #18278's split form, since this line had it in the old single-function form via #18385; #16985 brings #18104's version of the Undo test. `DraftSnapshot` is `Pick<..., 'content'>` because this line's ingest types keep the draft version optional. - **Excluded**: #18251 (its lint rule needs its `src/lib/litegraph/` hunks, and its lockfile change does not apply to this line). ## Review Focus - #16856 restores the Agent paywall on this line, which is billing-facing. - `useAttachment.ts` and its test are taken whole from `main`, because #16985 asserts `reportError` on its new fetch path. - The four e2e specs this changes were not run locally; hosted e2e covers them. Linear: [PM-1656](https://linear.app/comfyorg/issue/PM-1656) ## Screenshots (if applicable) No new visuals. --------- Co-authored-by: Christian Byrne <cbyrne@comfy.org>
|
|
|
|
Now that a saved tab with an unresolved cloud id yields an id-less turn context instead of none, the unbound-target predicate from #18278 must also require isTemporary, or such a tab would ask the server to mint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Requested by Jo Zhang, Christian Byrne · Slack thread
ELI5
Open a brand-new, never-saved tab and start a brand-new chat, and the panel correctly shows that chat pointed at the new tab — but the message it actually sent to the server carried no way to tell "a tab is selected, it just hasn't been saved yet" apart from "nothing is selected at all". The server treated both the same way and told the assistant no workflow was selected, so it declined to add the node you asked for. This adds the missing signal, keeps it attached to the tab's actual content, makes sure it only fires once per session, and types the wire write against the real generated contract.
Motivation
A tester (reported via internal feedback tracking, PM-1429/PM-1430) created a new tab, started a new chat, hand-placed a node, and asked the agent to add a text input node; the agent refused with "I can't because you don't have a workflow selected to edit" even though the panel showed the tab as bound. That refusal path traces to a request field the server's code already understands (on a not-yet-merged branch — see Deviations) but that no client has ever sent, so every brand-new-tab-plus-brand-new-chat turn looks, server-side, identical to no tab being selected at all.
Provenance
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: 376 passed, 2 expected-fail (pre-existing, unrelated);pnpm typecheck: clean;pnpm oxlint/pnpm oxfmt --checkon the changed files: clean.packages/ingest-types/src/{types.gen.ts,zod.gen.ts}verified by actually running the regeneration pipeline (services/ingest/scripts/openapi-project -feagainst the companion cloud branch, thenopenapi-ts) and diffing against a same-pipeline regen of cloud's unmodifiedmainto isolate this field from unrelated upstream drift — see PR comments for the full tracecurrent_tab_unboundis not yet on cloud's mergedmain— it exists only on the open companion PR (cloud#10068) — so this PR cannot merge before that one does. Fully satisfying the reported acceptance criteria (the agent adding the node instead of refusing) needs that server-side change, because the server's existing signal was never wired into the "is a workflow selected" framing shown to the modelReviewer context
Summary
PostMessageInput(agentRestClient.ts) gains an optionalcurrentTabUnboundfield, serialized ascurrent_tab_unboundon the wire; the outboundbodyis now typed as the generatedAgentPostMessageRequest(notRecord<string, unknown>), so the field is a real compile-time contract, not just a doc-comment referenceuseAgentSession.ts'sbuildPostInputsets it whenever the turn's target tab is known but has no cloud id yet (a fresh, unsaved tab) AND no workflow has been bound this session yet (boundWorkflowId === null) — the second condition keeps a still-unresolved tab from re-triggering a fresh mint on every turn; the code comment at that gate now spells out that this narrowing is a client-side policy choice, not part of the wire field's own (tab-level) contractcanSendDraftships the draft whenever that same unbound-target condition holds, even past a thread's literal first ("new") turn — otherwise the server's mint would start from an empty canvas instead of the tab's actual contentbind()time (ensureWorkflowIdruns before the tab is ever open), so a page reload's loss of the session-onlyboundWorkflowIddoesn't strand the binding — the persisted (localStorage) binding store recovers it independentlyTest plan
current_tab_unboundsent,workflow_idstill present)🤖 Generated with Claude Code
https://claude.ai/code/session_01JJ6wnHBJsZs88S22MCKGLT