Repository navigation
fix(agent): place newly added nodes near existing graph content - #18097
claude[bot] wants to merge 12 commits into
Conversation
An agent's "load template" tool emits add_node ops carrying the template's own baked-in absolute layout coordinates, authored for an empty canvas. prepareNode (graphMutations.ts) takes payload.pos verbatim via readPair, with zero viewport-centering, bounding-box, or collision-avoidance logic, so the new nodes land wherever the template file says regardless of where existing canvas content already is. Adds a failing Vitest test against prepareNode directly and a failing Playwright e2e repro (agent-conversation replay harness, synthesized turn) with a screenshot showing the far-away placement. No fix included; this only pins the regression.
|
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: ✅ 2049 passed, 0 failed · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 9.93 MB gzip ⚪ 0 BDetailsSummary
Category Glance App Entry Points — 3.81 kB (baseline 3.81 kB) • ⚪ 0 BMain entry bundles and manifests Status: 1 unchanged Graph Workspace — 1.45 MB (baseline 1.45 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration Status: 3 unchanged Views & Navigation — 132 kB (baseline 132 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces Status: 18 unchanged Panels & Settings — 638 kB (baseline 638 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens Status: 28 unchanged User & Accounts — 37.9 kB (baseline 37.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles Status: 11 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors Status: 8 unchanged UI Components — 124 kB (baseline 124 kB) • ⚪ 0 BReusable component library chunks Status: 16 unchanged Data & Services — 3.86 MB (baseline 3.86 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 16 unchanged Utilities & Hooks — 566 kB (baseline 566 kB) • ⚪ 0 BHelpers, composables, and utility bundles Status: 38 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: 300 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-20T08:49:59.312Z",
"gitSha": "c4a8c45a69630075dfa5ac56a77b0b1fbf474ec9",
"branch": "test/agent-template-far-position-repro",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2014.3659999999954,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.169999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 432.925,
"heapDeltaBytes": -3345244,
"heapUsedBytes": 57336452,
"domNodes": -260,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 8.081999999999999,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2008.6769999999774,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.203,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 385.656,
"heapDeltaBytes": -3478100,
"heapUsedBytes": 58736260,
"domNodes": -261,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 7.737000000000001,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1698.4259999999836,
"styleRecalcs": 76,
"styleRecalcDurationMs": 18.597,
"layouts": 14,
"layoutDurationMs": 2.875,
"taskDurationMs": 642.411,
"heapDeltaBytes": 18436060,
"heapUsedBytes": 79959856,
"domNodes": -260,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 109.119,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1728.2670000000167,
"styleRecalcs": 73,
"styleRecalcDurationMs": 18.685,
"layouts": 14,
"layoutDurationMs": 2.9939999999999998,
"taskDurationMs": 635.779,
"heapDeltaBytes": 1784912,
"heapUsedBytes": 63832348,
"domNodes": -259,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 111.385,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1709.7599999999602,
"styleRecalcs": 32,
"styleRecalcDurationMs": 12.146,
"layouts": 6,
"layoutDurationMs": 1.1429999999999998,
"taskDurationMs": 267.591,
"heapDeltaBytes": 1802664,
"heapUsedBytes": 64151492,
"domNodes": 76,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 9.424,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1708.2020000000284,
"styleRecalcs": 31,
"styleRecalcDurationMs": 11.458999999999998,
"layouts": 6,
"layoutDurationMs": 0.9989999999999999,
"taskDurationMs": 266.49500000000006,
"heapDeltaBytes": 2149736,
"heapUsedBytes": 64286512,
"domNodes": 77,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 9.774999999999999,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 516.9869999999719,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.087999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 332.23800000000006,
"heapDeltaBytes": 17867656,
"heapUsedBytes": 80157576,
"domNodes": 18,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 118.577,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 517.659999999978,
"styleRecalcs": 12,
"styleRecalcDurationMs": 5.696999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 339.891,
"heapDeltaBytes": 17911452,
"heapUsedBytes": 79752104,
"domNodes": 19,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 120.826,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666682,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2022.5770000000125,
"styleRecalcs": 7,
"styleRecalcDurationMs": 4.269000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 475.1749999999999,
"heapDeltaBytes": 1964700,
"heapUsedBytes": 82976724,
"domNodes": -243,
"jsHeapTotalBytes": -1019904,
"scriptDurationMs": 28.927,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2006.7080000000033,
"styleRecalcs": 8,
"styleRecalcDurationMs": 5.385999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 491.9579999999999,
"heapDeltaBytes": 12300,
"heapUsedBytes": 79816468,
"domNodes": -248,
"jsHeapTotalBytes": 1302528,
"scriptDurationMs": 30.127999999999997,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2111.331000000007,
"styleRecalcs": 68,
"styleRecalcDurationMs": 8.850999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1225.482,
"heapDeltaBytes": -5884044,
"heapUsedBytes": 75858512,
"domNodes": -245,
"jsHeapTotalBytes": 253952,
"scriptDurationMs": 587.0640000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2155.429999999967,
"styleRecalcs": 68,
"styleRecalcDurationMs": 11.268000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1300.4859999999999,
"heapDeltaBytes": 15147268,
"heapUsedBytes": 96980000,
"domNodes": -255,
"jsHeapTotalBytes": 1302528,
"scriptDurationMs": 635.956,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3100.131000000033,
"styleRecalcs": 64,
"styleRecalcDurationMs": 11.842000000000002,
"layouts": 60,
"layoutDurationMs": 11.979999999999999,
"taskDurationMs": 1337.489,
"heapDeltaBytes": -19935772,
"heapUsedBytes": 69283484,
"domNodes": -256,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 568.9340000000001,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3165.4020000000287,
"styleRecalcs": 63,
"styleRecalcDurationMs": 11.6,
"layouts": 60,
"layoutDurationMs": 12.79,
"taskDurationMs": 1336.8570000000002,
"heapDeltaBytes": 8099232,
"heapUsedBytes": 73946628,
"domNodes": 8,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 597.7139999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2127.4969999999485,
"styleRecalcs": 44,
"styleRecalcDurationMs": 5.733999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1400.2630000000001,
"heapDeltaBytes": 8590124,
"heapUsedBytes": 73803876,
"domNodes": 8,
"jsHeapTotalBytes": 1011712,
"scriptDurationMs": 689.463,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 2181.4210000000003,
"styleRecalcs": 46,
"styleRecalcDurationMs": 7.365999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1489.2440000000001,
"heapDeltaBytes": -8861664,
"heapUsedBytes": 75073864,
"domNodes": -222,
"jsHeapTotalBytes": 2052096,
"scriptDurationMs": 710.8820000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2020.1260000000048,
"styleRecalcs": 8,
"styleRecalcDurationMs": 4.973000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 399.22499999999997,
"heapDeltaBytes": -2494512,
"heapUsedBytes": 79383280,
"domNodes": -248,
"jsHeapTotalBytes": 28672,
"scriptDurationMs": 28.820999999999998,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2008.012000000008,
"styleRecalcs": 6,
"styleRecalcDurationMs": 4.011000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 445.4079999999999,
"heapDeltaBytes": -4547892,
"heapUsedBytes": 83940872,
"domNodes": -247,
"jsHeapTotalBytes": -1019904,
"scriptDurationMs": 26.884000000000004,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 508.8559999999802,
"styleRecalcs": 48,
"styleRecalcDurationMs": 7.86,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 304.007,
"heapDeltaBytes": 13464960,
"heapUsedBytes": 76776404,
"domNodes": 22,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 103.593,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 512.3909999999796,
"styleRecalcs": 47,
"styleRecalcDurationMs": 7.3089999999999975,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 307.272,
"heapDeltaBytes": 14307596,
"heapUsedBytes": 78203648,
"domNodes": 20,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 104.00000000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2026.1770000000183,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.361,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 374.139,
"heapDeltaBytes": -8716416,
"heapUsedBytes": 54731716,
"domNodes": -276,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 6.738000000000001,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2007.6080000000047,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.457999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 376.65299999999996,
"heapDeltaBytes": 17160168,
"heapUsedBytes": 80512904,
"domNodes": -275,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 6.716999999999999,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1699.0010000000098,
"styleRecalcs": 79,
"styleRecalcDurationMs": 18.966000000000005,
"layouts": 18,
"layoutDurationMs": 3.0719999999999996,
"taskDurationMs": 586.35,
"heapDeltaBytes": 2061588,
"heapUsedBytes": 65105948,
"domNodes": -273,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 69.273,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1689.3349999999714,
"styleRecalcs": 77,
"styleRecalcDurationMs": 18.284000000000002,
"layouts": 18,
"layoutDurationMs": 3.7470000000000003,
"taskDurationMs": 606.461,
"heapDeltaBytes": 1015160,
"heapUsedBytes": 64549660,
"domNodes": -277,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 74.94099999999999,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 882.930999999985,
"styleRecalcs": 17,
"styleRecalcDurationMs": 21.803000000000004,
"layouts": 5,
"layoutDurationMs": 8.567,
"taskDurationMs": 692.879,
"heapDeltaBytes": 20015128,
"heapUsedBytes": 102700712,
"domNodes": 13587,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 22.119,
"eventListeners": 2383,
"totalBlockingTimeMs": 112,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8161.317999999994,
"styleRecalcs": 250,
"styleRecalcDurationMs": 32.092999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4558.552,
"heapDeltaBytes": -18696824,
"heapUsedBytes": 68501892,
"domNodes": -218,
"jsHeapTotalBytes": 3436544,
"scriptDurationMs": 2119.161,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8154.108000000065,
"styleRecalcs": 249,
"styleRecalcDurationMs": 29.256,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4527.098000000001,
"heapDeltaBytes": 2873724,
"heapUsedBytes": 84105696,
"domNodes": -242,
"jsHeapTotalBytes": -1056768,
"scriptDurationMs": 2112.306,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 12601.518999999997,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11779.253,
"heapDeltaBytes": -33103192,
"heapUsedBytes": 175795696,
"domNodes": -8061,
"jsHeapTotalBytes": -12361728,
"scriptDurationMs": 184.252,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12558.681999999975,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11698.268000000002,
"heapDeltaBytes": -53903492,
"heapUsedBytes": 176499920,
"domNodes": -8061,
"jsHeapTotalBytes": -11329536,
"scriptDurationMs": 178.554,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 15390.976000000024,
"styleRecalcs": 75,
"styleRecalcDurationMs": 13.417999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15052.846999999998,
"heapDeltaBytes": -37166424,
"heapUsedBytes": 191131152,
"domNodes": -8061,
"jsHeapTotalBytes": -12374016,
"scriptDurationMs": 707.152,
"eventListeners": -14928,
"totalBlockingTimeMs": 15,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 12149.158999999941,
"styleRecalcs": 66,
"styleRecalcDurationMs": 12.708999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11370.277999999998,
"heapDeltaBytes": -41020376,
"heapUsedBytes": 189118112,
"domNodes": -8061,
"jsHeapTotalBytes": -9576448,
"scriptDurationMs": 665.966,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.226666666666762,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-node-resize-workload",
"durationMs": 4525.83999999996,
"styleRecalcs": 20,
"styleRecalcDurationMs": 60.160999999999994,
"layouts": 20,
"layoutDurationMs": 22.392999999999997,
"taskDurationMs": 4436.986999999999,
"heapDeltaBytes": -45021192,
"heapUsedBytes": 167780548,
"domNodes": -8061,
"jsHeapTotalBytes": 12648448,
"scriptDurationMs": 76.064,
"eventListeners": -14928,
"totalBlockingTimeMs": 49,
"frameDurationMs": 17.220000000000013,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 4457.86499999997,
"styleRecalcs": 20,
"styleRecalcDurationMs": 63.02700000000003,
"layouts": 20,
"layoutDurationMs": 22.69,
"taskDurationMs": 4327.637000000001,
"heapDeltaBytes": -59524240,
"heapUsedBytes": 172606060,
"domNodes": -8061,
"jsHeapTotalBytes": 12984320,
"scriptDurationMs": 78.208,
"eventListeners": -14928,
"totalBlockingTimeMs": 95,
"frameDurationMs": 17.776666666666703,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6295.3630000000085,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6015.8369999999995,
"heapDeltaBytes": -2311688,
"heapUsedBytes": 176064860,
"domNodes": 0,
"jsHeapTotalBytes": -27525120,
"scriptDurationMs": 90.213,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 4606.318999999985,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.08900000000000574,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4150.522000000001,
"heapDeltaBytes": 5800504,
"heapUsedBytes": 199613784,
"domNodes": 0,
"jsHeapTotalBytes": -11796480,
"scriptDurationMs": 64.96099999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 461.65600000000495,
"styleRecalcs": 19,
"styleRecalcDurationMs": 18.351,
"layouts": 5,
"layoutDurationMs": 1.96,
"taskDurationMs": 109.65099999999998,
"heapDeltaBytes": 5283908,
"heapUsedBytes": 67000396,
"domNodes": 152,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 12.241,
"eventListeners": 81,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666682,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 94.5840000000544,
"styleRecalcs": 9,
"styleRecalcDurationMs": 14.076,
"layouts": 4,
"layoutDurationMs": 1.7270000000000003,
"taskDurationMs": 70.308,
"heapDeltaBytes": 3124828,
"heapUsedBytes": 64685632,
"domNodes": 131,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 6.060000000000001,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
}
]
}🔬 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 (11 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 b3b0579a7cec51a41ac74983a345c3b08e1ad3aa
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 |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #18097 +/- ##
==========================================
+ Coverage 82.87% 83.85% +0.98%
==========================================
Files 2950 2255 -695
Lines 145313 128495 -16818
Branches 39295 32774 -6521
==========================================
- Hits 120422 107747 -12675
+ Misses 23622 20459 -3163
+ Partials 1269 289 -980
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 704 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…mport it The previous commit added a spec file importing AgentConversationHarness from the fixture module, but the class itself was never exported, so the browser_tests TypeScript project failed to compile and every Playwright CI shard failed to build.
Playwright videos for new testsDownload the recorded videos and HTML report Recorded projects: cloud Recorded test titles:
|
An add_node/reconcileNode payload's own baked-in coordinates (e.g. a template's absolute layout, authored for an empty canvas) used to be taken verbatim by prepareNode via readPair, with no offset or collision-avoidance. Loading a template into a workflow that already had content could drop the new nodes thousands of px away from anything else, effectively invisible. graphMutations.ts now checks a brand-new node's raw position against the bounds of everything already on the graph and, when it lands more than 2000px outside those bounds, places it just beside them instead. The layout port gains an optional getLayout() read (implemented in AgentPanelRoot.vue over the existing layoutStore, the same store its createNode/deleteNodes already write to) so this works regardless of whether existing content came from a prior agent op, a human edit, or the workflow's initial load. Flips the graphMutations.test.ts and agentTemplatePositioning.spec.ts repro cases from expected-failure to passing assertions.
Bug #2 investigation: the "ghost node" from a rejected local op — not trivial, needs a design decisionPer the request to also check the second bug (a failed local Correction to the original framingThis is not the agent-template-load bug from this PR. Tracing the actual data flow: an agent's server-side tool (comfy-agent) writes ops directly into the CRDT doc and the frontend only ever receives them as an already-committed Is
|
AgentConversationHarness requires an equal-length RECORDED_EXPECTATIONS entry per case id, even though agentTemplatePositioning.spec.ts never calls expectTurnRendered. The template-positioning spec added in this branch used case_id 'synth-template-far-position' with no matching entry, so the harness constructor threw on boot, failing the playwright-video-new-tests CI check.
getLayout() only returned a position for nodes this agent had already created/attached via createNode, so a node from a workflow's initial load (never routed through layoutStore) was invisible to prepareNode's bounds-gathering: the far-position guard silently no-op'd for exactly the 'workflow already has content' case it exists to cover (observed distance == the raw unmodified 8000/6000 offset, unmoved). Fall back to the live LGraphNode's own position/size (via app.rootGraph, resolving into the owning subgraph when scoped) whenever layoutStore has no entry yet.
Not a fix -- this instruments prepare()'s bounds-gathering and getLayout()'s live-position fallback to see whether the seed node is even reachable under the batch's resolved scope, and whether the rootGraph.id/scope.rootGraphId identity check is where it falls through. Will be removed once the actual fix lands.
939ee48 to
87a7e03
Compare
…ure message Not a fix -- the CI runner's plain-text job log has no browser console, so route the same instrumentation through window.__agentDiag and have the spec read it back and embed it in the assertion's failure message, which the job log does capture. Will be removed once the actual fix lands.
…ayout prepareNode() froze state.lastSerialization from the wire payload before placeNewNode() ever ran, so a node the far-position guard relocated kept its original, unmoved pos/size baked into lastSerialization. The materializer's node.configure(lastSerialization) (agentNodeMaterializer.ts) applies pos/size onto the live LiteGraph node unconditionally on every add, silently overwriting the placed position with the original far-away coordinates -- the far-position guard's own adjustment never reached the node actually drawn on the canvas, regardless of whether bounds-gathering itself worked. Diagnostics on the CI run (agentTemplatePositioning.spec.ts) confirmed bounds-gathering already worked correctly (layoutStore has an entry for every rendered node, seed nodes included, via the ordinary VueNodes render path -- no getLayout() fallback was ever needed), and that only the final node.pos read off window.app.graph.nodes stayed at the raw, unplaced coordinates. withPlacedSerialization() keeps state.lastSerialization's pos/size in sync with whatever placeNewNode() decided, at both of its call sites (addNode/reconcileNode and reconcileNodeFields), so the materializer's configure() applies the same position the bounds guard computed.
Root cause and fix for the
|
…hout a committed recording 033f32c registered visible-turn expectations for 'synth-template-far-position' (the hand-authored agentTemplatePositioning.spec.ts conversation), but that case lives inline in the spec file, not as a committed recording under browser_tests/fixtures/data/agent/conversations/ -- 'every recording has explicit visible expectations for each turn' asserted a strict two-way match between RECORDED_EXPECTATIONS and the committed recording files, so the new entry with no matching file broke it. Only the direction that matters is checked now: every committed recording still needs a correctly-sized expectation entry (unchanged for every existing case), while a hand-authored (response_side: 'synthesized') conversation's expectations, which never has a recording file to match, no longer fails the invariant.
Resolves the graphMutations.ts conflict: both branches independently appended new helper functions at the same insertion point (Bounds/ placeNewNode/withPlacedSerialization from this branch's template far- position fix, resolveNodeColors/resolveNodeDisplayFlags from main's PR #18081). Kept both blocks; neither depends on the other and each one's call sites elsewhere in the file were already merged cleanly.
…ar-position-repro # Conflicts: # src/workbench/extensions/agent/crdt/graphMutations.test.ts
|
This PR's merge against
Merging as-is would leave Given No changes pushed — branch left at its current head, merge conflict unresolved pending this decision. Generated by Claude Code |
|
Closing as superseded by #18084, which merged the production placement fix using batch-preserving renderer geometry, plus its ADR, unit matrix, and browser regression coverage. The additional populated LoadImage non-overlap snapshot coverage remains in #16649. Refreshing this branch would otherwise preserve an older, duplicate per-node placement implementation that conflicts with the merged batch-placement path. |
Why
An agent's "load template" tool emits
add_nodeops carrying the template's own baked-in absolute layout coordinates, authored assuming an empty canvas.prepareNode()(graphMutations.ts) used to takepayload.posverbatim viareadPair(), with zero viewport-centering, bounding-box, or collision-avoidance logic against existing graph content. So when a user already has content on the canvas (for example a manually-placed Load Image node) and then loads a template, the template's nodes landed wherever the template file said — thousands of pixels away in the reported case — instead of anywhere near the user's existing work.This is a different defect from #17901 (agent nodes overlapping each other within one batch, due to an inaccurate rendering-geometry model): this one is about newly-added content never being positioned relative to content that was already on the canvas at all.
What
src/workbench/extensions/agent/crdt/graphMutations.ts:prepare()now reads the bounds of everything already on the graph (via a new optionalgetLayout()read on the layout port) and checks each brand-new node's rawposagainst it. When a new node's own coordinates land more than 2000px outside that bounds box, it's placed just beside the existing content instead of at its raw baked-in position. Bounds are extended as the batch adds its own nodes, so several template nodes in one batch land near each other too. Existing nodes are left alone — only nodes with noexistingrecord (freshaddNode/reconcileNode/type-changingreplaceNode) get this treatment.src/workbench/extensions/agent/AgentPanelRoot.vue: implements the newgetLayout()port method by readinglayoutStore.getNodeLayout()— the same storecreateNode/deleteNodesalready write to — so this works regardless of whether existing content came from a prior agent op, a human edit, or the workflow's initial load (none of which set the ECS store'slastSerialization, which is why the bounds have to come from the layout store rather than the semantic node store).src/workbench/extensions/agent/crdt/graphMutations.test.ts: the repro test now passes as a normal assertion (flipped fromit.fails), plus itsmutations()test helper grew agetLayoutmock backed by whatevercreateLayoutalready recorded.browser_tests/tests/agent/agentTemplatePositioning.spec.ts: the Playwright repro now passes as a normal assertion (flipped fromtest.fail()); titles/comments updated to describe the fixed behavior instead of the bug.Verification
pnpm vitest run src/workbench/extensions/agent/crdt/graphMutations.test.ts— 37 passed, 1 expected failure (an unrelated pre-existingit.failsfor a store-only-node serialize gap, untouched by this change).pnpm vitest run src/workbench/extensions/agent— full agent suite green (1356+292 tests across two runs; a couple of files hit a transient sandbox ENOSPC on a combined run and passed cleanly rerun individually — not related to this diff).pnpm typecheck,pnpm typecheck:browser— clean.pnpm exec eslint,pnpm exec oxlint,pnpm exec oxfmton the changed files — clean (also re-verified by the repo's pre-commit hook).A second, unrelated bug from the same investigation
While confirming this fix, a second defect was investigated per a request to check both: a rejected local
add_node(any local optimistic write, not template-specific) never rolls back, leaving a permanent "ghost" node. That one is not fixed here — see the PR comment below for the root-cause writeup and why it needs design deliberation rather than a mechanical wire-up.