Repository navigation
fix(agent): land agent-inserted template nodes near existing canvas content - #18084
christian-byrne merged 11 commits into
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 |
🎭 Playwright: ✅ 2061 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 9.93 MB gzip 🟢 -8 BDetailsSummary
Category Glance App Entry Points — 3.81 kB (baseline 3.81 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.46 MB (baseline 1.46 MB) • 🔴 +45 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 — 638 kB (baseline 638 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: 6 added / 6 removed / 5 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 124 kB (baseline 124 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed / 9 unchanged Data & Services — 3.87 MB (baseline 3.87 MB) • 🔴 +233 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 3 unchanged Utilities & Hooks — 566 kB (baseline 566 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 19 added / 19 removed / 19 unchanged Vendor & Third-Party — 17.4 MB (baseline 17.4 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 17.7 MB (baseline 17.7 MB) • ⚪ 0 BBundles that do not match a named category
Status: 73 added / 73 removed / 228 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-20T09:27:37.765Z",
"gitSha": "086fbe399c63bf0a42bd51fbc5183df5e7f23bcb",
"branch": "christian-byrne/pm-1143-agent-template-placement-tests",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2020.1090000000477,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.780999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 407.27500000000003,
"heapDeltaBytes": -1335132,
"heapUsedBytes": 60642600,
"domNodes": -261,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 8.430999999999997,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2000.6399999999758,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.840999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 340.777,
"heapDeltaBytes": -1027080,
"heapUsedBytes": 60946240,
"domNodes": -264,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 8.690999999999997,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1833.2249999999704,
"styleRecalcs": 77,
"styleRecalcDurationMs": 28.599,
"layouts": 14,
"layoutDurationMs": 4.069,
"taskDurationMs": 838.0370000000001,
"heapDeltaBytes": 13481688,
"heapUsedBytes": 75562096,
"domNodes": -263,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 164.605,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1841.780999999969,
"styleRecalcs": 78,
"styleRecalcDurationMs": 29.7,
"layouts": 14,
"layoutDurationMs": 4.119999999999999,
"taskDurationMs": 859.4430000000002,
"heapDeltaBytes": 13389700,
"heapUsedBytes": 75565684,
"domNodes": -261,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 169.40099999999998,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1666.5160000000014,
"styleRecalcs": 31,
"styleRecalcDurationMs": 14.453000000000001,
"layouts": 6,
"layoutDurationMs": 1.071,
"taskDurationMs": 333.43199999999996,
"heapDeltaBytes": 2065932,
"heapUsedBytes": 64328768,
"domNodes": 75,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 10.162999999999998,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1707.9760000000306,
"styleRecalcs": 31,
"styleRecalcDurationMs": 15.547,
"layouts": 6,
"layoutDurationMs": 1.217,
"taskDurationMs": 324.80699999999996,
"heapDeltaBytes": 2316184,
"heapUsedBytes": 63687656,
"domNodes": 75,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 10.072000000000001,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 629.8330000000192,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.281999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 450.874,
"heapDeltaBytes": 18472840,
"heapUsedBytes": 80712636,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 172.21800000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 631.7719999999554,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.359,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 448.91700000000003,
"heapDeltaBytes": 18197964,
"heapUsedBytes": 80210068,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 169.741,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2020.5030000000193,
"styleRecalcs": 6,
"styleRecalcDurationMs": 5.487000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 561.369,
"heapDeltaBytes": 2951344,
"heapUsedBytes": 83034544,
"domNodes": -249,
"jsHeapTotalBytes": -1581056,
"scriptDurationMs": 31.629999999999992,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2038.7130000000298,
"styleRecalcs": 6,
"styleRecalcDurationMs": 6.637999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 570.059,
"heapDeltaBytes": 1841708,
"heapUsedBytes": 82993076,
"domNodes": -250,
"jsHeapTotalBytes": -1019904,
"scriptDurationMs": 30.996999999999996,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2305.714000000023,
"styleRecalcs": 65,
"styleRecalcDurationMs": 9.721,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1624.4359999999997,
"heapDeltaBytes": 2511940,
"heapUsedBytes": 84418104,
"domNodes": -254,
"jsHeapTotalBytes": 1040384,
"scriptDurationMs": 852.5970000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2344.6820000000343,
"styleRecalcs": 66,
"styleRecalcDurationMs": 11.517999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1689.883,
"heapDeltaBytes": 2497720,
"heapUsedBytes": 84546356,
"domNodes": -257,
"jsHeapTotalBytes": 778240,
"scriptDurationMs": 868.1659999999999,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3491.507000000013,
"styleRecalcs": 61,
"styleRecalcDurationMs": 10.464999999999998,
"layouts": 60,
"layoutDurationMs": 12.844000000000001,
"taskDurationMs": 1522.9600000000003,
"heapDeltaBytes": 9373468,
"heapUsedBytes": 74716132,
"domNodes": 2,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 785.3720000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3556.239000000005,
"styleRecalcs": 62,
"styleRecalcDurationMs": 11.297999999999998,
"layouts": 60,
"layoutDurationMs": 12.921999999999999,
"taskDurationMs": 1698.6720000000003,
"heapDeltaBytes": 9567064,
"heapUsedBytes": 74771572,
"domNodes": -257,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 802.971,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3069.8769999999627,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.678000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1887.7199999999998,
"heapDeltaBytes": 21760860,
"heapUsedBytes": 87605276,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 974.766,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666696,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3109.0730000000804,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.784,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1937.4520000000002,
"heapDeltaBytes": 26654728,
"heapUsedBytes": 92351300,
"domNodes": 0,
"jsHeapTotalBytes": 679936,
"scriptDurationMs": 993.0769999999999,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2019.6359999999913,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.199999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 538.276,
"heapDeltaBytes": -4527144,
"heapUsedBytes": 83958160,
"domNodes": -252,
"jsHeapTotalBytes": -1544192,
"scriptDurationMs": 34.039,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2028.4189999999853,
"styleRecalcs": 6,
"styleRecalcDurationMs": 6.465000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 455.02199999999993,
"heapDeltaBytes": -8245892,
"heapUsedBytes": 80266216,
"domNodes": -256,
"jsHeapTotalBytes": -757760,
"scriptDurationMs": 32.888,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 579.0090000000419,
"styleRecalcs": 48,
"styleRecalcDurationMs": 11.472000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 406.78200000000004,
"heapDeltaBytes": 13902828,
"heapUsedBytes": 77377916,
"domNodes": 22,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 144.72000000000003,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 573.5530000000608,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.348000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 411.019,
"heapDeltaBytes": 13597720,
"heapUsedBytes": 76896140,
"domNodes": 20,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 147.744,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2001.0960000000182,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.5070000000000014,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 448.784,
"heapDeltaBytes": -7712028,
"heapUsedBytes": 55463872,
"domNodes": -278,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 7.314999999999999,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2005.6540000000496,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.033,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 447.2900000000001,
"heapDeltaBytes": 17592880,
"heapUsedBytes": 81075432,
"domNodes": -276,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 7.7669999999999995,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1708.6530000000266,
"styleRecalcs": 77,
"styleRecalcDurationMs": 28.629999999999995,
"layouts": 18,
"layoutDurationMs": 5.064000000000001,
"taskDurationMs": 799.017,
"heapDeltaBytes": 713820,
"heapUsedBytes": 64236448,
"domNodes": -277,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 110.29399999999998,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1727.4270000000342,
"styleRecalcs": 78,
"styleRecalcDurationMs": 25.620000000000005,
"layouts": 18,
"layoutDurationMs": 4.868000000000001,
"taskDurationMs": 775.862,
"heapDeltaBytes": -1359812,
"heapUsedBytes": 61285924,
"domNodes": -277,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 107.23299999999999,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 933.0480000000421,
"styleRecalcs": 18,
"styleRecalcDurationMs": 29.875999999999994,
"layouts": 5,
"layoutDurationMs": 13.676,
"taskDurationMs": 730.9870000000001,
"heapDeltaBytes": 19917584,
"heapUsedBytes": 102880476,
"domNodes": 13587,
"jsHeapTotalBytes": 10747904,
"scriptDurationMs": 27.413000000000007,
"eventListeners": 2383,
"totalBlockingTimeMs": 145,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8282.183000000032,
"styleRecalcs": 246,
"styleRecalcDurationMs": 34.996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5123.675,
"heapDeltaBytes": -4666948,
"heapUsedBytes": 76142832,
"domNodes": -253,
"jsHeapTotalBytes": 221184,
"scriptDurationMs": 2777.772,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8363.472000000002,
"styleRecalcs": 248,
"styleRecalcDurationMs": 34.58,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5807.33,
"heapDeltaBytes": -4057288,
"heapUsedBytes": 76842872,
"domNodes": -249,
"jsHeapTotalBytes": 221184,
"scriptDurationMs": 2848.5260000000003,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17454.77199999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16795.376,
"heapDeltaBytes": -26774868,
"heapUsedBytes": 192380996,
"domNodes": -8061,
"jsHeapTotalBytes": -7274496,
"scriptDurationMs": 277.04499999999996,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 16917.40100000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16490.323000000004,
"heapDeltaBytes": -42141528,
"heapUsedBytes": 200013600,
"domNodes": -8061,
"jsHeapTotalBytes": -10084352,
"scriptDurationMs": 268.419,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20998.10500000001,
"styleRecalcs": 167,
"styleRecalcDurationMs": 18.067,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20572.729000000003,
"heapDeltaBytes": -23438452,
"heapUsedBytes": 191308528,
"domNodes": -8061,
"jsHeapTotalBytes": -16068608,
"scriptDurationMs": 916.4910000000001,
"eventListeners": -14928,
"totalBlockingTimeMs": 148,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 16142.84500000008,
"styleRecalcs": 83,
"styleRecalcDurationMs": 12.610999999999983,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15628.167000000001,
"heapDeltaBytes": -59062944,
"heapUsedBytes": 179338936,
"domNodes": -8061,
"jsHeapTotalBytes": -18321408,
"scriptDurationMs": 857.418,
"eventListeners": -14928,
"totalBlockingTimeMs": 8,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 6271.364000000005,
"styleRecalcs": 20,
"styleRecalcDurationMs": 84.30100000000002,
"layouts": 20,
"layoutDurationMs": 25.345000000000006,
"taskDurationMs": 6149.714,
"heapDeltaBytes": -55166628,
"heapUsedBytes": 180557688,
"domNodes": -8061,
"jsHeapTotalBytes": 11993088,
"scriptDurationMs": 114.205,
"eventListeners": -14928,
"totalBlockingTimeMs": 502,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6137.827000000016,
"styleRecalcs": 20,
"styleRecalcDurationMs": 79.344,
"layouts": 20,
"layoutDurationMs": 23.469000000000005,
"taskDurationMs": 6047.994999999999,
"heapDeltaBytes": -59022340,
"heapUsedBytes": 179809608,
"domNodes": -8061,
"jsHeapTotalBytes": 8994816,
"scriptDurationMs": 108.3,
"eventListeners": -14928,
"totalBlockingTimeMs": 417,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8564.624999999978,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8298.610000000002,
"heapDeltaBytes": -10948612,
"heapUsedBytes": 170100864,
"domNodes": 0,
"jsHeapTotalBytes": -25690112,
"scriptDurationMs": 143.94799999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8485.89000000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8303.588999999998,
"heapDeltaBytes": -12559672,
"heapUsedBytes": 180902056,
"domNodes": 0,
"jsHeapTotalBytes": -16777216,
"scriptDurationMs": 158.93099999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 480.62099999992824,
"styleRecalcs": 18,
"styleRecalcDurationMs": 22.211000000000002,
"layouts": 4,
"layoutDurationMs": 2.2300000000000004,
"taskDurationMs": 140.84300000000002,
"heapDeltaBytes": 5360140,
"heapUsedBytes": 67057596,
"domNodes": 147,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 19.688,
"eventListeners": 81,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 112.3929999999973,
"styleRecalcs": 8,
"styleRecalcDurationMs": 15.055000000000001,
"layouts": 2,
"layoutDurationMs": 0.794,
"taskDurationMs": 78.19200000000001,
"heapDeltaBytes": 3063832,
"heapUsedBytes": 64800704,
"domNodes": 108,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 7.061000000000002,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🌾 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. Fallow gates on new findings in changed files only, so everything below was introduced or moved by this PR (20 changed files).
Pre-existing findings are baselined in Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 82c12d82a5421f1256193b97e45d438507365e75
Full docs: ADR-DEVEX-LINT-0015 🧩 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 |
88b26a0 to
889e680
Compare
Is the fix trivial? No — recommend deliberation before implementingThe raw fix ( Architectural blocker: the primitives a fix would need — current viewport/camera transform ( Open questions that need a human call, not a frontend patch:
Given these, we're not pushing a behavioral fix to this PR. Recommend discussing the questions above, then scoping a follow-up PR (frontend mitigation and/or a cloud-repo fix) once decided. Generated by Claude Code |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #18084 +/- ##
==========================================
+ Coverage 82.93% 83.90% +0.97%
==========================================
Files 2954 2260 -694
Lines 145515 128546 -16969
Branches 39362 32749 -6613
==========================================
- Hits 120681 107855 -12826
+ Misses 23564 20401 -3163
+ Partials 1270 290 -980
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 707 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Playwright videos for new testsDownload the recorded videos and HTML report Recorded projects: cloud Recorded test titles:
|
|
Implemented per ADR-CRDT-PLACEMENT-0035 (added in this PR): a batch of agent wire The adversarial review changed three things: eligibility keys on the queued wire op rather than the prepared kind (a resync materializing a missing subgraph host prepares as an add and must not move — now regression-tested), Test flips, verified locally against a dev server (cloud distribution): Generated by Claude Code |
…ntent Regression tests for the agent-inserted template placement bug: when the in-app Comfy Agent inserts a template's nodes via the CRDT add_node path onto a canvas that already has content, the nodes land at the template's raw baked-in absolute coordinates, with no adjustment for what is already on the canvas or the current viewport. - src/workbench/extensions/agent/crdt/graphMutations.test.ts: unit test (it.fails) proving prepareNode()/graphMutations.addNode() forwards payload.pos to the layout port verbatim, even when it lands thousands of px from an existing node. - browser_tests/tests/agent/agentTemplatePlacement.spec.ts: e2e test (test.fail) driving the real CRDT follower and canvas the way agent-integration-replay does, with a hand-built conversation (no live cloud stack available to record one). Seeds one existing node, applies template-shaped add_node ops far away, asserts the inserted nodes stay within a reasonable margin of the existing node, and attaches two screenshots as visual proof of the disconnected result. Both currently fail for the expected reason (raw far-apart coordinates), not a setup error.
A batch of wire add_node ops whose hull is disconnected from and offscreen of existing content is translated as one unit to sit beside that content, preserving its internal layout (ADR-CRDT-PLACEMENT-0035). - batchPlacement.ts: pure placement decision (hulls, gap threshold, viewport veto, single shared offset). - graphMutations.ts: prepared adds carry their queued origin so only wire add_node ops are eligible; resync-driven materializations (reconcileNode/reconcileNodeFields) always keep doc coordinates. The offset lands on the layout command and on lastSerialization.pos, which the materializer configures from. - AgentPanelRoot.vue: renderer-owned SemanticPlacementPort injected beside the existing layout port; the viewport counts only while the displayed graph is the target scope. - docs/adr: ADR-CRDT-PLACEMENT-0035 records the decision, alternatives, and accepted tradeoffs. - Tests: batchPlacement unit table; the placement regressions flipped from it.fails/test.fail() to green; resync-materialization keeps doc coordinates; the e2e waits for the catch-up frame before inserting, matching production ordering.
fc5ac91 to
5724c81
Compare
The template placement harness still clicked the 'Ask Comfy Agent' button, whose label became 'Agent' (sourced from the entryButton locale key) when the button moved to the far right of the tab bar. The locator never resolved and the spec hung to its 60s timeout. Resolve the label from the locale file, like the shared agent fixtures do.
…mplate-placement-tests' into HEAD
christian-byrne
left a comment
There was a problem hiding this comment.
Batch geometry and recovery boundaries verified. Integration refresh preserves concurrent work.
Full context for agent readers
Reviewed this exact head. Selected this implementation over the per-node alternative because it translates a fresh batch rigidly, preserves visible/nearby content and leaves recovery coordinates unchanged. Incoming live-widget projection and the concurrent author refresh are both retained.
Verification: 695 synchronized-graph tests pass with one existing expected failure; 24 focused live-widget tests pass after concurrent-refresh integration; source/browser typechecks, lint, format and Knip pass. Cloud browser placement passes, fails the distance assertion when translation is temporarily disabled, then passes after restoration. That is a disabled-feature control, not a literal pre-fix checkout. Inspected screenshots show the existing note and three template nodes together without panel occlusion. Final integration differs from the tested production tree only in placement-property ordering inside one test fixture.
This is client placement, not durable server placement or rejected-local-operation recovery. The design record stays Proposed. The native follow-through and program task claude-handoff-11 keep Christian responsible for original incident and both 1.54 release acceptance. Native checks and the normal queue remain required.
…43-agent-template-placement-tests
…fixture The prompt-reconcile suite added on main (#18098) constructs createGraphMutations without the placement port this branch made a required dependency, so every CI job that typechecks the PR merge ref failed. The inert placement fixture keeps that suite's behavior unchanged.
christian-byrne
left a comment
There was a problem hiding this comment.
Reviewed the author refresh. Placement behavior is unchanged; the new reconciliation fixture now supplies its required placement dependency.
Full context for agent readers
Reviewed the refreshed head. The merge has no conflict-resolution diff, and the follow-up changes only the new prompt-reconciliation test to use the existing inert placement port. The earlier placement browser and geometry evidence is reused, not claimed as a new browser run. Fresh prompt-reconciliation coverage passes with one existing expected failure; source typecheck passes. These local checks ran on Node 25.9.0 and emitted an engine warning requesting Node 26; hosted checks remain gates.
Original-incident and both release targets remain open under placement follow-through. No server-placement or rejected-operation recovery claim. Use the normal merge queue only.
…#18070) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789610676316069?thread_ts=1789610676.316069&cid=C0BGH348Z0C)_ ## Summary Fixes the false "invalid" red ring on combo widgets in agent workflow tabs by closing both mechanisms behind it. **Before:** repro-only. Two `it.fails` pins: `WidgetSelectDefault` marking an agent-created node's placeholder widget (`options: {}`) invalid, and `graphMutations.setWidget` writing the widget store without ever reaching the live widget's `callback`. **After:** - **Mechanism A (placeholder window)**: `WidgetSelectDefault.isInvalid` no longer flags a value while `options.values` is still undefined, so a placeholder widget's legitimate value renders clean until the node materializes. - **Mechanism B (contract gap)**: agent writes now run the same live-widget effects a human edit runs, per [ADR-CRDT-WIDGETS-0036](docs/adr/CRDT-WIDGETS-0036-agent-widget-writes-run-live-widget-effects.md). `GraphMutationsDeps` gains a required renderer-owned `widgets: SemanticWidgetEffectPort`; both follower write paths (named `set_widget`, positional reconcile) go through one `applyWidgetWrite` helper; a batch records an effect only when the write applied and the store's post-write value differs from the previous one (`Object.is` for primitives, structural equality for objects, so the clone every doc value takes cannot count as a change and a normalizing callback cannot loop through its mint echo); effects drain after `commit` in payload order, each call isolated behind `reportError('error_applying_agent_widget_effects')`. The new `createLiveWidgetEffectPort` resolves the live node the way the Vue render model does (`resolveLiveWidget`), requires the store to still own it (so an orphan left by an in-batch replace or delete never receives its successor's value), then assigns `widget.value`, runs `callback(value, canvas, node)` and `node.onWidgetChanged`, and redraws. Wired in `AgentPanelRoot.vue`. Concrete beneficiaries beyond the ring: Custom Combo's `option*` value setters (agent edits now rebuild its option list) and `PrimitiveNode`'s `callback → applyToGraph` (agent edits to a primitive now propagate to linked targets). An agent write also clears `required_input_missing` for that widget through the existing `onWidgetChanged` hook. ## Changes - `docs/adr/CRDT-WIDGETS-0036-agent-widget-writes-run-live-widget-effects.md` (+ README index row): the design, amended after adversarial review (structural change gate, ownership gating, placeholder semantics by live-node presence, `onWidgetChanged` contract, reentrancy and drain order, subgraph note). - `src/workbench/extensions/agent/crdt/graphMutations.ts`: `SemanticWidgetEffectPort`, `applyWidgetWrite`, post-commit drain. - `src/workbench/extensions/agent/crdt/liveWidgetEffects.ts` (new): `createLiveWidgetEffectPort({ getGraph, getCanvas })`, with the guards in a `resolveLiveWidget` helper. - `src/workbench/extensions/agent/crdt/__fixtures__/widgetEffectPorts.ts` (new): inert and recording ports for the other construction sites. - `src/workbench/extensions/agent/AgentPanelRoot.vue`: wiring. - `src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue`: mechanism A. - Tests: the placeholder repro now a plain `it` (fixture adapted to a live `LGraph`; assertion unchanged); port-contract table in `graphMutations.test.ts`; `liveWidgetEffects.test.ts` (callback and `onWidgetChanged` arguments, no-ops for store-only nodes, missing widgets, a foreign root graph, the orphan after an in-batch `replaceNode`, drain-time resolution, `required_input_missing` clearing); mint-echo test in `agentCrdtProjection.integration.test.ts` (a callback that rewrites its own object value mints one human `set_widget`; the echo frame mints nothing). ## Red-Green Verification | Commit | CI | Purpose | |--------|----|---------| | `test(agent): pin live widget effects for agent writes` | red | Proves the tests catch the gap | | `fix(agent): run the live widget's effects for agent widget writes` | green | Proves the fix resolves it | ## Scope notes - The autogrow / node-field display bugs are out of scope here; they are a different mechanism (`prepareNode` replacing live node fields wholesale) and are owned by Comfy-Org#18081. - **Comfy-Org#18089** pins that a doc value must not overwrite a newer local value. Its recency guard lands inside the same `applyWidgetWrite` helper introduced here and should report `applied: false`, which by construction records no effect. Expect a small merge on that helper and on the `GraphMutationsDeps` type (Comfy-Org#18084 adds `placement`). - Extension authors: a widget's `callback` and its node's `onWidgetChanged` now also fire when the in-app agent changes the value, with `(value, canvas, node)` and no pointer arguments. Treat it as programmatic, like a remote option refresh. - Ring clearance for a combo whose callback rebuilds `options.values` additionally depends on that mutation being reactive (Custom Combo's `shallowReactive` splice is; a raw `widget.options.values = …` write is not). Documented in the ADR; a renderer concern outside this PR. - No e2e added: the agent replay harness needs a live CRDT-enabled backend. A follow-up may pin `aria-invalid` absence after an agent set plus tab switch next to `agentTabSwitchCatchUp.spec.ts`. ## Review Focus - `graphMutations.ts` `writeWidget` / `applyWidgetWrite` and the drain in `batch`. - `liveWidgetEffects.ts` ownership check (`useNodeDataStore().ownsNode`) and root-graph guard. - `pnpm exec vitest run src/workbench/extensions/agent/ src/renderer/extensions/vueNodes/widgets/ src/stores/`: all pass, 1 expected fail (pre-existing serialize pin). `pnpm typecheck`, `pnpm lint`, `pnpm format:check`, `pnpm knip`: clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Nxv4TewGb9qXkwjUMofZ8D --- _Generated by [Claude Code](https://claude.ai/code/session_01Nxv4TewGb9qXkwjUMofZ8D)_ --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: bymyself <cbyrne@comfy.org>
Adapt the placement port to the release-line graph mutation and layout-store APIs. The retired prompt-reconcile test remains omitted. (cherry picked from commit 1319876)
Adapt the placement port to the release-line graph mutation and layout-store APIs. The retired prompt-reconcile test remains omitted. (cherry picked from commit 1319876)
Keeps both ADR index rows, supplies the inert placement fixture to the one rollback test that constructs createGraphMutations without the port #18084 made a required dependency, and folds the branch's agentObjectInfo option into the objectInfo option main added for the same purpose.
## Summary Seventeen non-billing Agent sources are carried for `core/1.54`. Exact-head hosted checks and target-native replay acceptance pass; review remains. <details><summary>Full context for agent readers</summary> ## Changes - **Sources**: [18113](#18113), [18096](#18096), [18122](#18122), [18164](#18164), [18121](#18121), [18148](#18148), [18111](#18111), [18174](#18174), [17912](#17912), [18081](#18081), [16936](#16936), [18183](#18183), [18197](#18197), [18070](#18070), [18084](#18084), [18071](#18071), and [18107](#18107). - **New in this head**: PR 18107 rejects incompatible Agent-created links, retires incompatible retained links from the local projection, and keeps one bad link from blocking unrelated later edits. Main-only Load3D coverage is adapted onto the release-local unit, `HostDoc`, and tab-return harnesses. - **Dependencies**: no new package dependency; release lockfile pins are preserved. - **Exclusions**: billing/account work, protected source [17730](#17730), target-specific screenshot source [18168](#18168), separately owned focused carriers, and [18123](#18123), whose generic Vue-node test depends on [17576](#17576), absent from this release line. ## Review focus - PR 16936 adapts widget-state rebinding to the 1.54 store API without importing `main`'s newer visibility architecture. - PR 18070 runs target-local live widget projection callbacks with the canvas and owner node while retaining the release projection boundary. - PR 18084 adds placement as a renderer-owned port; resync materializations retain document coordinates, while new offscreen batches move together beside existing content. - The release browser harness seeds the same client-only API-node colors that normal node registration owns before testing whether a later CRDT reconcile preserves them. - This is not behavioral acceptance, deployment authorization, or a merge-check waiver. ## Exact-head verification Current head: `2bd4dace2e6207fede11d2ac219d691a811769dc`, verified under Node 25.9.0 and pnpm 11.13.1. - main typecheck passed with an 8 GiB heap at the production-identical parent; this head changes only the browser harness lifecycle; - the prior 146-test selection passed with 1 expected failure; - after repairing idempotent replay, 119 focused tests passed with 1 expected failure; - the exact head passes browser typecheck and adds a target-native check that the missing checkpoint value and `aria-invalid=true` survive tab return; - ancestor head `bd7da3cffd6dc349e1c48c5a277bc112cabd0e41` passed one zero-retry target-native warning-retention case with an inspected final frame; its [durable QA receipt](https://github.com/christian-byrne/in-app-agent-program/blob/7fa0ba4d731f00684388a45f1aeb1d24dc6f2280/reports/pr-ownership/2026-09-20-missing-model-tab-warning.md#1145-utc-exact-core-native-case-passes-final-warning-frame-inspected) is ancestry evidence, not acceptance of this newer head; - frozen installation and main typecheck pass at the production-identical parent; browser typecheck, target-native browser collection, formatting, ESLint, fixture mint/projection, and diff checks pass at this exact head; - the extended browser case commits pasted-node operations through the real `HostDoc` and asserts the pasted position survives another tab retarget; - parent head `389a3718bd2f637f704bde349068cbfd87cd9542` passed warning, node-presentation, and viewport assertions but stopped before paste because the zoom popup backdrop intercepted node selection; this head closes the popup through its real toggle and asserts it hidden before selection; - the first PR 18107 browser head stopped before app boot because the force-input string sink serialized one widget value while declaring no widgets; this head removes that non-widget value, and the exact fixture contract now mints and projects successfully; - parent head `366e0287095876351377f873688fece88eb90397` reached local paste but had already closed the Agent panel, which unmounted `AgentPanelRoot`, detached mint-port wiring, and disposed the CRDT follower; this head preserves the closed-panel screenshot, then reopens the panel and requires a fresh workflow subscription before mutation while retaining the unchanged `HostDoc` assertion; - one zero-retry target-native invocation passed the complete case at 13:44:02 UTC: warning retention, node presentation, popup closure, fresh subscription, local and host paste position after a second retarget, incompatible-link retirement, and the subsequent Agent edit; the [durable QA receipt](https://github.com/christian-byrne/in-app-agent-program/blob/28f5a4bb05318cc4e1a95d819951f7924bf9d2c2/reports/pr-ownership/2026-09-20-missing-model-tab-warning.md#1345-utc-both-lifecycle-corrected-candidates-pass-the-complete-native-case) includes inspected frames and cleanup; - PR 18107's exact-head focused coverage passes 63 tests with 1 expected failure; main and browser typechecks, targeted formatting and ESLint, and three affected Cloud-project browser cases also collect successfully; - targeted format and ESLint passed; - three affected Cloud-project browser cases collected successfully. Exact-head hosted checks and target-native replay acceptance pass. Review and the release-target merge-readiness gate remain required before merge. No deployment or check waiver is authorized. </details> Justification: Authorized Agent 1.54 release backport aggregate merged without standing human approval under the published release-backport authority; exact-head hosted checks, target-native replay acceptance, target-aware merge guard, adaptation review, and absence of unresolved human objections limit risk. --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: uytieu <uytieu@users.noreply.github.com> Co-authored-by: jaeone94 <89377375+jaeone94@users.noreply.github.com>
## Summary Seventeen non-billing Agent sources are carried for `cloud/1.54`. The candidate now contains release `1.54.12`; fresh hosted checks and target-native replay acceptance passed. <details><summary>Full context for agent readers</summary> ## Changes - **Sources**: [18113](#18113), [18096](#18096), [18122](#18122), [18164](#18164), [18121](#18121), [18148](#18148), [18111](#18111), [18174](#18174), [17912](#17912), [18081](#18081), [16936](#16936), [18183](#18183), [18197](#18197), [18070](#18070), [18084](#18084), [18071](#18071), and [18107](#18107). - **New in this head**: PR 18107 rejects incompatible Agent-created links, retires incompatible retained links from the local projection, and keeps one bad link from blocking unrelated later edits. Main-only Load3D coverage is adapted onto the release-local unit, `HostDoc`, and tab-return harnesses. - **Dependencies**: no new package dependency; release lockfile pins are preserved. - **Exclusions**: billing/account work, protected source [17730](#17730), target-specific screenshot source [18168](#18168), separately owned focused carriers, and [18123](#18123), whose generic Vue-node test depends on [17576](#17576), absent from this release line. ## Review focus - PR 16936 adapts widget-state rebinding to the 1.54 store API without importing `main`'s newer visibility architecture. - PR 18070 runs target-local live widget projection callbacks with the canvas and owner node while retaining the release projection boundary. - PR 18084 adds placement as a renderer-owned port; resync materializations retain document coordinates, while new offscreen batches move together beside existing content. - The release browser harness seeds the same client-only API-node colors that normal node registration owns before testing whether a later CRDT reconcile preserves them. - This is not behavioral acceptance, deployment authorization, or a merge-check waiver. ## Exact-head verification Current head: `aabd82168d2d7b2f1b9f685a5477dcdc491d3b02`, verified locally under Node 25.9.0 and pnpm 11.13.1. - merged current `cloud/1.54` tip `d2667baf6bdb8664821b4bed7a7f5a1df65f9f49` cleanly; the imported release delta is limited to the package version and locale data; - frozen installation, 174 focused Agent/missing-model tests with 1 expected failure, main and browser typechecks, formatting, full ESLint with zero errors, the Cloud production build, target ancestry, and diff checks pass locally; - fresh exact-head hosted checks and one zero-retry target-native replay passed after the release target changed; - main typecheck passed with an 8 GiB heap at the production-identical parent; this head changes only the browser harness lifecycle; - the prior 146-test selection passed with 1 expected failure; - after repairing idempotent replay, 119 focused tests passed with 1 expected failure; - the exact head passes browser typecheck and adds a target-native check that the missing checkpoint value and `aria-invalid=true` survive tab return; - frozen installation and main typecheck pass at the production-identical parent; browser typecheck, target-native browser collection, formatting, ESLint, fixture mint/projection, and diff checks pass at this exact head; - the extended browser case commits pasted-node operations through the real `HostDoc` and asserts the pasted position survives another tab retarget; - parent head `dfe99947cffb5f31c5f4750113eb9770720e5eac` passed warning, node-presentation, and viewport assertions but stopped before paste because the zoom popup backdrop intercepted node selection; this head closes the popup through its real toggle and asserts it hidden before selection; - the first PR 18107 browser head stopped before app boot because the force-input string sink serialized one widget value while declaring no widgets; this head removes that non-widget value, and the exact fixture contract now mints and projects successfully; - parent head `5ec6c64e9b78b56b12350ae732dc1e1ea20052e0` reached local paste but had already closed the Agent panel, which unmounted `AgentPanelRoot`, detached mint-port wiring, and disposed the CRDT follower; this head preserves the closed-panel screenshot, then reopens the panel and requires a fresh workflow subscription before mutation while retaining the unchanged `HostDoc` assertion; - one zero-retry target-native invocation passed the complete case at 13:45:15 UTC: warning retention, node presentation, popup closure, fresh subscription, local and host paste position after a second retarget, incompatible-link retirement, and the subsequent Agent edit; the [durable QA receipt](https://github.com/christian-byrne/in-app-agent-program/blob/28f5a4bb05318cc4e1a95d819951f7924bf9d2c2/reports/pr-ownership/2026-09-20-missing-model-tab-warning.md#1345-utc-both-lifecycle-corrected-candidates-pass-the-complete-native-case) includes inspected frames and cleanup; - PR 18107's exact-head focused coverage passes 63 tests with 1 expected failure; main and browser typechecks, targeted formatting and ESLint, and three affected Cloud-project browser cases also collect successfully; - targeted format and ESLint passed; - three affected Cloud-project browser cases collected successfully. The prior replay receipt remains historical evidence for parent head `516f6b5f71e251b25985fb61715432f05249c4bd`. Fresh hosted checks and the fresh target-native replay passed at current head `aabd82168d2d7b2f1b9f685a5477dcdc491d3b02`; adaptation review and the release-target merge-readiness gate also passed. </details> Justification: Author-owned release aggregate merged under the published Agent 1.54 backport grant after exact-head hosted checks, target-native replay, adaptation review, target ancestry, and the target-aware merge guard passed; no independent approval was available. --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: uytieu <uytieu@users.noreply.github.com> Co-authored-by: jaeone94 <89377375+jaeone94@users.noreply.github.com>
…ow tab switch (Comfy-Org#18078) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789709550015299?thread_ts=1789709550.015299&cid=C0BGH348Z0C)_ **Before:** With the Agent panel bound to a workflow, a user adds a Get/Set node (or any other frontend-registered node such as Note) or a subgraph blueprint to the canvas, switches to another workflow tab, and switches back. The node is gone. Nodes from the server's node catalog (KSampler, CLIPTextEncode) survive the same round trip. Nothing in the UI says why. **After:** The add of a frontend-only node or blueprint host lands in the document like any catalogued node's, so it survives the tab return. The e2e repros that pinned the symptom are now regression tests; the unit repros for the second half of the mechanism (a never-landed add is still swept by the first reconcile after a rebind, and a rejected human op is still swallowed) stay `it.fails` and are the acceptance tests for the follow-up work in the plan comment. ## Summary - **Fix**: `serializeForMint` (`src/workbench/extensions/agent/crdt/mintPortWiring.ts`) rewrote every widget-bearing node's `widgets_values` into a name-keyed object before minting `add_node`. The document applier (`@comfyorg/comfy-multi-player`) accepts name-keyed widgets only for classes in its pinned catalog (the server's node definitions) and rejects everything else with `uncatalogued_widget_write`, while it stores a positional array for such a class opaquely. Frontend-only classes (`isVirtualNode`: Note, MarkdownNote, PrimitiveNode, Get/Set nodes from node packs, subgraph blueprint hosts) now keep the positional form `serialize()` already produced. - **Repro and regression tests** at every layer of the mechanism, plus the fixture support needed to judge human ops with the real document applier. ## Mechanism the tests pin down Two halves, both required for the symptom: 1. **The doc host rejected the add and the client swallowed it** (fixed here for the classes that triggered it). The follower only records the `ok: false` result as a dev event; no revert, no toast. The node stayed on the canvas but was permanently absent from the document. 2. **The first frame after a tab return deletes every local node the document does not hold** (not changed here). Switching back rebinds the follower session, which arms a full reconcile; the resubscribe catch-up frame runs `removeMissing` against the document's node set, deleting the store record, and the orphan sweep removes the live node. The same reconcile also arms without any tab switch: the echo of an accepted human add is rejected locally as "already registered", and the next frame runs it. ## Tests Vitest: - `src/workbench/extensions/agent/crdt/mintPortWiring.test.ts`: `add_node` for a Note and for a blueprint host with a promoted widget keeps positional `widgets_values`, and the real applier applies the minted op against a catalog that lacks the class. The existing name-keyed case (LoadImage, a catalogued class) still holds. - `src/workbench/extensions/agent/crdt/agentCrdtProjection.tabReturn.test.ts`: `it.fails` a node whose `add_node` never reached the doc survives a rebind + catch-up; `it.fails` the same without a tab return after an accepted add's echo; two passing controls showing a node that did land in the doc survives, and that the echo of the page's own add is rejected locally ("already registered"). - `src/workbench/extensions/agent/crdt/useAgentCrdtFollower.rejectedHumanAdd.test.ts`: `it.fails` the follower surfaces a rejected human `add_node` through `reportError` instead of swallowing it. - `src/workbench/extensions/agent/crdt/agentCrdtProjection.serializeDivergence.test.ts`: the app-integrated lens — `serialize()` still emits a live node whose store record is gone, and reports the divergence. Moved out of the vendored litegraph layer so its store/telemetry imports don't cross that boundary. - `src/lib/litegraph/src/LGraph.tabSwitchSnapshot.test.ts`: the pure litegraph lens that remains — a just-pasted blueprint definition is carried by `serialize()` and reloads as a subgraph node. Playwright, `browser_tests/tests/agent/agentHumanAddTabSwitch.spec.ts` (cloud project, agent harness with the real `@comfyorg/comfy-multi-player` applier as the host), six cases total: - Tab switch (5 tests): a catalogued node, a frontend-only node added both directly and through the real node search box, and a subgraph blueprint with and without a promoted widget all survive a switch to a new tab and back. Before/after screenshots, three node lenses (live graph, `serialize()`, tracker `activeState`) and an in-page observer recording the node set right after the canvas rebuild and every removal since are attached; each case also asserts the host applied the add before the switch runs. - No tab switch (1 test): Note, then two catalogued adds whose echoes arm and run the reconcile; the Note stays. Playwright, `browser_tests/tests/topbar/workflowTabSwitchKeepsAddedNodes.spec.ts` (chromium project, no Agent): KSampler, Note and the devtools "test blueprint" added through the search box survive a tab switch. Baseline for the Agent-bound spec. Fixture changes: `agentConversationHostDoc.ts` gains `applyWire` (judge a client-minted batch with the real applier and answer `doc_ops_result` + `doc_update`); `agentFollowerHostSocket.ts` (shared with the Load3D agent fixture) records every client `doc_*` frame and applies or holds human `doc_ops` (`humanOpsHost`, default `hold`, the previous behaviour); `agentWireFrame.ts` holds the wire-batch parser (`parseWireOps`, validating a batch as one unit rather than filtering individual members) and the `doc_ops`-specific non-empty/unique-id gate (`isValidDocOpsBatch`) — both test-only, moved out of the production `opEnvelope.ts`, which no consumer outside fixtures/tests used; `agentConversationFixture.ts` owns the blueprint/search-box add drivers, the tab-switch sequence, node lenses and evidence capture; `browser_tests/fixtures/data/agent/agentHumanAddBlueprints.ts` holds the blueprint workflow-JSON factory. `browser_tests/types/globals.d.ts` types the in-page observer. ## Review Focus - `isVirtualNode` as the client-side proxy for "absent from the pinned catalog". The node-def store cannot tell: system defs (Note, Reroute, PrimitiveNode) and blueprint defs are injected with `python_module: 'nodes'`. A custom node installed after the document was minted is still in the store and not in the catalog; that case still needs the follow-up in the plan comment (surface rejected ops). - The fake relay's `AgentFollowerHostSocket` rejects a malformed, empty, or duplicate-id `doc_ops` frame as `invalid_frame` before it ever reaches `HostDoc` — mirroring the real relay's own pre-application gate on the frame as a whole. A frame that clears that gate is judged by `applyWire`, which projects the real applier's per-op `ApplyOutcome`s into the relay's `doc_ops_result` split (applied vs skipped, first rejection under `failed`); the follower's result handling reads only `ok`, `applied`, `skipped` and `failed.op_id`. ## Local verification - Vitest: the whole `src/workbench/extensions/agent/crdt/` directory plus the LGraph lens: 730 passed, 5 expected fail (3 of them this PR's acceptance tests; the other 2 are unrelated repros from Comfy-Org#18107 and Comfy-Org#18084, picked up by the merge with `main`). - `pnpm typecheck`, `pnpm typecheck:browser`, eslint on the changed files, `pnpm format:check`, `pnpm knip`, `pnpm fallow audit --changed-since origin/main`: clean. - Playwright: not run locally (no ComfyUI backend, and this environment cannot download a Chromium build); the e2e results and the screenshot attachments come from this PR's CI run. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01NQVcfKhCKjLstqo3mJS7fc --------- Co-authored-by: Claude <noreply@anthropic.com>
|
|
|
|
|
|
|
|
|
Backport disposition: no manual 1.54 port.
Full context for agent readersMerge commit |
Requested by Christian Byrne · Slack thread
Summary
Fixes agent-inserted template nodes landing far from existing canvas content, with regression tests and an ADR documenting the design.
Before: when the in-app Comfy Agent inserted a template's nodes via the CRDT
add_nodepath onto a canvas that already had content,prepareNode()insrc/workbench/extensions/agent/crdt/graphMutations.tsforwarded the template's raw baked-inpayload.posverbatim — the nodes landed thousands of px from everything else, effectively invisible unless the user panned out to hunt for them.After: a batch of wire
add_nodeops whose hull lands disconnected from existing content (>600px gap) and offscreen is translated as one unit to sit beside that content (80px gutter, tops aligned), preserving the template's internal layout. Batches near existing content, visible in the viewport, or arriving on an empty canvas are untouched. Resync-driven materializations (reconcileNode/reconcileNodeFields) are never repositioned, and the shared doc keeps the server's coordinates — agent-remote applies never re-mint, consistent with the follower's local-first layout model.Design
docs/adr/CRDT-PLACEMENT-0035-agent-inserted-nodes-land-near-existing-content.mdrecords the decision, trigger conditions, alternatives considered (renderer-layer post-processing, direct renderer imports, minting corrections back into the doc, server-only fix), and accepted tradeoffs. Revised after an adversarial review pass, which changed three things:reconcileNodeFieldsfor a not-yet-live node also prepares as an add (exactly what a resync produces when materializing a subgraph host), so prepared-kind filtering would spuriously reposition catch-up state. The queued origin is carried on the prepared mutation.viewportBounds(scope)returns null unless the displayed graph is the target scope's owning graph (background-workflow applies, subgraph editing).GraphMutationsDeps— an optional port would silently never reposition.Implementation:
src/workbench/extensions/agent/crdt/batchPlacement.ts— pure placement decision (placementOffset): hulls, gap threshold, viewport veto, one shared offset.graphMutations.ts— applies the offset betweenprepare()andcommit()to the layout command and tolastSerialization.pos(the materializer configures the live node from it).AgentPanelRoot.vue— renderer-ownedSemanticPlacementPortinjected beside the existing layout port; the workbench module stays renderer-free per the layer rule.Tests
batchPlacement.test.ts(new) — table-driven trigger matrix and offset arithmetic.graphMutations.test.ts— the placement regression flipped fromit.failstoitand passes (a node inserted at [9000,9000] beside a node at [0,0] now lands at [280,0]); new cases: a far batch keeps its internal layout under one shared offset, and resyncs viareconcileNode/reconcileNodeFieldskeep doc coordinates.browser_tests/tests/agent/agentTemplatePlacement.spec.ts—test.fail()removed; drives the real CRDT follower and canvas and passes (template nodes land at x=580/930/1280, y=200 beside the existing node at [200,200]). The harness now waits for the subscribe catch-up to apply before inserting, matching production ordering.Test plan
pnpm exec vitest run src/workbench/extensions/agent/crdt/— 40 files, 630 passed, 1 expected fail (pre-existing, unrelated)pnpm exec playwright test browser_tests/tests/agent/agentTemplatePlacement.spec.ts --project=cloud— 1 passed (14.7s, local dev server, cloud distribution)pnpm typecheck,pnpm typecheck:browser,pnpm lint,pnpm format:check,pnpm knip,pnpm adr:check— cleanGenerated by Claude Code