Repository navigation
[backport core/1.55] refactor(canvas): centralize viewport lifecycle and framing - #19959
Conversation
- make CanvasViewport the authority for CSS size, backing-store size, and DPR - serialize visibility-sensitive camera work through an identity-aware CanvasScheduler - reject malformed saved camera state and stale graph/subgraph operations - use one visible viewport rectangle for immediate and animated panel-aware framing - migrate litegraph, minimap, layout, hit testing, and canvas-center consumers to the applied DPR - cover the real App Mode template-loading product path This incorporates the viewport migration from [merged PR supersedes the remaining work in [PR [PR #19095](#19095). Those two fallback PRs will be closed after this PR merges. The panel work is adapted to the existing `visibleCanvasViewport` contract rather than introducing a second inset API. Related to #11154: Fit View now excludes the docked agent panel, but it still does not subtract the right-side parameters panel, so that issue stays open. - application and browser-test typechecks passed - ADR validation, formatting, and changed-file lint passed - production build passed - pre-commit and pre-push formatting, lint, knip, and changed-file fallow gates passed - [exact-head CI](https://github.com/Comfy-Org/ComfyUI_frontend/commit/a558de2719aff8b5546cb25f2b2ad413420928a5/checks) passed with 105 successful checks, 19 expected skips, and no failures - Playwright product-path and 0.5x DPR regressions passed in the hosted browser matrix The lifecycle is measure, apply atomically to both canvases, then frame and draw. Scheduled operations carry both a semantic key and an ownership predicate, so stale loads cannot clear or replace current camera work. Panel-aware fitting consumes a usable rectangle in CSS pixels, shared by immediate and animated paths. --------- Co-authored-by: Alexander Brown <drjkl@comfy.org>
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 2143 passed, 0 failed · 2 flaky📊 Browser Reports
🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since f871ec91cf8c47edf0ebf7d74fe68e2ac38aa898
Full docs: ADR-DEVEX-LINT-0015 📦 Bundle Size
⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-10-03T09:35:44.419Z",
"gitSha": "2290188861c1eecb4840e3ce1667dcc9c1f2feb3",
"branch": "backport-11420-to-core-1.55",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2008.9439999999854,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.068,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 355.059,
"heapDeltaBytes": 7222764,
"heapUsedBytes": 75627504,
"domNodes": -258,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 10.315,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 1988.8010000000236,
"styleRecalcs": 12,
"styleRecalcDurationMs": 7.0760000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 283.982,
"heapDeltaBytes": 8138836,
"heapUsedBytes": 75621808,
"domNodes": -254,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 7.243999999999999,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1744.8949999999854,
"styleRecalcs": 46,
"styleRecalcDurationMs": 14.480000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 647.721,
"heapDeltaBytes": 8841212,
"heapUsedBytes": 77549876,
"domNodes": -256,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 125.104,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1694.2409999999768,
"styleRecalcs": 46,
"styleRecalcDurationMs": 12.587000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 535.463,
"heapDeltaBytes": -5331916,
"heapUsedBytes": 57231772,
"domNodes": -258,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 105.114,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1709.2399999999657,
"styleRecalcs": 31,
"styleRecalcDurationMs": 14.084,
"layouts": 6,
"layoutDurationMs": 1.107,
"taskDurationMs": 236.59199999999996,
"heapDeltaBytes": 2957692,
"heapUsedBytes": 71295960,
"domNodes": 78,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 10.850000000000001,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1692.399000000023,
"styleRecalcs": 28,
"styleRecalcDurationMs": 13.731000000000002,
"layouts": 6,
"layoutDurationMs": 1.059,
"taskDurationMs": 260.396,
"heapDeltaBytes": 2203556,
"heapUsedBytes": 64737088,
"domNodes": 77,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 12.902,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 524.9169999999594,
"styleRecalcs": 16,
"styleRecalcDurationMs": 8.470000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 333.128,
"heapDeltaBytes": 18102816,
"heapUsedBytes": 86599956,
"domNodes": 23,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 114.35999999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 500.2719999999954,
"styleRecalcs": 16,
"styleRecalcDurationMs": 8.344999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 322.623,
"heapDeltaBytes": 18085976,
"heapUsedBytes": 86789932,
"domNodes": 23,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 112.477,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 917.9359999999974,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 540.97,
"heapDeltaBytes": 35251196,
"heapUsedBytes": 103338044,
"domNodes": 0,
"jsHeapTotalBytes": 19558400,
"scriptDurationMs": 43.653999999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 314,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 859.9750000000199,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 447.2869999999999,
"heapDeltaBytes": 35660076,
"heapUsedBytes": 102315376,
"domNodes": 0,
"jsHeapTotalBytes": 18771968,
"scriptDurationMs": 36.407999999999994,
"eventListeners": 0,
"totalBlockingTimeMs": 266,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 700.8789999999863,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 309.0059999999997,
"heapDeltaBytes": 14479416,
"heapUsedBytes": 89691664,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 110.61900000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 102,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 687.0339999999828,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 278.3509999999998,
"heapDeltaBytes": 14748740,
"heapUsedBytes": 90763600,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 100.50600000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 92,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6165.501000000006,
"styleRecalcs": 2,
"styleRecalcDurationMs": 1.308,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5048.549999999999,
"heapDeltaBytes": -3161540,
"heapUsedBytes": 76207740,
"domNodes": -259,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 4023.6220000000003,
"eventListeners": -174,
"totalBlockingTimeMs": 30,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6289.5469999999705,
"styleRecalcs": 2,
"styleRecalcDurationMs": 1.1649999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5012.373,
"heapDeltaBytes": 680772,
"heapUsedBytes": 81848184,
"domNodes": -16,
"jsHeapTotalBytes": 9175040,
"scriptDurationMs": 3992.3839999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6475.143000000003,
"styleRecalcs": 3,
"styleRecalcDurationMs": 1.8980000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5287.650000000001,
"heapDeltaBytes": 31454216,
"heapUsedBytes": 95573508,
"domNodes": -269,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 4234.352,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000013,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5520.513999999992,
"styleRecalcs": 3,
"styleRecalcDurationMs": 2.062999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4472.633,
"heapDeltaBytes": 3203120,
"heapUsedBytes": 84280828,
"domNodes": -14,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 3626.322,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2023.5619999999699,
"styleRecalcs": 9,
"styleRecalcDurationMs": 11.201,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 408.163,
"heapDeltaBytes": 4988272,
"heapUsedBytes": 87468380,
"domNodes": -257,
"jsHeapTotalBytes": -233472,
"scriptDurationMs": 29.332000000000004,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2026.2920000000122,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.698999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 437.6449999999999,
"heapDeltaBytes": -22909548,
"heapUsedBytes": 66947892,
"domNodes": -249,
"jsHeapTotalBytes": 3436544,
"scriptDurationMs": 30.124,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2139.404000000013,
"styleRecalcs": 68,
"styleRecalcDurationMs": 14.733999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1156.152,
"heapDeltaBytes": -24233404,
"heapUsedBytes": 65029700,
"domNodes": -242,
"jsHeapTotalBytes": -233472,
"scriptDurationMs": 587.6550000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2178.14199999998,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.507,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1152.96,
"heapDeltaBytes": -24171904,
"heapUsedBytes": 65781468,
"domNodes": -240,
"jsHeapTotalBytes": 815104,
"scriptDurationMs": 584.1840000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3102.103999999997,
"styleRecalcs": 68,
"styleRecalcDurationMs": 14.787999999999998,
"layouts": 60,
"layoutDurationMs": 15.619000000000002,
"taskDurationMs": 1278.6179999999997,
"heapDeltaBytes": -1069908,
"heapUsedBytes": 64784044,
"domNodes": 30,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 573.963,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3111.770999999976,
"styleRecalcs": 74,
"styleRecalcDurationMs": 18.523999999999997,
"layouts": 60,
"layoutDurationMs": 14.93,
"taskDurationMs": 1245.822,
"heapDeltaBytes": -26211260,
"heapUsedBytes": 65332000,
"domNodes": -233,
"jsHeapTotalBytes": 5271552,
"scriptDurationMs": 546.721,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2339.2110000000343,
"styleRecalcs": 48,
"styleRecalcDurationMs": 11.708999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1337.3629999999998,
"heapDeltaBytes": -17787904,
"heapUsedBytes": 74671656,
"domNodes": 16,
"jsHeapTotalBytes": 6328320,
"scriptDurationMs": 679.635,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2252.2519999999986,
"styleRecalcs": 44,
"styleRecalcDurationMs": 8.951,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1372.5990000000002,
"heapDeltaBytes": 2916752,
"heapUsedBytes": 69056560,
"domNodes": 8,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 711.138,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2004.4070000000147,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.065,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 327.05099999999993,
"heapDeltaBytes": -23719244,
"heapUsedBytes": 66222056,
"domNodes": -248,
"jsHeapTotalBytes": 3960832,
"scriptDurationMs": 24.294,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2020.6699999999955,
"styleRecalcs": 10,
"styleRecalcDurationMs": 11.739,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 438.42800000000005,
"heapDeltaBytes": -23785996,
"heapUsedBytes": 66301420,
"domNodes": -253,
"jsHeapTotalBytes": 3960832,
"scriptDurationMs": 29.368,
"eventListeners": -184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 397.06800000004705,
"styleRecalcs": 48,
"styleRecalcDurationMs": 10.079999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 262.20599999999996,
"heapDeltaBytes": 12894796,
"heapUsedBytes": 83666932,
"domNodes": 22,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 92.432,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 512.6940000000104,
"styleRecalcs": 48,
"styleRecalcDurationMs": 11.645999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 299.27700000000004,
"heapDeltaBytes": 13146316,
"heapUsedBytes": 77177556,
"domNodes": 22,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 102.42,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1991.9310000000223,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.475000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 343.515,
"heapDeltaBytes": 11096660,
"heapUsedBytes": 81681284,
"domNodes": -275,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 10.821,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 1989.6350000000211,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.677999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 357.00200000000007,
"heapDeltaBytes": -14765584,
"heapUsedBytes": 55621700,
"domNodes": -272,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 10.234,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1692.8239999999732,
"styleRecalcs": 46,
"styleRecalcDurationMs": 14.32,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 553.23,
"heapDeltaBytes": 7392408,
"heapUsedBytes": 77713788,
"domNodes": -275,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 87.57600000000001,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1692.3550000000205,
"styleRecalcs": 47,
"styleRecalcDurationMs": 15.209999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 591.1959999999999,
"heapDeltaBytes": -6041564,
"heapUsedBytes": 57922136,
"domNodes": -272,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 91.721,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 801.4969999999835,
"styleRecalcs": 19,
"styleRecalcDurationMs": 19.357,
"layouts": 5,
"layoutDurationMs": 8.067000000000002,
"taskDurationMs": 625.837,
"heapDeltaBytes": 19348480,
"heapUsedBytes": 107421080,
"domNodes": 13667,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 21.427000000000003,
"eventListeners": 2383,
"totalBlockingTimeMs": 64,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8248.920999999995,
"styleRecalcs": 251,
"styleRecalcDurationMs": 45.292,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3930.716,
"heapDeltaBytes": 2346232,
"heapUsedBytes": 91895596,
"domNodes": -235,
"jsHeapTotalBytes": -8192,
"scriptDurationMs": 1962.233,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8294.062999999936,
"styleRecalcs": 251,
"styleRecalcDurationMs": 48.209,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4107.968,
"heapDeltaBytes": -729076,
"heapUsedBytes": 88032472,
"domNodes": -235,
"jsHeapTotalBytes": -8192,
"scriptDurationMs": 1989.705,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 11822.140999999989,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11260.360999999999,
"heapDeltaBytes": -29762208,
"heapUsedBytes": 196085128,
"domNodes": -8062,
"jsHeapTotalBytes": -11018240,
"scriptDurationMs": 163.22400000000002,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 11945.879999999988,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11768.515999999998,
"heapDeltaBytes": -49279108,
"heapUsedBytes": 176455064,
"domNodes": -8062,
"jsHeapTotalBytes": -19931136,
"scriptDurationMs": 191.364,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 13759.136000000013,
"styleRecalcs": 66,
"styleRecalcDurationMs": 13.164999999999981,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13520.144999999999,
"heapDeltaBytes": -58716588,
"heapUsedBytes": 167095900,
"domNodes": -8062,
"jsHeapTotalBytes": -22290432,
"scriptDurationMs": 625.734,
"eventListeners": -14928,
"totalBlockingTimeMs": 37,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 14823.160000000029,
"styleRecalcs": 74,
"styleRecalcDurationMs": 16.55899999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14623.688999999998,
"heapDeltaBytes": -29108800,
"heapUsedBytes": 190629412,
"domNodes": -8062,
"jsHeapTotalBytes": -20070400,
"scriptDurationMs": 713.355,
"eventListeners": -14928,
"totalBlockingTimeMs": 9,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 4053.067999999996,
"styleRecalcs": 20,
"styleRecalcDurationMs": 49.750000000000014,
"layouts": 20,
"layoutDurationMs": 19.842000000000006,
"taskDurationMs": 3994.587,
"heapDeltaBytes": -49065224,
"heapUsedBytes": 191634740,
"domNodes": -8062,
"jsHeapTotalBytes": 5611520,
"scriptDurationMs": 62.66199999999999,
"eventListeners": -14928,
"totalBlockingTimeMs": 5,
"frameDurationMs": 17.223333333333297,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-node-resize-workload",
"durationMs": 4437.126000000035,
"styleRecalcs": 20,
"styleRecalcDurationMs": 53.317,
"layouts": 20,
"layoutDurationMs": 25.118000000000002,
"taskDurationMs": 4415.393,
"heapDeltaBytes": -42933300,
"heapUsedBytes": 183447996,
"domNodes": -8062,
"jsHeapTotalBytes": 14409728,
"scriptDurationMs": 70.588,
"eventListeners": -14928,
"totalBlockingTimeMs": 93,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5738.070999999991,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5475.1449999999995,
"heapDeltaBytes": -699472,
"heapUsedBytes": 172253908,
"domNodes": 0,
"jsHeapTotalBytes": -35389440,
"scriptDurationMs": 72.45399999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5967.46799999994,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5898.317000000001,
"heapDeltaBytes": 19457620,
"heapUsedBytes": 190128876,
"domNodes": 0,
"jsHeapTotalBytes": -19136512,
"scriptDurationMs": 84.22999999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 421.81599999997843,
"styleRecalcs": 15,
"styleRecalcDurationMs": 15.033999999999999,
"layouts": 3,
"layoutDurationMs": 0.738,
"taskDurationMs": 80.32400000000001,
"heapDeltaBytes": 4832336,
"heapUsedBytes": 71039312,
"domNodes": 124,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.372999999999999,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 439.99200000007477,
"styleRecalcs": 16,
"styleRecalcDurationMs": 22.101000000000003,
"layouts": 5,
"layoutDurationMs": 1.9060000000000001,
"taskDurationMs": 97.71800000000002,
"heapDeltaBytes": 4986572,
"heapUsedBytes": 71598516,
"domNodes": 148,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 8.084999999999999,
"eventListeners": 81,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md |
This comment has been minimized.
This comment has been minimized.
Playwright videos for new testsDownload the recorded videos and HTML report Recorded projects: chromium Recorded test titles:
|
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## core/1.55 #19959 +/- ##
=============================================
+ Coverage 84.71% 84.72% +0.01%
=============================================
Files 2318 2323 +5
Lines 132286 132467 +181
Branches 35337 33527 -1810
=============================================
+ Hits 112065 112232 +167
- Misses 19861 19875 +14
Partials 360 360
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 10 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 3 |
| 🟡 Medium | 6 |
| 🟢 Low | 1 |
Panel: 6/8 reviewers contributed findings.
Reviewers that did not contribute: kimi-k3-max:adversarial (error), kimi-k3-max:edge-case (error)
| const savedHeight = element.height | ||
| let cssRect: DOMRect | ||
| try { | ||
| element.width = 0 |
There was a problem hiding this comment.
🟠 High — Writing element.width/height to probe the CSS size resets the 2D context, including its DPR transform, but applyViewport only re-applies scale(dpr, dpr) when the physical size or DPR changed. Any measurement that lands on the same backing size — a sub-pixel CSS resize, or an intrinsically sized canvas where cssRect.width falls back to previousViewport.cssWidth — therefore leaves the foreground context at identity, so the graph renders at 1/dpr and hit-testing is offset until the next real size change. Restore the saved transform after the probe, or unconditionally setTransform(dpr, 0, 0, dpr, 0, 0) in applyViewport. Raised by 5 of 8 reviewers (gemini-3.1-pro adversarial, gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max edge-case, claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Fixed in commit 98d8966 (restores DPR scaling after destructive viewport measurement).
| try { | ||
| // @ts-expect-error Discrepancies between zod and litegraph - in progress | ||
| this.rootGraph.configure(graphData) | ||
| if (loadId < this.committedGraphLoadSequence) { |
There was a problem hiding this comment.
🟠 High — This supersession check runs only after clean()/rootGraph.clear(), canvas.setGraph() and the store resets have already executed, so an older load parked in await invokeExtensionsAsync('beforeLoadGraph') resumes, wipes the graph the newer load just configured, and only then returns undefined — leaving the winning workflow active over an empty canvas with a live change tracker that can persist the empty state. Test loadId < committedGraphLoadSequence before the first destructive step, not just before configure(). Raised by 3 of 8 reviewers (gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case).
There was a problem hiding this comment.
Fixed in commit 97141a2 (checks supersession before destructive graph cleanup).
| } | ||
|
|
||
| if (canvasVisible) fitView() | ||
| this.committedGraphLoadSequence = Math.max( |
There was a problem hiding this comment.
🟠 High — Committing here is the only ownership gate, and the rest of the lifecycle (forEachNode(setSize), afterConfigureGraph, afterLoadNewGraph, the asset/resource scans) awaits without re-checking it. An older load that passed the gate can resume after a newer load commits and run afterLoadNewGraph with its own workflow but this.rootGraph.serialize() from the newer graph, reactivating stale workflow, warning, and output state over the winning graph. Re-test ownership after each await that precedes a graph-mutating or workflow-binding step. Raised by 2 of 8 reviewers (gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case).
There was a problem hiding this comment.
Fixed in commit 121024c (rechecks load ownership after awaited lifecycle work).
| } | ||
|
|
||
| if (this.canvas.width == width && this.canvas.height == height) return | ||
| if (usesParentSize) { |
There was a problem hiding this comment.
🟡 Medium — CSS sizing is applied only in the parent-fallback branch, so a legacy resize(800, 600) call now writes a 1600x1200 backing store at DPR 2 with no CSS size: the element lays out at its intrinsic 1600x1200 while DragAndScale caches an 800x600 viewport, doubling the rendered canvas and desyncing pointer coordinates. The old code sized both canvases in CSS pixels, so this is a regression for the explicit-dimension path that extensions still use — apply the CSS size there too. Raised by 2 of 8 reviewers (gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case).
There was a problem hiding this comment.
Fixed in commit ef9b480 (preserves explicit CSS sizing semantics).
| const { style } = canvas | ||
| const previousStyle = autoSizedStyleByCanvas.get(canvas) ?? {} | ||
| const nextStyle: { width?: string; height?: string } = {} | ||
| if (!style.width || style.width === previousStyle.width) { |
There was a problem hiding this comment.
🟡 Medium — style.width only reflects inline styles, so a canvas sized by a class — #graph-canvas uses absolute inset-0 size-full — is misclassified as unsized and gets pinned to inline px by the first resize() (autoresize via processMouseMove, or an extension calling app.canvas.resize()), after which it stops tracking its container and stops generating resize notifications. If the parent has no layout at that moment the canvas is pinned to 0px x 0px, and because it was already 0x0 the ResizeObserver never fires to recover it. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Fixed in commit ef9b480 (does not pin class-sized canvases with inline dimensions).
| } | ||
|
|
||
| getViewportSize(): [number, number] { | ||
| if (this.viewportSize) return this.viewportSize |
There was a problem hiding this comment.
🟡 Medium — [0, 0] is truthy, so once a hidden canvas applies a 0x0 viewport the getBoundingClientRect/backing-store fallbacks below become unreachable and every camera call silently no-ops (both fitToBounds and animateToBounds now early-return on a non-positive size) until the next applyViewport — including the window between the canvas becoming visible and the ResizeObserver firing. The cache is also never invalidated when setCanvas() replaces ds.element, and it is handed out by reference so any caller that writes to it rewrites the cached viewport for every consumer. Raised by 3 of 8 reviewers (gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Fixed in commit ba94db0 (refreshes zero-sized cached viewports, invalidates on canvas replacement, and returns copies).
| const [width, height] = canvas.ds.getViewportSize() | ||
| const coveredWidth = panel.isVisible ? panel.width : 0 | ||
| return [0, 0, Math.max(width - coveredWidth, 0), height] | ||
| } |
There was a problem hiding this comment.
🟡 Medium — This clamps the width to 0 whenever the docked agent panel is at least as wide as the canvas (narrow window with the panel open, or maximized — the panel is clamped to PANEL_MIN_WIDTH, not to the canvas width), and fitToBounds's new !(vw > 0) guard then turns Fit View, template framing, and the post-load camera fallback into silent no-ops where they previously fit against the whole canvas. Fall back to the full canvas rect when the uncovered region is empty. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Fixed in commit ba94db0 (falls back to the full canvas when the panel leaves no uncovered width).
| useLitegraphService().fitView() | ||
| canvasScheduler.schedule({ | ||
| key: 'subgraph-navigation-fit', | ||
| isCurrent: () => getActiveGraphId() === graphId, |
There was a problem hiding this comment.
🟡 Medium — isCurrent only compares the active graph id, and the cache-hit path above restores a cached viewport without cancelling subgraph-navigation-fit, so navigating A→B→A while the canvas is hidden makes A's stale first-visit operation current again and revealing the canvas runs fitView() over the viewport that was just restored from cache. Cancel the key on the cache-hit path, or key the operation to the visit rather than the graph. Raised by 2 of 8 reviewers (gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case).
There was a problem hiding this comment.
Fixed in commit ba94db0 (cancels a deferred first-visit fit when restoring a cached viewport).
| 'AbortError' | ||
| ) | ||
| ) | ||
| return undefined |
There was a problem hiding this comment.
🟡 Medium — This early return undefined unwinds through the shared finally, which clears the global ChangeTracker.isLoadingGraph and calls retireResolvedMissingNodePromptError() even though the newer load has only passed configure() and still has afterConfigureGraph, afterLoadNewGraph and the asset scans ahead of it. The flag is a single boolean with no nesting count, so releasing it here re-enables captureCanvasState/squashState inside the newer load's window — the case changeTracker.ts documents as corrupting the previous workflow's activeState. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Fixed in commit 078588b (keeps superseded outcomes from releasing shared load state incorrectly).
| appliedViewportByCanvas.set(fg, viewport) | ||
| appliedViewportByCanvas.set(bg, viewport) | ||
| if (consumer) { | ||
| consumer.dpr = viewport.dpr |
There was a problem hiding this comment.
🟢 Low — Assigning consumer.dpr directly bypasses whatever recomputes LGraphCanvas._lowQualityZoomThreshold, which now derives from Math.sqrt(this.dpr), so moving the window to a display with a different DPR (or changing browser zoom) leaves the low-quality/LOD cutoff computed from the old ratio until an unrelated path such as the font-size setting recalculates it. Raised by 2 of 8 reviewers (gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case).
There was a problem hiding this comment.
Fixed in commit ba94db0 (recomputes the LOD threshold whenever the applied DPR changes).
|
Source-first gate result at exact head I independently traced all 10 currently unresolved panel findings. Each is a real defect in merged source #11420, not a
Canonical source-first dependency: #19971, owned by @christian-byrne and labeled The target-aware gate also currently refuses independently: the carrier merge-base is Wake condition: merge and backport #19971, rebuild/update this carrier under an exact lease, obtain exact-head regression proof, retire all substantive threads honestly, and rerun |
🔧 Auto-fixes AppliedThis PR has been automatically updated to fix linting and formatting issues.
Changes made:
|
There was a problem hiding this comment.
Verdict: Request changes. Apart from one dropped browser assertion, the #11420 carry is faithful, but the branch also carries about 400 lines of fixes from the unmerged #19976.
I compared against #11420's merge commit 33095f79ee5b438021e7e9d5509d5590b9229355. I checked the cherry-pick (3957632) together with the test adaptation commit (5eb5832) file by file against the source. Most files carry identical hunks. These differences are accounted for by the target:
useCanvasScheduler.tsand its test omitsurface: 'graph', becauseReportErrorOptionsoncore/1.55has nosurface.app.test.tsreplacesvi.when(...)withmockImplementation. The Vitest shipped oncore/1.55has novi.when.app.tsusesgraphData as ISerialisedGraphwhere the source just drops the@ts-expect-error, because the zod/litegraph mismatch thatmainalready resolved is still present on this branch.litegraphService.test.ts,subgraphNavigationStore.viewport.test.ts,litegraphTestUtils.ts,vitest.setup.ts,canvasHarness.ts,useSelectionToolboxPosition.test.ts,useGroupContextMenu.test.tsandLGraphCanvas.selection.test.tsresolve conflicts against the release branch's test scaffolding while keeping the source's intent.useTemplateWorkflows.test.tsdrops "does not count a template whose graph load was superseded". That test exercises the template-usage survey tracker, whichcore/1.55does not have. The productionnot-startedearly return and the other source test are both carried.
Two things diverge without a reason the target needs:
- 5eb5832 removes the source's
nodePreviewBodylocator and selector, and the threenodePreviewBodyassertions inblueprintDynamicCombo.spec.ts. Thenode-preview-bodytest id that the source adds toLGraphNodePreview.vueis carried, so I don't see what oncore/1.55prevents those assertions. If they fail on this branch, please say what is missing. Otherwise please restore them. - The 11 commits from 97141a2 through 5d02045 change
app.ts,changeTracker.ts,queueStore.ts,useCanvasScheduler.ts,canvasViewport.ts,LGraphCanvas.ts,DragAndScale.ts,visibleCanvasViewport.tsandsubgraphNavigationStore.ts, plus their tests, by roughly +395/-62. They answer automated review findings against #11420 itself. Your own hold note says the canonical fix is #19976, which is still open onmain. These commits should come out of this PR and arrive as a backport of #19976 once it merges. Otherwisecore/1.55would carry fixes thatmaindoes not have, and those fixes have not been reviewed onmain.
CI at 5d02045 is green (lint-and-format, test, e2e-status, typecheck). My objection is scope, not test results. I have commented inline where each extra change starts.
5d02045 to
e809068
Compare
There was a problem hiding this comment.
Verdict: Approve. At 1e461c2 this is a faithful backport of #11420, and every difference is explained by something core/1.55 lacks.
I compared against #11420's merge commit 33095f79ee5b438021e7e9d5509d5590b9229355, file by file. The #19976 follow-up series is no longer on the branch. Every file not listed below carries identical hunks.
Adaptations, each accounted for by something missing on core/1.55:
useCanvasScheduler.tsand its test omitsurface: 'graph', becauseReportErrorOptionson this branch has nosurfacefield.app.test.tsusesmockImplementationin place ofvi.when(...), which the Vitest on this branch does not provide.app.tspassesgraphData as ISerialisedGraphwhere the source just drops the@ts-expect-error, because the zod/litegraph schema mismatch already resolved onmainis still present here.canvasHarness.tsdoes not exist oncore/1.55, so the source's switch tocanvasTestUtilslands in the inline harness inLGraphCanvas.selection.test.ts.useSelectionToolboxPosition.test.tsanduseGroupContextMenu.test.tsdo not import the mock helper on this branch, so they need no import change.litegraphService.test.ts,subgraphNavigationStore.viewport.test.ts,litegraphTestUtils.tsandvitest.setup.tsresolve conflicts against the release branch's own test scaffolding (theReflect.setapp stubs, localmockFitView/mockSetDirty, theselectionChangedstate, the named testing pinia). The source's assertions are kept.useTemplateWorkflows.test.tsomits "does not count a template whose graph load was superseded", which needs the template-usage survey tracker that this branch does not have. The productionnot-startedreturn and the other source test are carried.blueprintDynamicCombo.spec.ts,SidebarTab.tsandselectors.tsleave out the source'snodePreviewBodyassertions. In my previous review I asked for them to be restored, and that was wrong. The hosted Chromium run at e809068 showed they cannot pass here: the preview body only rendersboundary_modelas a combobox through theCOMFY_DYNAMICCOMBO_V3handling that #15142 added toLGraphNodePreview.vue, and #15142 is not oncore/1.55. The source's test id changes inLGraphNodePreview.vueandNodePreviewCard.vue, and itsnodePreviewInputsassertion, are carried.
Checks: all 63 touched Vitest files pass locally on this content (1529 passed, 7 expected failures, 1 skipped). vue-tsc --noEmit and pnpm typecheck:browser pass. Hosted CI at 1e461c2 is green, including lint-and-format, test, e2e-status and typecheck.
Backports PR #11420 to
core/1.55after the automatic cherry-pick conflicted with release-branch test infrastructure.Conflict resolution preserves the release branch's selection-store and workflow-test differences, adopts the shared canvas fixtures, and adapts telemetry and Vitest APIs to the versions shipped on this branch.
Validation: