Repository navigation
fix(agent-crdt): scope layout mint ops to the bound document's root graph - #18109
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: ✅ 2072 passed, 0 failed · 3 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 9.96 MB gzip ⚪ 0 BDetailsSummary
Category Glance App Entry Points — 3.87 kB (baseline 3.87 kB) • ⚪ 0 BMain entry bundles and manifests Status: 1 unchanged Graph Workspace — 1.46 MB (baseline 1.46 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 — 639 kB (baseline 639 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 — 123 kB (baseline 123 kB) • ⚪ 0 BReusable component library chunks Status: 16 unchanged Data & Services — 3.88 MB (baseline 3.88 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 16 unchanged Utilities & Hooks — 577 kB (baseline 577 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.8 MB (baseline 17.8 MB) • ⚪ 0 BBundles that do not match a named category Status: 302 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-22T00:55:27.265Z",
"gitSha": "35b923178847a78c7b021baa75dc60cc9686fc42",
"branch": "claude/layout-mint-port-root-graph-scope",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 1994.0050000000156,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.8420000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 323.581,
"heapDeltaBytes": -2365304,
"heapUsedBytes": 59891968,
"domNodes": -257,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 5.951000000000001,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2004.3329999999742,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.881,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 313.744,
"heapDeltaBytes": -7963328,
"heapUsedBytes": 54301980,
"domNodes": 20,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 6.505999999999999,
"eventListeners": -26,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1695.5409999999915,
"styleRecalcs": 74,
"styleRecalcDurationMs": 15.617,
"layouts": 14,
"layoutDurationMs": 2.3899999999999997,
"taskDurationMs": 550.0020000000001,
"heapDeltaBytes": 2194292,
"heapUsedBytes": 64389820,
"domNodes": -259,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 92.971,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1680.1860000000488,
"styleRecalcs": 75,
"styleRecalcDurationMs": 16.729,
"layouts": 14,
"layoutDurationMs": 2.898,
"taskDurationMs": 503.68199999999996,
"heapDeltaBytes": -1912856,
"heapUsedBytes": 60014580,
"domNodes": -257,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 93.61,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1705.515000000048,
"styleRecalcs": 32,
"styleRecalcDurationMs": 9.645999999999999,
"layouts": 6,
"layoutDurationMs": 0.8310000000000001,
"taskDurationMs": 216.90599999999998,
"heapDeltaBytes": 2316292,
"heapUsedBytes": 64642556,
"domNodes": 78,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 6.567000000000002,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1712.0199999999386,
"styleRecalcs": 31,
"styleRecalcDurationMs": 9.985000000000001,
"layouts": 6,
"layoutDurationMs": 1.2679999999999998,
"taskDurationMs": 189.70999999999998,
"heapDeltaBytes": 2157284,
"heapUsedBytes": 64447108,
"domNodes": 75,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 8.403999999999998,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 463.26699999997345,
"styleRecalcs": 13,
"styleRecalcDurationMs": 5.1259999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 283.04799999999994,
"heapDeltaBytes": 17823936,
"heapUsedBytes": 80110692,
"domNodes": 21,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 101.44,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-clipping",
"durationMs": 449.53099999997903,
"styleRecalcs": 12,
"styleRecalcDurationMs": 4.957999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 291.403,
"heapDeltaBytes": 18931956,
"heapUsedBytes": 86284788,
"domNodes": 20,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 103.72799999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 961.5160000000174,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 575.1740000000001,
"heapDeltaBytes": 34980208,
"heapUsedBytes": 104155000,
"domNodes": 0,
"jsHeapTotalBytes": 19296256,
"scriptDurationMs": 42.910000000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 357,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 987.922000000026,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 631.291,
"heapDeltaBytes": -13099520,
"heapUsedBytes": 72911596,
"domNodes": -295,
"jsHeapTotalBytes": 20316160,
"scriptDurationMs": 38.00099999999999,
"eventListeners": -217,
"totalBlockingTimeMs": 351,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 729.2159999999512,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 306.03300000000024,
"heapDeltaBytes": 14209736,
"heapUsedBytes": 91292060,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 92.47700000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 119,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 715.9830000000511,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 313.34299999999973,
"heapDeltaBytes": 14113928,
"heapUsedBytes": 89740832,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 100.014,
"eventListeners": 0,
"totalBlockingTimeMs": 113,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 5694.606000000022,
"styleRecalcs": 2,
"styleRecalcDurationMs": 1.0199999999999982,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4762.714,
"heapDeltaBytes": 12285008,
"heapUsedBytes": 89776252,
"domNodes": -264,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 3678.9100000000003,
"eventListeners": -184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 5486.896999999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4777.341,
"heapDeltaBytes": 12574332,
"heapUsedBytes": 94820772,
"domNodes": -16,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 3845.625,
"eventListeners": 0,
"totalBlockingTimeMs": 39,
"frameDurationMs": 17.779999999999987,
"p95FrameDurationMs": 33.30000000000109
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5335.057000000006,
"styleRecalcs": 3,
"styleRecalcDurationMs": 1.5969999999999978,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4613.579,
"heapDeltaBytes": 17063260,
"heapUsedBytes": 94513688,
"domNodes": -267,
"jsHeapTotalBytes": -8192,
"scriptDurationMs": 3681.51,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5419.463999999948,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.4040000000000016,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4729.881,
"heapDeltaBytes": -12424876,
"heapUsedBytes": 69613884,
"domNodes": -16,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 3754.264,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2005.1980000000071,
"styleRecalcs": 7,
"styleRecalcDurationMs": 3.2279999999999984,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 374.239,
"heapDeltaBytes": 19824332,
"heapUsedBytes": 83487476,
"domNodes": -242,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 17.846,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2017.3369999999977,
"styleRecalcs": 8,
"styleRecalcDurationMs": 4.0939999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 411.729,
"heapDeltaBytes": 1424124,
"heapUsedBytes": 83020288,
"domNodes": -241,
"jsHeapTotalBytes": -1019904,
"scriptDurationMs": 25.462,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2128.812000000039,
"styleRecalcs": 69,
"styleRecalcDurationMs": 8.557,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1126.5,
"heapDeltaBytes": -975948,
"heapUsedBytes": 79873180,
"domNodes": -247,
"jsHeapTotalBytes": 741376,
"scriptDurationMs": 538.791,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2132.3320000000194,
"styleRecalcs": 70,
"styleRecalcDurationMs": 13.374999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1096.315,
"heapDeltaBytes": -6021132,
"heapUsedBytes": 75721776,
"domNodes": -215,
"jsHeapTotalBytes": 1564672,
"scriptDurationMs": 529.304,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3054.9700000000257,
"styleRecalcs": 64,
"styleRecalcDurationMs": 7.997000000000001,
"layouts": 60,
"layoutDurationMs": 8.39,
"taskDurationMs": 994.297,
"heapDeltaBytes": 7719924,
"heapUsedBytes": 73607332,
"domNodes": 10,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 431.26300000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3053.0639999999494,
"styleRecalcs": 64,
"styleRecalcDurationMs": 11.060000000000002,
"layouts": 60,
"layoutDurationMs": 11.412,
"taskDurationMs": 1121.695,
"heapDeltaBytes": 9096928,
"heapUsedBytes": 74681368,
"domNodes": 10,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 493.404,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2156.6029999999614,
"styleRecalcs": 45,
"styleRecalcDurationMs": 4.587999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1127.128,
"heapDeltaBytes": 8208404,
"heapUsedBytes": 74020256,
"domNodes": 10,
"jsHeapTotalBytes": 749568,
"scriptDurationMs": 544.53,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 2118.7210000000505,
"styleRecalcs": 44,
"styleRecalcDurationMs": 5.37,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1211.888,
"heapDeltaBytes": 17163968,
"heapUsedBytes": 83154116,
"domNodes": 8,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 590.3040000000001,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 1998.6549999999852,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.2839999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 274.98300000000006,
"heapDeltaBytes": 21083244,
"heapUsedBytes": 85962616,
"domNodes": 10,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 19.068,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2024.220000000014,
"styleRecalcs": 7,
"styleRecalcDurationMs": 4.147999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 412.154,
"heapDeltaBytes": -6312848,
"heapUsedBytes": 82577268,
"domNodes": -246,
"jsHeapTotalBytes": 28672,
"scriptDurationMs": 24.172000000000008,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 379.83400000001666,
"styleRecalcs": 47,
"styleRecalcDurationMs": 6.465999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 232.604,
"heapDeltaBytes": 12730964,
"heapUsedBytes": 76599532,
"domNodes": 20,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 86.698,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 475.9239999999636,
"styleRecalcs": 47,
"styleRecalcDurationMs": 7.369000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 289.68300000000005,
"heapDeltaBytes": 13306840,
"heapUsedBytes": 76849040,
"domNodes": 20,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 96.923,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1992.9270000000088,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.025,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 318.377,
"heapDeltaBytes": 278184,
"heapUsedBytes": 63938764,
"domNodes": -273,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 5.316000000000002,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1988.980999999967,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.830000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 350.266,
"heapDeltaBytes": 13503828,
"heapUsedBytes": 77108020,
"domNodes": -272,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 6.104,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1694.6320000000128,
"styleRecalcs": 77,
"styleRecalcDurationMs": 15.959000000000001,
"layouts": 18,
"layoutDurationMs": 3.016,
"taskDurationMs": 507.5799999999999,
"heapDeltaBytes": 935516,
"heapUsedBytes": 64794904,
"domNodes": -275,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 59.21600000000001,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1678.2670000000053,
"styleRecalcs": 77,
"styleRecalcDurationMs": 16.849000000000004,
"layouts": 18,
"layoutDurationMs": 3.062,
"taskDurationMs": 535.2889999999999,
"heapDeltaBytes": 4965892,
"heapUsedBytes": 68717584,
"domNodes": -275,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 61.69,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 833.0519999999524,
"styleRecalcs": 19,
"styleRecalcDurationMs": 19.404999999999998,
"layouts": 5,
"layoutDurationMs": 7.549,
"taskDurationMs": 593.036,
"heapDeltaBytes": -6296132,
"heapUsedBytes": 81421292,
"domNodes": 13667,
"jsHeapTotalBytes": 11010048,
"scriptDurationMs": 19.233,
"eventListeners": 2383,
"totalBlockingTimeMs": 94,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8114.575999999999,
"styleRecalcs": 250,
"styleRecalcDurationMs": 19.711,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3371.6630000000005,
"heapDeltaBytes": -3879536,
"heapUsedBytes": 76298440,
"domNodes": -240,
"jsHeapTotalBytes": -307200,
"scriptDurationMs": 1543.2119999999998,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8124.926999999957,
"styleRecalcs": 250,
"styleRecalcDurationMs": 29.502,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3732.9900000000002,
"heapDeltaBytes": -4023044,
"heapUsedBytes": 76920468,
"domNodes": -238,
"jsHeapTotalBytes": 253952,
"scriptDurationMs": 1691.279,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 7637.004999999988,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6849.130000000001,
"heapDeltaBytes": -24963712,
"heapUsedBytes": 191766852,
"domNodes": -8062,
"jsHeapTotalBytes": -12361728,
"scriptDurationMs": 94.53999999999999,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 10502.123999999982,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9583.895999999999,
"heapDeltaBytes": -23828296,
"heapUsedBytes": 191467276,
"domNodes": -8061,
"jsHeapTotalBytes": -11874304,
"scriptDurationMs": 137.687,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 12197.584000000006,
"styleRecalcs": 66,
"styleRecalcDurationMs": 12.036999999999992,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11355.136,
"heapDeltaBytes": -24222344,
"heapUsedBytes": 199725668,
"domNodes": -8062,
"jsHeapTotalBytes": -8921088,
"scriptDurationMs": 550.653,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 13637.02999999998,
"styleRecalcs": 67,
"styleRecalcDurationMs": 13.257999999999992,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12935.831,
"heapDeltaBytes": -46607764,
"heapUsedBytes": 184417912,
"domNodes": -8062,
"jsHeapTotalBytes": -13758464,
"scriptDurationMs": 667.3340000000001,
"eventListeners": -14928,
"totalBlockingTimeMs": 42,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 3536.276999999984,
"styleRecalcs": 20,
"styleRecalcDurationMs": 69.14599999999999,
"layouts": 20,
"layoutDurationMs": 20.112000000000005,
"taskDurationMs": 3408.525,
"heapDeltaBytes": -21628224,
"heapUsedBytes": 189513080,
"domNodes": -8062,
"jsHeapTotalBytes": 10625024,
"scriptDurationMs": 55.824,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 3757.3809999998957,
"styleRecalcs": 20,
"styleRecalcDurationMs": 52.901,
"layouts": 20,
"layoutDurationMs": 20.876999999999992,
"taskDurationMs": 3621.339000000001,
"heapDeltaBytes": -41014388,
"heapUsedBytes": 182691700,
"domNodes": -8062,
"jsHeapTotalBytes": 13692928,
"scriptDurationMs": 58.409000000000006,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5342.089000000044,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4827.133,
"heapDeltaBytes": -16433836,
"heapUsedBytes": 170449512,
"domNodes": 0,
"jsHeapTotalBytes": -13107200,
"scriptDurationMs": 64.45399999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5202.179000000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4868.228,
"heapDeltaBytes": -6133000,
"heapUsedBytes": 179299916,
"domNodes": 0,
"jsHeapTotalBytes": -12058624,
"scriptDurationMs": 69.988,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 213.66299999999683,
"styleRecalcs": 5,
"styleRecalcDurationMs": 9.834,
"layouts": 2,
"layoutDurationMs": 0.758,
"taskDurationMs": 61.922000000000004,
"heapDeltaBytes": 3228784,
"heapUsedBytes": 65100272,
"domNodes": 101,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.508000000000001,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 429.08599999998387,
"styleRecalcs": 15,
"styleRecalcDurationMs": 15.082999999999998,
"layouts": 2,
"layoutDurationMs": 0.5879999999999999,
"taskDurationMs": 77.339,
"heapDeltaBytes": 4785904,
"heapUsedBytes": 69967264,
"domNodes": 121,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.252999999999999,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 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. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 7165160316e5f3794adaf807ceda706d177fccab
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 #18109 +/- ##
==========================================
+ Coverage 82.96% 84.24% +1.27%
==========================================
Files 2956 2278 -678
Lines 145632 129312 -16320
Branches 37526 33655 -3871
==========================================
- Hits 120822 108935 -11887
+ Misses 23540 20081 -3459
+ Partials 1270 296 -974
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 824 files with indirect coverage changes 🚀 New features to boost your workflow:
|
d67902c to
de7fa88
Compare
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: non-blocking changes requested.
I found no correctness blocker. The root-graph check fixes the reproduced tab-switch leak: the new real-store regression test fails against merge base 88860fadc4 by minting workflow B's add_node into workflow A, and passes at de7fa88e92.
I left five inline comments. The most useful simplification is to keep the new graph-scope filter but derive its identity from the bound workflow's existing activeState.id, rather than maintaining a second latched copy in component state.
Architecture and FE-2504
I consider the graph-id check targeted protection worth keeping at the mint boundary. The component latch is temporary safety machinery and has a simpler owner today. FE-2504 describes the broader deletion path: semantic remote apply and command-origin mint intent would eventually remove this store-observer compensation. That backlog architecture is relevant context, but this PR does not need to implement it.
PR #18078 also edits mintPortWiring.ts, but only around serializeForMint and valueWidgetsOnly. It does not overlap this PR's graph-scope policy, so I found no shared semantic issue beyond ordinary integration conflict risk.
Existing automated feedback
- Codecov reports one uncovered changed line in
AgentPanelRoot.vue. My component-test comment gives that gap a behavioral falsifier: a write-once latch passes the current tests because they never exercise a second false-to-true binding transition. - CodeRabbit explicitly skipped review because the author is a bot, so it supplied no finding to confirm or contest.
- The CI metrics comment reports no actionable failure. All 104 live check runs for this head are complete: 87 succeeded and 17 were skipped.
Checked and cleared
- I rejected a possible bound-but-null corruption path. In production,
AgentPanelRootmounts only underGraphCanvas'scomfyAppReady, which is published aftercomfyApp.setup()creates the root graph. The permissive null behavior is therefore the explicit untracked case, not a reachable bound-document startup state. - I did not require a same-tick create-plus-delete telemetry test. The published contract is rate-limited reporting per graph pair, both paths use the same error type, and per-action call count is an implementation detail.
- Fallow flagged four consumers of unchanged exports in
mintPortWiring.ts. The diff does not alter those exports or their contracts, so that item does not reproduce. Fallow independently confirmed the new layer suppression covered by an inline comment.
Coverage and checks
I reviewed all nine files at standard depth through correctness, maintainability, idiomaticity, tests, and documentation lanes. I traced bound-document root identity, root/subgraph transitions, repeated binding edges, the reused LGraph id rewrite, teardown and queued delivery, and local versus AgentRemote provenance.
Local checks at de7fa88e92:
- focused Vitest: 6 files, 312 tests passed
- base regression: failed as expected with one foreign
add_node pnpm typecheck: passed- changed-file ESLint: passed
pnpm oxlint:main: passed with unrelated existing warningspnpm format:check: passedpnpm knip: passedpnpm exec fallow review --base origin/main --brief: completed; one layer suppression finding, already commented, plus baseline/configuration noise
The live main head advanced to 3a851363c4 during review, but the PR merge base remains 88860fadc4; the nine-file merge-base diff is unchanged.
| // active, so a load already in flight when it flips (a workflow tab switch) | ||
| // cannot relatch onto the graph the switch is loading. `immediate: true` | ||
| // captures it before `attachMintPortWiring` below observes any layout change. | ||
| const boundRootGraphId = ref<string | null>(null) |
There was a problem hiding this comment.
[P2] I think this latch creates a second source of truth for the bound document's root identity. This component already resolves that identity as boundOrOpenWorkflowFor(workflowId)?.activeState?.id for graph mutations, and beforeLoadNewGraph persists the outgoing workflow's activeState before the shared renderer graph is rewritten. Deriving boundRootGraphId from the bound workflow would preserve the tab-switch protection while deleting this ref/watch and its bound/null, unbound/stale, and rebound states.
There was a problem hiding this comment.
Done in 938fd56: boundRootGraphId is now a computed derived from boundOrOpenWorkflowFor(boundWorkflowId.value)?.activeState?.id ?? null, and the ref/watch (and its latched/stale states) are gone.
Generated by Claude Code
There was a problem hiding this comment.
Tracked as FE-2690. 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.
| // eslint-disable-next-line import-x/no-restricted-paths | ||
| import { ACTOR_CONFIG } from '@/renderer/core/layout/constants' | ||
| // eslint-disable-next-line import-x/no-restricted-paths | ||
| import { layoutStore } from '@/renderer/core/layout/store/layoutStore' |
There was a problem hiding this comment.
[P2] This new workbench test suppresses the enforced workbench-to-renderer dependency rule. The existing real-store integration suite in src/renderer/core/layout/store/layoutStoreMintDelivery.test.ts explicitly lives on the renderer side for this reason and already composes the real layout store with this wiring. Please move this regression case there instead of adding two restricted-import exceptions.
There was a problem hiding this comment.
Moved the regression case into src/renderer/core/layout/store/layoutStoreMintDelivery.test.ts (real LGraph/LGraphNode driving the real layout store and wiring) and deleted mintPortWiring.tabSwitchScope.test.ts since nothing else was left in it; no restricted-import exceptions are needed there. Confirmed locally that the moved test still fails against the pre-fix layoutMintPort.ts/mintPortWiring.ts (an add_node for the new workflow's node was minted), and passes again with the fix restored.
Generated by Claude Code
There was a problem hiding this comment.
Tracked as FE-2690. 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 mintPortWiringDeps = vi.hoisted(() => ({ | ||
| current: null as MintPortWiringDeps | null | ||
| })) | ||
| vi.mock<unknown>(import('./crdt/mintPortWiring'), () => ({ |
There was a problem hiding this comment.
[P3] This is a new mock, but vi.mock<unknown> opts it out of the module-factory contract. Our Vitest guidance reserves that form for legacy partial factories and requires new mocks to remain typed. Please use a typed factory, retaining the actual module exports and overriding attachMintPortWiring, so future export or signature changes stay compiler-visible.
There was a problem hiding this comment.
Tried the importOriginal factory suggested here, but this repo's own no-import-actual oxlint rule (tools/oxlint-plugins/vitestCleanup.ts) rejects any mock factory that takes an importOriginal parameter. Used a focused full mock instead: dropped the <unknown> annotation and the parameter, so vi.mock(import('./crdt/mintPortWiring'), () => ({ attachMintPortWiring: ... })) type-checks its return against Partial<typeof import(...)>, keeping attachMintPortWiring's signature compiler-visible.
Generated by Claude Code
There was a problem hiding this comment.
Tracked as FE-2690. 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.
| expect(app.loadGraphData).not.toHaveBeenCalled() | ||
| }) | ||
|
|
||
| it("latches the bound workflow's root graph id once its tab becomes active", async () => { |
There was a problem hiding this comment.
[P2] These tests cover one initial activation and the never-bound state, but not the transition this watcher must support repeatedly. A write-once implementation would pass both tests and reject valid mints after binding another workflow. Please drive A active, then inactive, then B active through the mounted component and assert that the captured accessor reports B's root id.
There was a problem hiding this comment.
Added a test that drives workflow A active, then inactive (a different tab on screen while A stays bound), then switches the bound workflow to B via a real agent_active_tab event through the mounted component, and asserts boundRootGraphId() reports B's root id (with an intermediate assertion that it still correctly reports A's id while A is merely inactive).
Generated by Claude Code
There was a problem hiding this comment.
Tracked as FE-2690. 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.
| /** A semantic doc is bound for the active workflow. */ | ||
| isDocBound(): boolean | ||
| /** | ||
| * The bound document's root graph id, or null when untracked or unbound. |
There was a problem hiding this comment.
[P3] This contract says null means unbound, but the production watcher intentionally retains the last latched id when the binding becomes false. The same statement appears on MintPortWiringDeps. Please describe the actual lifetime, such as null until a bound graph has been latched, so callers do not implement clearing behavior from a false contract.
There was a problem hiding this comment.
Verified: after the fix in #1, the accessor returns null only when no workflow is bound, and otherwise the bound workflow's own stored root graph id whether or not its tab is currently active (it reads activeState.id, not the live canvas graph). Rewrote both doc comments (layoutMintPort.ts and MintPortWiringDeps in mintPortWiring.ts) to say that instead of "latched"/"untracked or unbound".
Generated by Claude Code
There was a problem hiding this comment.
Tracked as FE-2690. 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.
boundRootGraphId was a ref latched by a watch on isBoundWorkflowActive, a second source of truth alongside the workflow resolver. Derive it instead from boundOrOpenWorkflowFor(boundWorkflowId)?.activeState?.id, the same accessor the component already uses to scope layout writes, and drop the ref/watch and its bound/null, unbound/stale, rebound states. beforeLoadNewGraph persists the outgoing workflow's activeState before the shared renderer graph is rewritten, so this stays correct through a tab switch without latching. Updates the boundRootGraphId doc comments on LayoutMintPortDeps and MintPortWiringDeps to describe the derived value's actual contract.
…int-port mock AgentPanelRoot.test.ts covered one initial activation and never-bound only, which a write-once latch would also pass. Drive workflow A active, then inactive, then B active through the mounted component and assert boundRootGraphId() reports B's root id, not A's. Replace the vi.mock<unknown> factory for ./crdt/mintPortWiring with a focused full mock that drops the unknown annotation and the importOriginal parameter (flagged by this repo's no-import-actual oxlint rule), so its Partial<module> return type stays compiler-checked against attachMintPortWiring's real signature. layoutStoreMintDelivery.test.ts already composes the real layout store with the real mint-port wiring, so the tab-switch root-scope regression that lived in mintPortWiring.tabSwitchScope.test.ts (with two restricted-import exceptions to reach into the renderer layer from a workbench test) moves there instead, where it needs no exception. Nothing else was left in that file, so it was removed in the prior commit.
…rt-root-graph-scope
…nt wiring test Merging main pulled in liveWidgetProjection.test.ts, added on main after this branch diverged, whose withMintWiring helper predates the boundRootGraphId field this PR's earlier commit added to MintPortWiringDeps. Supply it from the same fixed-id graph the helper already threads through, matching the existing pattern in agentNodeMaterializer.test.ts.
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: ready to approve
I found no remaining blocker or non-blocking defect at c59221f3e9. All five findings from my first review are addressed:
- mint scope now derives from the bound workflow's stored
activeState.id, rather than a second live-canvas latch; - the real-layout-store regression lives in the renderer-owned suite without a layer suppression;
- the mint-wiring mock is typed;
- the component test covers A remaining bound while inactive and the later A-to-B rebinding transition; and
- the dependency docs now describe the derived identity and null lifetime accurately.
I traced the full nine-file merge-base diff again. Foreign-workflow root layout operations are rejected at the mint boundary, valid operations for the bound root continue to mint, subgraph-interior handling remains separate, and agent-remote provenance is still gated before minting. The real-store regression fails with one foreign add_node when I temporarily remove the new graph-scope gate and passes with this head.
FE-2504 remains the longer-term deletion path for store-observer compensation; it does not supersede this targeted safety check. The shared mintPortWiring.ts overlap with #18078 remains ordinary integration risk, not a semantic conflict found here.
Local checks: 6 focused Vitest files / 346 tests passed; targeted red/green proof passed; pnpm typecheck, changed-file ESLint, pnpm oxlint:main, pnpm format:check, and pnpm knip passed. Oxlint reported five unrelated existing warnings. All 100 live checks are complete: 85 succeeded and 15 were skipped.
…rt-root-graph-scope # Conflicts: # src/workbench/extensions/agent/crdt/layoutMintPort.ts
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: changes requested
The merge conflict resolution introduced one blocking cross-workflow state bug:
- P1 — a foreign workflow's delete clears duplicate suppression for the bound document. In
layoutMintPort.ts,mintedNodeIds.delete()runs before the new root-graph mismatch check. I reproducedcreate(A, 1) → delete(B, 1) → replay create(A, 1): the replay emits a secondadd_nodeeven though document A never lost node 1. This revives the ID-collision behavior that the newly merged main code prevents. Scope the bookkeeping mutation to the bound root while preserving cleanup for same-root remote and teardown deletes.
I left the reproduced defect and one type-safety issue inline.
PR body corrections
- P3: The summary and Changes section still say
AgentPanelRootlatchesapp.rootGraph.id. The implementation now derives the bound workflow's serializedactiveState.id; that source and reactive lifetime are central to the fix. - P3: Review Focus points to deleted
mintPortWiring.tabSwitchScope.test.ts. The real-store regression now lives insrc/renderer/core/layout/store/layoutStoreMintDelivery.test.ts.
Prior findings
All five findings from the first review remain fixed after the merge: the duplicate latch is gone, the real-store test stays renderer-owned, the mock remains typed, the A→inactive→B transition remains covered, and source docblocks still describe the derived identity accurately.
Checked and cleared
- Fallow reports
layoutMintPort.onChangeat cyclomatic 18 / CRAP 88. The local change-scoped audit analyzed all nine files and classifies it asintroduced:false; the new reporting policy is already isolated in a helper, so extracting switch arms would move rather than remove complexity. - Codecov still reports one uncovered
AgentPanelRootline. The behavior is covered across null, initially bound, inactive-but-still-bound, and rebound identities, and this merge changed no component behavior. - The six PR commits are unchanged by
git range-diff; the new defect is specifically the resolution oflayoutMintPort.tsagainst main'smintedNodeIdsbookkeeping.
Coverage and checks
Standard-depth correctness, maintainability, idiomaticity, tests, and documentation lanes reviewed all nine files. Focused Vitest passed 6 files / 351 tests. The conflict-specific regression fails on this head with a duplicate add_node; a temporary graph-scoped bookkeeping fix made both relevant suites pass (2 files / 48 tests), then I restored the exact head. pnpm typecheck, changed-file ESLint, pnpm oxlint:main, pnpm format:check, and pnpm knip passed. Oxlint emitted five unrelated existing warnings. The local Fallow audit completed with configuration/baseline noise and the cleared complexity item above.
No Playwright spec or fixture is in the nine-file PR diff, so there was nothing to list locally; I used CI evidence. All 100 checks for this head are complete: 85 succeeded and 15 were skipped.
The original tab-switch regression remains red without this PR's scope gate and green with it. FE-2504 remains the future deletion path for observer compensation, not a substitute for fixing this merge interaction.
| mintedNodeIds.delete(String(operation.nodeId)) | ||
| if (!gate(change, inTeardown)) return | ||
| if (reportUnrepresentableInteriorChange(operation, 'delete')) return | ||
| if (reportOpForUnboundGraph(operation, 'delete')) return |
There was a problem hiding this comment.
[P1] Keep foreign deletes from mutating the bound document’s dedupe state. mintedNodeIds.delete() runs before this mismatch check. I reproduced: mint node 1 for bound graph A, deliver a root-scoped delete for graph B with the same ID, then replay A’s create. This line rejects B’s wire op, but B has already removed A’s ID from the set, so the replay emits a second add_node. Scope the bookkeeping update by bound root before clearing the ID, while retaining cleanup for same-root remote and teardown deletes; add that three-event regression.
There was a problem hiding this comment.
Fixed in 1070716: mintedNodeIds.delete() in the deleteNode case now runs only when the delete's graphId matches the bound root graph, so a foreign-graph delete can no longer clear the bound graph's dedupe entry. Added the three-event regression test (create A → delete B → replay create A → exactly one add_node, and B's op is still reported/dropped) plus a same-root-delete-still-clears case; both confirmed red against the pre-fix code and green after.
Generated by Claude Code
There was a problem hiding this comment.
Tracked as FE-2690. 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.
| * already in flight when the binding flips cannot mint the new graph's | ||
| * nodes into the old document. | ||
| */ | ||
| boundRootGraphId(): string | null |
There was a problem hiding this comment.
[P3] Keep the root-graph role in the type. This new semantic boundary accepts any string even though RootGraphId already distinguishes root IDs from owning/subgraph IDs. Please return RootGraphId | null from both dependency interfaces and convert the serialized workflow ID with toRootGraphId at the composition boundary. That lets the compiler reject wiring the wrong graph-ID role into the safety check.
There was a problem hiding this comment.
Fixed in 1070716: boundRootGraphId() on both LayoutMintPortDeps and MintPortWiringDeps now returns RootGraphId | null, and AgentPanelRoot.vue's boundRootGraphId computed converts the bound workflow's serialized activeState.id with toRootGraphId at the composition boundary. Updated the mocks/fixtures in the affected test files to construct the branded id the same way.
Generated by Claude Code
There was a problem hiding this comment.
Tracked as FE-2690. 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.
A root-scoped deleteNode for a graph other than the bound one (a workflow load still in flight sharing a node id with the bound document) was clearing the layout mint port's own add_node dedupe entry for that id before the root-graph mismatch check ran. A replayed create for the bound graph then emitted a second add_node. Scope the mintedNodeIds mutation to same-root deletes only, keeping cleanup for same-root remote deletes and teardown/reset intact. Also tighten boundRootGraphId() on both mint dependency interfaces to return RootGraphId instead of a bare string, converting the serialized workflow id with toRootGraphId at the AgentPanelRoot composition boundary.
|
|
…und document's root graph (#18356) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789709550015299?thread_ts=1789709550.015299&cid=C0BGH348Z0C)_ Backport of #18109 to `core/1.54`. ## Summary **Before:** While the Agent panel is bound to a workflow, switching to another workflow tab reuses the same in-memory root graph object for the new tab's nodes before the panel's document binding has caught up. Every node LiteGraph attaches during that window queued a layout `createNode` change, and the mint port did not check which graph a change belonged to, so those changes for the new tab were minted as `add_node` operations and sent into the previous tab's still-bound document. **After:** The layout mint port now compares every root-scoped `createNode`/`deleteNode`/`clearGraph` change against the bound document's own root graph id. A change naming a different graph is dropped and reported once instead of being minted, so a tab switch can no longer leak one workflow's nodes into another workflow's document. ## Changes - **What**: Cherry-picked the squash-merge commit `f664247339869597a78c165b164c4220246b15fa` (#18109) onto a new branch from `origin/core/1.54`. The automated backport failed with conflicts in `src/renderer/core/layout/store/layoutStoreMintDelivery.test.ts`, `src/workbench/extensions/agent/AgentPanelRoot.vue`, `src/workbench/extensions/agent/crdt/layoutMintPort.test.ts`, and `src/workbench/extensions/agent/crdt/layoutMintPort.ts`. In every conflicting hunk the target branch's side was empty (the PR's code is purely additive on top of code `core/1.54` already had unchanged), so each hunk was resolved by taking the incoming PR content as-is; no logic was rewritten by hand. ## Review Focus - The cherry-pick failed typecheck for two missing dependencies not yet on `core/1.54`: the `withoutGhostFlag` helper (added to `layoutMintPort.ts` earlier by #18191, needed by this PR's new code) and a `toRootGraphId` import in `AgentPanelRoot.test.ts` (used by this PR's new tests, already imported on `main` from an earlier, separately un-backported change). Both were added back verbatim from `main` so the cherry-picked code compiles; no other logic was changed. - Verification: `pnpm vitest run src/workbench/extensions/agent/crdt src/renderer/core/layout/store/layoutStoreMintDelivery.test.ts src/workbench/extensions/agent/AgentPanelRoot.test.ts` — 904 passed, 3 failed, 1 expected fail; the 3 failures (`AgentPanelRoot.test.ts` "Media-card" attach/upload cases) were confirmed pre-existing and unrelated by running the same tests against unmodified `origin/core/1.54`, where they fail identically. `pnpm eslint` and `pnpm format:check` (oxfmt) on all changed files: clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01NQVcfKhCKjLstqo3mJS7fc Co-authored-by: Claude <noreply@anthropic.com>
…ound document's root graph (#18360) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789709550015299?thread_ts=1789709550.015299&cid=C0BGH348Z0C)_ Backport of #18109 to `cloud/1.54`. ## Summary **Before:** While the Agent panel is bound to a workflow, switching to another workflow tab reuses the same in-memory root graph object for the new tab's nodes before the panel's document binding has caught up. Every node LiteGraph attaches during that window queued a layout `createNode` change, and the mint port did not check which graph a change belonged to, so those changes for the new tab were minted as `add_node` operations and sent into the previous tab's still-bound document. **After:** The layout mint port now compares every root-scoped `createNode`/`deleteNode`/`clearGraph` change against the bound document's own root graph id. A change naming a different graph is dropped and reported once instead of being minted, so a tab switch can no longer leak one workflow's nodes into another workflow's document. ## Changes - **What**: Cherry-picked the squash-merge commit `f664247339869597a78c165b164c4220246b15fa` (#18109) onto a new branch from `origin/cloud/1.54`. The automated backport failed with conflicts in `src/renderer/core/layout/store/layoutStoreMintDelivery.test.ts`, `src/workbench/extensions/agent/AgentPanelRoot.vue`, `src/workbench/extensions/agent/crdt/layoutMintPort.test.ts`, and `src/workbench/extensions/agent/crdt/layoutMintPort.ts` — the same shape of conflicts as the `core/1.54` backport (#18356). In every conflicting hunk the target branch's side was empty (the PR's code is purely additive on top of code `cloud/1.54` already had unchanged), so each hunk was resolved by taking the incoming PR content as-is; no logic was rewritten by hand. ## Review Focus - The cherry-pick failed typecheck for two missing dependencies not yet on `cloud/1.54`: the `withoutGhostFlag` helper (added to `layoutMintPort.ts` earlier by #18191, needed by this PR's new code) and a `toRootGraphId` import in `AgentPanelRoot.test.ts` (used by this PR's new tests, already imported on `main` from an earlier, separately un-backported change). Both were added back verbatim from `main` so the cherry-picked code compiles; no other logic was changed. - Verification: `pnpm vitest run src/workbench/extensions/agent/crdt src/renderer/core/layout/store/layoutStoreMintDelivery.test.ts src/workbench/extensions/agent/AgentPanelRoot.test.ts` — 938 passed, 3 failed, 1 expected fail; the 3 failures (`AgentPanelRoot.test.ts` "Media-card" attach/upload cases) were confirmed pre-existing and unrelated (also reproduced against unmodified `origin/core/1.54`, same failures, same cause). `pnpm eslint` and `pnpm format:check` (oxfmt) on all changed files: clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01NQVcfKhCKjLstqo3mJS7fc Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Merging main into this branch pulled in #18109's boundRootGraphId addition to MintPortWiringDeps, but this test's attachMintPortWiring mock predates that and never got the field, breaking pnpm typecheck (TS2345: Property 'boundRootGraphId' is missing). Add it following the same pattern already used in mintPortWiring.test.ts.
|
A real production data point for this guard: a cloud-frontend-staging Sentry alert (2026-09-22) hit exactly the Since this fix is already merged and #18326 supersedes/hardens it (renaming the guard to activation-based Generated by Claude Code |
…ased targeting #18109 landed on main after this branch forked, adding boundRootGraphId() targeting plus a mintedNodeIdsByRoot dedupe to stop a replayed createNode (litegraph undo/redo, or a create op replaying across two tabs bound to the same root graph) from minting a second add_node for a node the doc already has. This branch's rewrite replaced boundRootGraphId() with the activation coordinator's isForActivatedDocument()/activeRootGraphId(), which subsumes #18109's targeting check, but carried none of its dedupe forward. Port the dedupe into attachLayoutMintPort, keyed by the operation's own graphId (guaranteed to be the activated document's by the time a create or delete reaches the bucket, since isForActivatedDocument already filtered): - createNode skips a replay for an id this port already relayed, and records newly-minted ids in that graph's bucket - deleteNode evicts the id from its own-graph bucket whenever a root-owned delete fires, independent of gating, so a later replay can re-mint - an intentional (human-confirmed) clear forgets the whole bucket; an incidental clearGraph (tab-switch reconfiguring the shared canvas graph in place) leaves it alone
|
|
|
|
|
|
Addresses the review on #19868. Three pre-merge blockers and the P2s behind them. The binding latched its rootGraphId at publish time and nothing could move it, but the live root graph id rotates in place outside any graph load: Clear Workflow calls app.clean(), whose LGraph.clear() mints a fresh uuid with no loadGraphData. docOpMinter.isMintableRootScope then refused every later add_node, connect, remove and set_node_field on the bound tab as agent_crdt_op_for_unbound_graph, with nothing on screen to say the user's edits had stopped reaching the agent document. Reading activeState.id (the #18109 design) self-healed after a clear; the latch does not. The binding now tracks the live id, and rebindActiveRootGraph follows an in-place rotation without emitting a document transition (ADR-0026 D3). The lifecycle boundary moves into workflowService.beforeLoadNewGraph and afterLoadNewGraph. All three graph-load entrypoints already call that pair, so loadApiJson and the A1111 import are covered by construction instead of leaving the previous document bound while the canvas holds an imported graph, and afterLoadNewGraph publishes the workflow it actually selected. The same-document inference lives beside activateLoadedWorkflow and reuses its rule, so a same-path load of different content retracts before the graph is cleared. beforeLoadNewGraph returns a per-load token that afterLoadNewGraph and invalidate hand back, so a load finishing after a newer one started can neither publish nor retract on its behalf: ChangeTracker.undo and paste call loadGraphData outside the workflow-load queue. The failure paths invalidate through that token, and only once the graph has actually been cleared or replaced. isActive and activeRootGraphId compared with binding?.uid === uid, which reads as true when both sides are undefined, so a workflow with no session uid reported itself active against no binding at all. That fail-open is why only five of AgentPanelRoot's 378 tests failed instead of most of them: no mock workflow minted an instanceId. Both now compare against a non-null binding, and createMockLoadedWorkflow mints a uid like the real class. Dropped the subscribe/emit pair: nothing in production subscribed, and ADR-0026 D3 wants typed events, late-registration catch-up and serialized transitions from that bus, so its shape would change when the first consumer arrives. That retires the missing rootGraphId event, the no-op duplicate disposer, $reset silencing the channel, and the reentrancy-unguarded emit. activeBinding is no longer exposed, so no caller can skip a transition. AgentPanelRoot.test.ts publishes the binding where a completed load does rather than through activeState.id. Two assertions moved to the contract this PR replaces: a bound workflow in a background tab now reports no root graph, and the #18109 rotation guard drives the rotation the way app.clean() does, with the app.clean() half pinned in app.test.ts. Scope: an ADR amendment records this as a precursor to Phase 1 of ADR-GRAPH-DOCUMENT-0026, not Phase 1 — the uid is ComfyWorkflow.instanceId, which survives unload(), so close/reopen does not mint a new uid as D1 requires, and there is no lifecycle bus, no Close from the death paths, no ingress stamping, no key helper and no store migrations. Black-box: browser_tests/tests/agent/agentClearWorkflowKeepsMinting.spec.ts. The user clears the workflow, adds a node by hand, and the node must reach the agent document. Red without the rebind (hostNodeIds() stays empty), green with it, and it asserts the root graph id actually rotated so it cannot pass for the wrong reason.
Addresses the review on #19868. Three pre-merge blockers and the P2s behind them. The binding latched its rootGraphId at publish time and nothing could move it, but the live root graph id rotates in place outside any graph load: Clear Workflow calls app.clean(), whose LGraph.clear() mints a fresh uuid with no loadGraphData. docOpMinter.isMintableRootScope then refused every later add_node, connect, remove and set_node_field on the bound tab as agent_crdt_op_for_unbound_graph, with nothing on screen to say the user's edits had stopped reaching the agent document. Reading activeState.id (the #18109 design) self-healed after a clear; the latch does not. The binding now tracks the live id, and rebindActiveRootGraph follows an in-place rotation without emitting a document transition (ADR-0026 D3). The lifecycle boundary moves into workflowService.beforeLoadNewGraph and afterLoadNewGraph. All three graph-load entrypoints already call that pair, so loadApiJson and the A1111 import are covered by construction instead of leaving the previous document bound while the canvas holds an imported graph, and afterLoadNewGraph publishes the workflow it actually selected. The same-document inference lives beside activateLoadedWorkflow and reuses its rule, so a same-path load of different content retracts before the graph is cleared. beforeLoadNewGraph returns a per-load token that afterLoadNewGraph and invalidate hand back, so a load finishing after a newer one started can neither publish nor retract on its behalf: ChangeTracker.undo and paste call loadGraphData outside the workflow-load queue. The failure paths invalidate through that token, and only once the graph has actually been cleared or replaced. isActive and activeRootGraphId compared with binding?.uid === uid, which reads as true when both sides are undefined, so a workflow with no session uid reported itself active against no binding at all. That fail-open is why only five of AgentPanelRoot's 378 tests failed instead of most of them: no mock workflow minted an instanceId. Both now compare against a non-null binding, and createMockLoadedWorkflow mints a uid like the real class. Dropped the subscribe/emit pair: nothing in production subscribed, and ADR-0026 D3 wants typed events, late-registration catch-up and serialized transitions from that bus, so its shape would change when the first consumer arrives. That retires the missing rootGraphId event, the no-op duplicate disposer, $reset silencing the channel, and the reentrancy-unguarded emit. activeBinding is no longer exposed, so no caller can skip a transition. AgentPanelRoot.test.ts publishes the binding where a completed load does rather than through activeState.id. Two assertions moved to the contract this PR replaces: a bound workflow in a background tab now reports no root graph, and the #18109 rotation guard drives the rotation the way app.clean() does, with the app.clean() half pinned in app.test.ts. Scope: an ADR amendment records this as a precursor to Phase 1 of ADR-GRAPH-DOCUMENT-0026, not Phase 1 — the uid is ComfyWorkflow.instanceId, which survives unload(), so close/reopen does not mint a new uid as D1 requires, and there is no lifecycle bus, no Close from the death paths, no ingress stamping, no key helper and no store migrations. Black-box: browser_tests/tests/agent/agentClearWorkflowKeepsMinting.spec.ts. The user clears the workflow, adds a node by hand, and the node must reach the agent document. Red without the rebind (hostNodeIds() stays empty), green with it, and it asserts the root graph id actually rotated so it cannot pass for the wrong reason.
Addresses the review on #19868. Three pre-merge blockers and the P2s behind them. The binding latched its rootGraphId at publish time and nothing could move it, but the live root graph id rotates in place outside any graph load: Clear Workflow calls app.clean(), whose LGraph.clear() mints a fresh uuid with no loadGraphData. docOpMinter.isMintableRootScope then refused every later add_node, connect, remove and set_node_field on the bound tab as agent_crdt_op_for_unbound_graph, with nothing on screen to say the user's edits had stopped reaching the agent document. Reading activeState.id (the #18109 design) self-healed after a clear; the latch does not. The binding now tracks the live id, and rebindActiveRootGraph follows an in-place rotation without emitting a document transition (ADR-0026 D3). The lifecycle boundary moves into workflowService.beforeLoadNewGraph and afterLoadNewGraph. All three graph-load entrypoints already call that pair, so loadApiJson and the A1111 import are covered by construction instead of leaving the previous document bound while the canvas holds an imported graph, and afterLoadNewGraph publishes the workflow it actually selected. The same-document inference lives beside activateLoadedWorkflow and reuses its rule, so a same-path load of different content retracts before the graph is cleared. beforeLoadNewGraph returns a per-load token that afterLoadNewGraph and invalidate hand back, so a load finishing after a newer one started can neither publish nor retract on its behalf: ChangeTracker.undo and paste call loadGraphData outside the workflow-load queue. The failure paths invalidate through that token, and only once the graph has actually been cleared or replaced. isActive and activeRootGraphId compared with binding?.uid === uid, which reads as true when both sides are undefined, so a workflow with no session uid reported itself active against no binding at all. That fail-open is why only five of AgentPanelRoot's 378 tests failed instead of most of them: no mock workflow minted an instanceId. Both now compare against a non-null binding, and createMockLoadedWorkflow mints a uid like the real class. Dropped the subscribe/emit pair: nothing in production subscribed, and ADR-0026 D3 wants typed events, late-registration catch-up and serialized transitions from that bus, so its shape would change when the first consumer arrives. That retires the missing rootGraphId event, the no-op duplicate disposer, $reset silencing the channel, and the reentrancy-unguarded emit. activeBinding is no longer exposed, so no caller can skip a transition. AgentPanelRoot.test.ts publishes the binding where a completed load does rather than through activeState.id. Two assertions moved to the contract this PR replaces: a bound workflow in a background tab now reports no root graph, and the #18109 rotation guard drives the rotation the way app.clean() does, with the app.clean() half pinned in app.test.ts. Scope: an ADR amendment records this as a precursor to Phase 1 of ADR-GRAPH-DOCUMENT-0026, not Phase 1 — the uid is ComfyWorkflow.instanceId, which survives unload(), so close/reopen does not mint a new uid as D1 requires, and there is no lifecycle bus, no Close from the death paths, no ingress stamping, no key helper and no store migrations. Black-box: browser_tests/tests/agent/agentClearWorkflowKeepsMinting.spec.ts. The user clears the workflow, adds a node by hand, and the node must reach the agent document. Red without the rebind (hostNodeIds() stays empty), green with it, and it asserts the root graph id actually rotated so it cannot pass for the wrong reason.
Requested by Christian Byrne · Slack thread
Summary
Before: While the Agent panel is bound to a workflow, switching to another workflow tab reuses the same in-memory root graph object for the new tab's nodes before the panel's document binding has caught up. Every node LiteGraph attaches during that window queues a layout
createNodechange, and the mint port did not check which graph a change belonged to, so those changes for the new tab were minted asadd_nodeoperations and sent into the previous tab's still-bound document.After: The layout mint port now compares every root-scoped
createNode/deleteNode/clearGraphchange against the bound document's own root graph id, sourced from a plain accessor derived from the bound workflow's own serializedactiveState.id(not the live canvas graph, and not a memoizedcomputed, so it can never latch a value that goes stale while the same workflow's own graph id rotates in place). A change naming a different graph is dropped and reported once (agent_crdt_op_for_unbound_graph) instead of being minted, so a tab switch can no longer leak one workflow's nodes into another workflow's document.Mechanism:
app.tsreuses one root graph instance across every workflow and reconfigures it (rewriting its stored id) before the panel'sisBoundWorkflowActiveflag has a chance to flip, so the layout store's queuedcreateNodenotifications for the newly-loaded workflow flush on a microtask while the mint port still believes the previous workflow's document is bound.Changes
AgentPanelRoot.vuederivesboundRootGraphIdas a plain function reading the bound workflow's own serializedactiveState.id(viaboundOrOpenWorkflowFor(boundWorkflowId)), converted withtoRootGraphId, and passes the accessor intoattachMintPortWiring. Reading it as a plain accessor (not acomputed) matters because the workflow'schangeTrackerismarkRaw'd: acomputedreading through it has no reactive dependency onactiveState.idand would keep serving a stale id after the same bound workflow's own graph id rotates without a rebind (e.g.LGraph.clear()).mintPortWiring.tsforwards theboundRootGraphIdaccessor (typedRootGraphId | null) through to the layout mint port.layoutMintPort.tsdrops a root-scopedcreateNode/deleteNode/clearGraphwhosegraphIddoes not match the bound root graph id, reporting once per action and graph pair per tick viareportError(agent_crdt_op_for_unbound_graph). Its own mint-dedupe bookkeeping is keyed by each operation's owngraphId(one id set per root graph, looked up by the value the op itself carries — every real op'sgraphIdcomes from the liveLGraph, which always has one) rather than by theboundRootGraphId()accessor, so a graph's bucket is reachable only through its own ops: a rebind, a still-in-flight foreign load, or a document whose id has not hydrated yet can never share or evict another graph's bookkeeping.clearGraphonly forgets a graph's bucket for an intentional (human-confirmed) clear captured viarunIntentionalClear, never for an incidental clear (a tab switch's in-placeLGraph.clear()), so a return to a root whose nodes are still in the document does not re-mint them.deleteNode's forget-side bookkeeping only fires for a genuinely same-graph, root-owned delete (ownerGraphId === graphId), so a subgraph-interior delete sharing a node id with a root-level node cannot corrupt the root's own entry.Review Focus
src/renderer/core/layout/store/layoutStoreMintDelivery.test.tsreproduces the exact microtask race against the real layout store (teardown bracket open → configure the new workflow's nodes → teardown bracket close, all synchronous → flush). It failed before this change (anadd_nodefor the other workflow's node was minted) and passes after.layoutMintPort.test.tscovers the dedupe-bookkeeping regressions: a root-scoped delete or clear for a foreign graph is dropped and reported without touching the bound graph's own dedupe entry or an active intentional-clear capture; an incidental (non-intentional) same-graph clear — the shape a tab switch's in-placeLGraph.clear()emits before rebinding — also leaves the bound graph's dedupe entry untouched; two unidentified documents (accessor reporting null for both) no longer share a dedupe bucket; a subgraph-interior delete colliding on node id with a root-level node cannot clear the root's own entry; and a rebind to a different root, including an A→B→A round trip that actually delivers B's own create while B is bound, mints/suppresses correctly on each side.createNodeanddeleteNodethe scope check only applies once a change is already root-scoped (ownerGraphId === graphId);clearGraphhas no owner-graph check because it is always root-scoped by construction (layoutStore.clearGraph(rootGraphId)is its only call site) — it is classified directly by itsgraphId. The existing subgraph-interior handling inreportUnrepresentableInteriorChangeis untouched, as isserializeForMint.boundRootGraphId()returningnull(no workflow bound, or a workflow bound before itsactiveStatehas hydrated) is treated as permissive rather than restrictive, matching every other existing caller's fixtures: failing closed there would turn an ordinary, transient post-bind race into permanently dropped user edits, which is worse than the narrow foreign-load race it would guard against — a race the dedupe bucket's own per-graphId keying (above) already removes the practical risk from, and one still independently covered by the teardown/session brackets.Verification
pnpm vitest run src/workbench/extensions/agent/crdt src/renderer/core/layout/store/layoutStoreMintDelivery.test.ts: 727 passed, 2 pre-existing expected fails (unrelated).pnpm vitest run src/workbench/extensions/agent: 1803 passed, 4 pre-existing expected fails (unrelated).pnpm vitest run src/workbench/extensions/agent/AgentPanelRoot.test.ts: included above.pnpm typecheck,pnpm lint(targeted to changed files plus the full pre-commit hook),pnpm format,pnpm knip: clean.Related: #18078, #18071
Generated by Claude Code