Repository navigation
refactor(canvas): centralize viewport lifecycle and framing - #11420
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a shared ChangesCanvas viewport and scheduling
Hardware option formatting
Estimated code review effort: 3 (Moderate) | ~30 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant ComfyApp
participant CanvasScheduler
participant CanvasViewport
participant GraphCanvas
ComfyApp->>CanvasScheduler: schedule resizeCanvas and fitView
CanvasScheduler->>CanvasViewport: apply measured viewport
CanvasScheduler->>GraphCanvas: execute queued viewport operations
GraphCanvas-->>ComfyApp: render synchronized canvas dimensions
Merge Risk: 🟠 High · up to At the current head, canvas changes can still leave viewport updates unapplied after a 0x0 measurement, produce corrupted viewport dimensions, or leave background rendering stale; caught failures also reduce diagnosability. The PR should not merge until these correctness and reporting issues are addressed. 🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 15 files. (3 skipped: 3 unsupported.) ✨ Finishing Touches 💡 2📝 Generate docstrings 💡
⚔️ Resolve merge conflicts 💡
🧪 Generate unit tests (beta)
Comment |
📦 Bundle: 5.26 MB gzip 🔴 +941 BDetailsSummary
Category Glance App Entry Points — 22.7 kB (baseline 22.6 kB) • 🔴 +74 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.24 MB (baseline 1.24 MB) • 🔴 +2 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 81.8 kB (baseline 81.8 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 2 unchanged Panels & Settings — 489 kB (baseline 489 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 11 unchanged User & Accounts — 17.5 kB (baseline 17.5 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed / 2 unchanged Editors & Dialogs — 112 kB (baseline 112 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 4 added / 4 removed UI Components — 62.9 kB (baseline 62.9 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 9 unchanged Data & Services — 3.04 MB (baseline 3.04 MB) • 🔴 +3.13 kBStores, services, APIs, and repositories
Status: 13 added / 13 removed / 4 unchanged Utilities & Hooks — 365 kB (baseline 365 kB) • 🔴 +1 BHelpers, composables, and utility bundles
Status: 13 added / 13 removed / 18 unchanged Vendor & Third-Party — 9.94 MB (baseline 9.94 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 8.84 MB (baseline 8.84 MB) • 🔴 +2 BBundles that do not match a named category
Status: 57 added / 57 removed / 78 unchanged ⚡ Performance Report
No regressions detected. All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-05-02T06:37:33.461Z",
"gitSha": "5055f5958e03d06595502cce0794b1aedee4010f",
"branch": "glary/fix-app-mode-template-viewport",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2066.9560000000047,
"styleRecalcs": 8,
"styleRecalcDurationMs": 9.751000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 357.832,
"heapDeltaBytes": 23661436,
"heapUsedBytes": 73735148,
"domNodes": 16,
"jsHeapTotalBytes": 14680064,
"scriptDurationMs": 16.755000000000003,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2017.7429999999958,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.6309999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 347.569,
"heapDeltaBytes": 22704576,
"heapUsedBytes": 71335152,
"domNodes": 16,
"jsHeapTotalBytes": 14155776,
"scriptDurationMs": 15.290000000000004,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2010.8089999999947,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.452,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 339.397,
"heapDeltaBytes": 22980764,
"heapUsedBytes": 72050820,
"domNodes": 16,
"jsHeapTotalBytes": 14417920,
"scriptDurationMs": 14.447999999999995,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1943.2170000000042,
"styleRecalcs": 77,
"styleRecalcDurationMs": 42.241,
"layouts": 12,
"layoutDurationMs": 3.707,
"taskDurationMs": 805.639,
"heapDeltaBytes": 18251516,
"heapUsedBytes": 68225476,
"domNodes": 60,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 130.275,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1832.4559999999792,
"styleRecalcs": 74,
"styleRecalcDurationMs": 43.256,
"layouts": 12,
"layoutDurationMs": 3.679,
"taskDurationMs": 771.793,
"heapDeltaBytes": 4550916,
"heapUsedBytes": 53511796,
"domNodes": -265,
"jsHeapTotalBytes": 16642048,
"scriptDurationMs": 118.456,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1798.6760000000004,
"styleRecalcs": 75,
"styleRecalcDurationMs": 40.728,
"layouts": 12,
"layoutDurationMs": 3.3759999999999994,
"taskDurationMs": 787.985,
"heapDeltaBytes": 7537520,
"heapUsedBytes": 56412096,
"domNodes": -260,
"jsHeapTotalBytes": 15593472,
"scriptDurationMs": 127.62499999999999,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1736.0709999999813,
"styleRecalcs": 31,
"styleRecalcDurationMs": 17.407999999999998,
"layouts": 6,
"layoutDurationMs": 0.57,
"taskDurationMs": 295.574,
"heapDeltaBytes": 528664,
"heapUsedBytes": 49119992,
"domNodes": 78,
"jsHeapTotalBytes": 14417920,
"scriptDurationMs": 23.451,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1719.0349999999626,
"styleRecalcs": 30,
"styleRecalcDurationMs": 15.748999999999999,
"layouts": 6,
"layoutDurationMs": 0.5630000000000002,
"taskDurationMs": 284.19899999999996,
"heapDeltaBytes": 130592,
"heapUsedBytes": 48903228,
"domNodes": 76,
"jsHeapTotalBytes": 14155776,
"scriptDurationMs": 17.48299999999999,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1731.806000000006,
"styleRecalcs": 31,
"styleRecalcDurationMs": 17.146,
"layouts": 6,
"layoutDurationMs": 0.6439999999999998,
"taskDurationMs": 293.603,
"heapDeltaBytes": 518280,
"heapUsedBytes": 48848136,
"domNodes": 77,
"jsHeapTotalBytes": 14680064,
"scriptDurationMs": 24.549999999999997,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 520.6640000000107,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.684999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 327.738,
"heapDeltaBytes": 9770820,
"heapUsedBytes": 58567408,
"domNodes": 20,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 59.379,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 556.2120000000164,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.412000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 334.916,
"heapDeltaBytes": 9442600,
"heapUsedBytes": 59022040,
"domNodes": 18,
"jsHeapTotalBytes": 14680064,
"scriptDurationMs": 61.421,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 522.6159999999709,
"styleRecalcs": 12,
"styleRecalcDurationMs": 7.967999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 319.402,
"heapDeltaBytes": 9437748,
"heapUsedBytes": 59024724,
"domNodes": 19,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 57.187000000000005,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2057.3739999999816,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.438,
"layouts": 1,
"layoutDurationMs": 0.24900000000000008,
"taskDurationMs": 565.6110000000001,
"heapDeltaBytes": 13367136,
"heapUsedBytes": 70962932,
"domNodes": -260,
"jsHeapTotalBytes": -233472,
"scriptDurationMs": 101.872,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2013.463999999999,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.224999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 527.6019999999999,
"heapDeltaBytes": 8075440,
"heapUsedBytes": 67072012,
"domNodes": -263,
"jsHeapTotalBytes": 552960,
"scriptDurationMs": 91.95500000000001,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2028.7600000000339,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.730000000000002,
"layouts": 1,
"layoutDurationMs": 0.18899999999999995,
"taskDurationMs": 546.477,
"heapDeltaBytes": 8213960,
"heapUsedBytes": 66878144,
"domNodes": -260,
"jsHeapTotalBytes": 3493888,
"scriptDurationMs": 96.94,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2126.8699999999967,
"styleRecalcs": 69,
"styleRecalcDurationMs": 17.894,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1108.781,
"heapDeltaBytes": 9333316,
"heapUsedBytes": 70191688,
"domNodes": -263,
"jsHeapTotalBytes": 757760,
"scriptDurationMs": 427.499,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2114.1939999999977,
"styleRecalcs": 67,
"styleRecalcDurationMs": 16.158,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1053.291,
"heapDeltaBytes": -2462656,
"heapUsedBytes": 58610448,
"domNodes": -268,
"jsHeapTotalBytes": 1282048,
"scriptDurationMs": 400.78400000000005,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2111.223999999993,
"styleRecalcs": 68,
"styleRecalcDurationMs": 16.257,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1037.725,
"heapDeltaBytes": 8535972,
"heapUsedBytes": 69124736,
"domNodes": -261,
"jsHeapTotalBytes": 233472,
"scriptDurationMs": 384.653,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3117.525999999998,
"styleRecalcs": 63,
"styleRecalcDurationMs": 15.885,
"layouts": 60,
"layoutDurationMs": 6.961,
"taskDurationMs": 1294.9709999999998,
"heapDeltaBytes": -9795672,
"heapUsedBytes": 53640912,
"domNodes": -272,
"jsHeapTotalBytes": 4804608,
"scriptDurationMs": 486.98,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3132.930999999985,
"styleRecalcs": 66,
"styleRecalcDurationMs": 18.546,
"layouts": 60,
"layoutDurationMs": 7.2219999999999995,
"taskDurationMs": 1275.459,
"heapDeltaBytes": 6914236,
"heapUsedBytes": 69191660,
"domNodes": -268,
"jsHeapTotalBytes": 4747264,
"scriptDurationMs": 482.7420000000001,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3067.7819999999656,
"styleRecalcs": 62,
"styleRecalcDurationMs": 14.523999999999996,
"layouts": 60,
"layoutDurationMs": 7.438000000000001,
"taskDurationMs": 1264.781,
"heapDeltaBytes": -5139872,
"heapUsedBytes": 56988716,
"domNodes": -273,
"jsHeapTotalBytes": -233472,
"scriptDurationMs": 478.41700000000003,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2016.6619999999966,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.771,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 484.1909999999999,
"heapDeltaBytes": -13404396,
"heapUsedBytes": 55147808,
"domNodes": 16,
"jsHeapTotalBytes": 11153408,
"scriptDurationMs": 88.133,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2027.2360000000162,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.660999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 520.7029999999999,
"heapDeltaBytes": 5381020,
"heapUsedBytes": 67473488,
"domNodes": -264,
"jsHeapTotalBytes": -200704,
"scriptDurationMs": 91.92399999999999,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2016.935999999987,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.608,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 511.6160000000001,
"heapDeltaBytes": 6847596,
"heapUsedBytes": 65953128,
"domNodes": -267,
"jsHeapTotalBytes": 4485120,
"scriptDurationMs": 86.72099999999999,
"eventListeners": -159,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 524.8010000000249,
"styleRecalcs": 48,
"styleRecalcDurationMs": 11.833000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 346.2759999999999,
"heapDeltaBytes": 8853128,
"heapUsedBytes": 57783360,
"domNodes": 22,
"jsHeapTotalBytes": 15990784,
"scriptDurationMs": 116.76000000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 538.3540000000266,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.945000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 347.411,
"heapDeltaBytes": 8831460,
"heapUsedBytes": 57497684,
"domNodes": 20,
"jsHeapTotalBytes": 16252928,
"scriptDurationMs": 118.07100000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 523.0799999999363,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.095,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 333.501,
"heapDeltaBytes": 9462516,
"heapUsedBytes": 58070568,
"domNodes": 20,
"jsHeapTotalBytes": 15990784,
"scriptDurationMs": 112.28099999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1989.0659999999798,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.234999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 330.538,
"heapDeltaBytes": 23168524,
"heapUsedBytes": 73207936,
"domNodes": 20,
"jsHeapTotalBytes": 14680064,
"scriptDurationMs": 13.994000000000007,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1989.2429999999877,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.583,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 333.383,
"heapDeltaBytes": 22984864,
"heapUsedBytes": 71612496,
"domNodes": 20,
"jsHeapTotalBytes": 14942208,
"scriptDurationMs": 12.991999999999997,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2007.5520000000324,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.196,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 336.22299999999996,
"heapDeltaBytes": 22602776,
"heapUsedBytes": 71928460,
"domNodes": 20,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 16.341,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1683.1849999999804,
"styleRecalcs": 77,
"styleRecalcDurationMs": 35.821000000000005,
"layouts": 16,
"layoutDurationMs": 4.191,
"taskDurationMs": 651.036,
"heapDeltaBytes": 14749568,
"heapUsedBytes": 63044280,
"domNodes": 64,
"jsHeapTotalBytes": 15466496,
"scriptDurationMs": 91.85799999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1770.1790000000415,
"styleRecalcs": 79,
"styleRecalcDurationMs": 38.343,
"layouts": 16,
"layoutDurationMs": 4.261,
"taskDurationMs": 698.039,
"heapDeltaBytes": -5888460,
"heapUsedBytes": 43186760,
"domNodes": 62,
"jsHeapTotalBytes": 15331328,
"scriptDurationMs": 90.207,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1696.3640000000169,
"styleRecalcs": 78,
"styleRecalcDurationMs": 35.996,
"layouts": 16,
"layoutDurationMs": 3.945,
"taskDurationMs": 671.4579999999999,
"heapDeltaBytes": -4700016,
"heapUsedBytes": 44321408,
"domNodes": -259,
"jsHeapTotalBytes": 14282752,
"scriptDurationMs": 88.20899999999999,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8181.946000000039,
"styleRecalcs": 250,
"styleRecalcDurationMs": 57.792,
"layouts": 1,
"layoutDurationMs": 0.1780000000000002,
"taskDurationMs": 3652.9650000000006,
"heapDeltaBytes": 25207056,
"heapUsedBytes": 82555420,
"domNodes": -254,
"jsHeapTotalBytes": 2068480,
"scriptDurationMs": 1277.3080000000002,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8141.805999999974,
"styleRecalcs": 249,
"styleRecalcDurationMs": 50.73,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3711.648,
"heapDeltaBytes": 14042988,
"heapUsedBytes": 73840596,
"domNodes": -266,
"jsHeapTotalBytes": 5214208,
"scriptDurationMs": 1355.3899999999999,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8151.892999999973,
"styleRecalcs": 250,
"styleRecalcDurationMs": 50.75,
"layouts": 1,
"layoutDurationMs": 0.1870000000000001,
"taskDurationMs": 3696.574,
"heapDeltaBytes": 13941912,
"heapUsedBytes": 72958116,
"domNodes": -263,
"jsHeapTotalBytes": 8359936,
"scriptDurationMs": 1315.2220000000002,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-large-graph-idle",
"durationMs": 11286.886999999979,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11275.887,
"heapDeltaBytes": -28613592,
"heapUsedBytes": 172506128,
"domNodes": -8316,
"jsHeapTotalBytes": 26013696,
"scriptDurationMs": 630.435,
"eventListeners": -16466,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 11303.767999999991,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11255.565999999999,
"heapDeltaBytes": -54453240,
"heapUsedBytes": 150440008,
"domNodes": -8322,
"jsHeapTotalBytes": 15265792,
"scriptDurationMs": 574.793,
"eventListeners": -16464,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 11827.62200000002,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11814.927,
"heapDeltaBytes": -24231548,
"heapUsedBytes": 172632136,
"domNodes": -8315,
"jsHeapTotalBytes": -7016448,
"scriptDurationMs": 598.466,
"eventListeners": -16462,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14092.077000000018,
"styleRecalcs": 67,
"styleRecalcDurationMs": 15.973000000000015,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14072.611000000003,
"heapDeltaBytes": -62611632,
"heapUsedBytes": 153453616,
"domNodes": -8318,
"jsHeapTotalBytes": -2297856,
"scriptDurationMs": 861.169,
"eventListeners": -16488,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14254.90400000001,
"styleRecalcs": 67,
"styleRecalcDurationMs": 16.025000000000013,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14235.833,
"heapDeltaBytes": -45975640,
"heapUsedBytes": 153485876,
"domNodes": -8315,
"jsHeapTotalBytes": -2035712,
"scriptDurationMs": 914.644,
"eventListeners": -16488,
"totalBlockingTimeMs": 31,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14470.55899999998,
"styleRecalcs": 66,
"styleRecalcDurationMs": 16.959999999999976,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14450.747000000001,
"heapDeltaBytes": -54094164,
"heapUsedBytes": 154089760,
"domNodes": -8317,
"jsHeapTotalBytes": -2560000,
"scriptDurationMs": 908.1080000000001,
"eventListeners": -16490,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 504.1029999999864,
"styleRecalcs": 15,
"styleRecalcDurationMs": 20.635000000000005,
"layouts": 5,
"layoutDurationMs": 1.3820000000000001,
"taskDurationMs": 140.4,
"heapDeltaBytes": 5254160,
"heapUsedBytes": 55467816,
"domNodes": 164,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 22.95,
"eventListeners": 69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 453.1570000000329,
"styleRecalcs": 19,
"styleRecalcDurationMs": 22.793,
"layouts": 5,
"layoutDurationMs": 1.312,
"taskDurationMs": 123.13499999999999,
"heapDeltaBytes": 5096616,
"heapUsedBytes": 55076432,
"domNodes": 161,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 24.755000000000003,
"eventListeners": 69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 128.44799999993484,
"styleRecalcs": 13,
"styleRecalcDurationMs": 19.086,
"layouts": 5,
"layoutDurationMs": 1.452,
"taskDurationMs": 102.20599999999996,
"heapDeltaBytes": 3460976,
"heapUsedBytes": 53250336,
"domNodes": 149,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 20.894000000000002,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
}
]
}🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 2188 passed, 0 failed📊 Browser Reports
📦 Bundle: 10.1 MB gzip 🔴 +2.05 kBDetailsSummary
Category Glance App Entry Points — 3.89 kB (baseline 3.89 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.47 MB (baseline 1.47 MB) • 🟢 -21 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 135 kB (baseline 135 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 14 added / 14 removed / 4 unchanged Panels & Settings — 646 kB (baseline 646 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 18 unchanged User & Accounts — 53.6 kB (baseline 53.6 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 7 added / 7 removed / 8 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 184 kB (baseline 184 kB) • ⚪ 0 BReusable component library chunks
Status: 8 added / 8 removed / 10 unchanged Data & Services — 4.14 MB (baseline 4.13 MB) • 🔴 +7.6 kBStores, services, APIs, and repositories
Status: 11 added / 11 removed / 3 unchanged Utilities & Hooks — 586 kB (baseline 586 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 20 added / 20 removed / 18 unchanged Vendor & Third-Party — 17.2 MB (baseline 17.2 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 18.3 MB (baseline 18.3 MB) • 🟢 -2 BBundles that do not match a named category
Status: 76 added / 76 removed / 229 unchanged ⚡ Performance
🌾 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 b365e2a8478c5d9cc790d620d88a50a2277ae456
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 #11420 +/- ##
==========================================
+ Coverage 84.76% 85.50% +0.73%
==========================================
Files 3422 2406 -1016
Lines 164067 137381 -26686
Branches 44745 36879 -7866
==========================================
- Hits 139073 117461 -21612
+ Misses 23046 19552 -3494
+ Partials 1948 368 -1580
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1027 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/composables/__tests__/useCanvasScheduler.test.ts`:
- Around line 39-58: Move the reactive storeState into the same vi.hoisted()
block as testState and ensure any existing scheduler effectScope is stopped
before resetting modules: hoist storeState so tests mutate testState.storeState,
and in beforeEach dispose the live scope returned by useCanvasScheduler (e.g.,
call scheduler.effectScope.stop() or storedScheduler?.effectScope.stop()) before
calling vi.resetModules() to prevent stale watchers from surviving between
tests.
In `@src/composables/useCanvasScheduler.ts`:
- Around line 32-35: isCanvasReady currently only checks DOM presence via
offsetParent; update it to also verify the canvas actually has non-zero rendered
dimensions before returning true. In the isCanvasReady() function
(useCanvasScheduler.ts) after obtaining canvasStore.canvas?.canvas, check its
offsetWidth/offsetHeight or clientWidth/clientHeight (or getBoundingClientRect
width/height) and return false if either dimension is 0 so that callers like
fitView() / DragAndScale.fitToBounds() will retry when the canvas is properly
sized.
In `@src/scripts/app.ts`:
- Around line 1347-1350: The call to fitView() currently schedules a raw
requestAnimationFrame() outside the canvasScheduler which can run after a new
loadGraphData() and operate on the wrong graph; update fitView() so that any RAF
work is submitted through canvasScheduler.schedule() (or, alternatively, add a
load-token check inside the RAF callback and in loadGraphData() generate/advance
the token) so that either (a) all fitView animation frames are owned by
canvasScheduler.schedule(...) or (b) the RAF callback verifies the current load
token before mutating state; locate fitView(), canvasScheduler.schedule(...)
calls, and loadGraphData() to implement the chosen fix.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9dbe4e40-2bf3-49ad-8bb5-59626765bf99
📒 Files selected for processing (7)
src/composables/__tests__/useCanvasScheduler.test.tssrc/composables/useCanvasScheduler.tssrc/lib/litegraph/src/DragAndScale.tssrc/lib/litegraph/src/__tests__/DragAndScale.fitToBounds.test.tssrc/scripts/app.tssrc/stores/subgraphNavigationStore.tssrc/stores/subgraphNavigationStore.viewport.test.ts
9f6b2a6 to
0fdc08d
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/composables/useCanvasScheduler.ts (2)
22-27: DetachedeffectScopeis never stopped—consider HMR/test cleanup.The scope created with
effectScope(true)is detached and never disposed. While intentional for a long-lived singleton, this causes watcher leaks during hot module reloading or test isolation where modules are re-evaluated. If this becomes problematic, expose adispose()method that callsscope.stop()and resets the singleton.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/composables/useCanvasScheduler.ts` around lines 22 - 27, The singleton created in useCanvasScheduler uses a detached effectScope (scope = effectScope(true)) that is never stopped; add a disposal API to avoid watcher leaks by exposing a dispose method on the returned CanvasScheduler (or exported helper) that calls scope.stop() and resets instance to undefined so the singleton can be re-created; modify the code that constructs instance (inside useCanvasScheduler) to attach a dispose() that invokes scope.stop() and clears instance, and ensure any tests or HMR cleanup can call that dispose().
50-53: Queued ops may stall if canvas becomes ready outsidelinearModetransitions.
schedule()only requests a flush ifisCanvasReady()returns true at enqueue time. If the canvas later becomes ready without alinearModechange (e.g., element resized or parent shown), queued ops remain stuck until the nextschedule()call or alinearModetransition.For the current use-case (app-mode template loading), this is likely fine since canvas visibility changes coincide with
linearMode. If broader use is expected, consider adding aResizeObserverorIntersectionObserverto triggerrequestFlush()when the canvas becomes visible/sized.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/composables/useCanvasScheduler.ts` around lines 50 - 53, schedule(op: CanvasOp) only calls requestFlush() at enqueue time, so queued ops can stall if the canvas becomes ready later; update the composable to watch the canvas element and trigger requestFlush() when it becomes ready by adding a ResizeObserver or IntersectionObserver (or window 'resize'/'visibilitychange' fallback) that checks isCanvasReady() and queue.length > 0 and calls requestFlush(), reference the schedule(), isCanvasReady(), requestFlush(), and queue variables to locate the logic, and ensure the observer is created when the canvas element is available and properly disconnected/cleaned up in the composable teardown.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/composables/useCanvasScheduler.ts`:
- Around line 22-27: The singleton created in useCanvasScheduler uses a detached
effectScope (scope = effectScope(true)) that is never stopped; add a disposal
API to avoid watcher leaks by exposing a dispose method on the returned
CanvasScheduler (or exported helper) that calls scope.stop() and resets instance
to undefined so the singleton can be re-created; modify the code that constructs
instance (inside useCanvasScheduler) to attach a dispose() that invokes
scope.stop() and clears instance, and ensure any tests or HMR cleanup can call
that dispose().
- Around line 50-53: schedule(op: CanvasOp) only calls requestFlush() at enqueue
time, so queued ops can stall if the canvas becomes ready later; update the
composable to watch the canvas element and trigger requestFlush() when it
becomes ready by adding a ResizeObserver or IntersectionObserver (or window
'resize'/'visibilitychange' fallback) that checks isCanvasReady() and
queue.length > 0 and calls requestFlush(), reference the schedule(),
isCanvasReady(), requestFlush(), and queue variables to locate the logic, and
ensure the observer is created when the canvas element is available and properly
disconnected/cleaned up in the composable teardown.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d47b2f2e-8dc8-4856-8c0c-b0cf60d65740
📒 Files selected for processing (7)
src/composables/__tests__/useCanvasScheduler.test.tssrc/composables/useCanvasScheduler.tssrc/lib/litegraph/src/DragAndScale.tssrc/lib/litegraph/src/__tests__/DragAndScale.fitToBounds.test.tssrc/scripts/app.tssrc/stores/subgraphNavigationStore.tssrc/stores/subgraphNavigationStore.viewport.test.ts
✅ Files skipped from review due to trivial changes (3)
- src/lib/litegraph/src/DragAndScale.ts
- src/lib/litegraph/src/tests/DragAndScale.fitToBounds.test.ts
- src/stores/subgraphNavigationStore.viewport.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- src/stores/subgraphNavigationStore.ts
- src/composables/tests/useCanvasScheduler.test.ts
0fdc08d to
6e3e5dd
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/composables/useCanvasScheduler.ts`:
- Around line 37-52: The queued operations can remain unflushed when readiness
changes; modify requestFlush, schedule, and flush so the RAF is reliably
re-armed: ensure requestFlush always sets rafId when queue is non-empty and no
RAF is pending (use rafId guard already present), and update flush() so that if
it returns early because !isCanvasReady() it re-invokes requestFlush() (so
queued ops retry once readiness returns). Also update the readiness watcher (the
watcher handling linearMode/visibility/size changes) to call requestFlush() on
non-linearMode visibility/size transitions (not just the linearMode flip) so
queued fitView()/setDirty() are retried when canvas becomes visible or sized.
Reference functions: requestFlush, schedule, flush and the existing readiness
watcher.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 25444cb6-5623-4ee7-b334-917054f8d628
📒 Files selected for processing (7)
src/composables/__tests__/useCanvasScheduler.test.tssrc/composables/useCanvasScheduler.tssrc/lib/litegraph/src/DragAndScale.tssrc/lib/litegraph/src/__tests__/DragAndScale.fitToBounds.test.tssrc/scripts/app.tssrc/stores/subgraphNavigationStore.tssrc/stores/subgraphNavigationStore.viewport.test.ts
✅ Files skipped from review due to trivial changes (2)
- src/lib/litegraph/src/tests/DragAndScale.fitToBounds.test.ts
- src/composables/tests/useCanvasScheduler.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/stores/subgraphNavigationStore.ts
christian-byrne
left a comment
There was a problem hiding this comment.
A few mobile tests are failing. Based on the screenshot diffs, the links are now not rendered by the time the screenshot is taken (or maybe they never are at all)
6e3e5dd to
c3074a0
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/renderer/core/canvas/__tests__/useCanvasScheduler.test.ts (1)
37-62:⚠️ Potential issue | 🟠 MajorStop the shared composable scope between tests to prevent stale watchers.
At Line 56 you reset modules, but at Line 59–62 the scheduler is created outside an explicit effect scope. With
createSharedComposable, this can leave prior watchers alive and make later tests order-dependent whenmockStore.linearModechanges.Suggested fix
-import { beforeEach, describe, expect, it, vi } from 'vitest' -import { nextTick, reactive } from 'vue' +import { beforeEach, describe, expect, it, vi } from 'vitest' +import { effectScope, nextTick, reactive } from 'vue' @@ +let schedulerScope: ReturnType<typeof effectScope> | undefined + describe('useCanvasScheduler', () => { beforeEach(async () => { + schedulerScope?.stop() + schedulerScope = undefined @@ vi.resetModules() }) async function createScheduler() { const mod = await import('@/renderer/core/canvas/useCanvasScheduler') - return mod.useCanvasScheduler() + schedulerScope = effectScope() + return schedulerScope.run(() => mod.useCanvasScheduler())! }#!/bin/bash # Verify test-scope lifecycle handling around shared composable creation. rg -n -C2 "createScheduler|useCanvasScheduler|effectScope|resetModules|beforeEach|afterEach" \ src/renderer/core/canvas/__tests__/useCanvasScheduler.test.tsBased on learnings: “prefer
createSharedComposable... it disposes watchers/effect-scope reactivity when the last consumer unmounts,” so tests should provide/dispose a scope explicitly when instantiating shared composables outside components.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/renderer/core/canvas/__tests__/useCanvasScheduler.test.ts` around lines 37 - 62, Tests create the shared composable (useCanvasScheduler) outside an explicit effect scope which leaves watchers alive between tests; fix by creating an explicit effect scope when instantiating the scheduler (use effectScope() and run the import/useCanvasScheduler inside scope.run(...) in createScheduler), store that scope (e.g. testState.schedulerScope) and call scope.stop() in afterEach to dispose watchers before vi.resetModules()/next test so createSharedComposable state is fully torn down.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@src/renderer/core/canvas/__tests__/useCanvasScheduler.test.ts`:
- Around line 37-62: Tests create the shared composable (useCanvasScheduler)
outside an explicit effect scope which leaves watchers alive between tests; fix
by creating an explicit effect scope when instantiating the scheduler (use
effectScope() and run the import/useCanvasScheduler inside scope.run(...) in
createScheduler), store that scope (e.g. testState.schedulerScope) and call
scope.stop() in afterEach to dispose watchers before vi.resetModules()/next test
so createSharedComposable state is fully torn down.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: dce86833-9dc4-44a6-9f32-30d1e9ec593d
📒 Files selected for processing (7)
src/lib/litegraph/src/DragAndScale.tssrc/lib/litegraph/src/__tests__/DragAndScale.fitToBounds.test.tssrc/renderer/core/canvas/__tests__/useCanvasScheduler.test.tssrc/renderer/core/canvas/useCanvasScheduler.tssrc/scripts/app.tssrc/stores/subgraphNavigationStore.tssrc/stores/subgraphNavigationStore.viewport.test.ts
✅ Files skipped from review due to trivial changes (3)
- src/lib/litegraph/src/DragAndScale.ts
- src/lib/litegraph/src/tests/DragAndScale.fitToBounds.test.ts
- src/stores/subgraphNavigationStore.viewport.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/scripts/app.ts
4bf0a5f to
a7a60c9
Compare
Root cause analysisThe bg/fg canvas size mismatch was caused by two independent resize paths with undocumented temporal coupling:
Path 2 relied on path 1 having already run, but this dependency was nowhere documented. When the canvas scheduler called FixIntroduced a |
bb900dd to
53b119d
Compare
…tion Hidden-to-visible transitions already resize the canvas through the ResizeObserver, and resizeCanvas() flushes the scheduler after applying the visible viewport. The linear-mode watch and its animation-frame retry duplicated that path.
Canvas element, context, pointer-event and viewport fixtures now live in canvasTestUtils. The duplicate createMockCanvas2DContext is folded into createMockCanvasRenderingContext2D.
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: approve. Every finding from the earlier rounds and from my inline comments of 2026-10-02 is addressed at c874f49, and CI at this head is green except one unit test that also fails on main.
This round pushed the follow-ups to my inline comments directly to the branch:
29acb48removes the scheduler's linear-mode watch and animation-frame retry. Queued camera work now flushes only fromresizeCanvas()after the ResizeObserver applies a visible viewport. The App Mode template spec covers that path in CI.6bce6e1names the device pixel ratiodpreverywhere and reads the browser value through onereadBrowserDpr().63858ae,0b1f47a,11fc283,bfd321bandc874f49consolidate the tests:- canvas fixtures now live in
canvasTestUtils - a global
Path2Dautomock (vi.mockObject) replaces the per-file stubs - the overlapping-load tests use
vi.when - repeated cases are tables
- canvas fixtures now live in
961a331trims the App Mode template spec: the 60s timeout, theafterEachreset and the redundant camera asserts are gone. The test body takes about 1.4s; the rest of its 8.4s is the shared app-boot fixture.- The description no longer says it fixes #11154. Fit View still does not subtract the right-side parameters panel, so the issue stays open.
An independent pass over these commits found two items, both handled. One was the #11154 claim above. The other was the global Path2D stub missing arc(), which NodeSlot uses for hollow-circle slots; c874f49 adds it. The pass found no stall path in the scheduler after the watch removal: the canvas sits inside the v-show container, so leaving App Mode always resizes it, and the resize applies the viewport before it flushes and draws. The rewritten tests still fail when the guarded line is reverted; I checked the hidden-camera, keyed-replacement, viewport no-reset, and resize cases.
Review record
- Rounds 1 to 4, all 36 findings: closed, per the record in round 4. The three description items it left open were closed in the author's description update.
- P2, round 5 (review), the
Fixes #11154claim overstated what the PR fixes: closed by editing the description to say the PR relates to #11154 and the issue stays open. - Inline comments of 2026-10-02 (21 threads): 20 addressed in the commits above, each answered in its thread and resolved. The one about moving the workflow-load wait into the workflow helper was marked not for this PR and stays open as a follow-up.
- P2, this round, the global
Path2Dstub lackedarc(): addressed inc874f49.
Checks: CI at c874f49 passes typecheck, lint, every Playwright project (chromium-0.5x, chromium-2x, the 16 chromium shards including the App Mode template spec, and the cloud shards) and e2e-status. The one red job is unit shard 5, where opSender.test.ts ("does not rechunk a prefix after serialization aborts and throws") fails. It fails the same way on main at 9c33fe8, and this PR does not touch that code. perf-tests was still running when I approved. Locally:
- the full unit suite: only
UnifiedPricingTable.test.tsfails, and it fails onmaintoo - the 55 files touched by the fixture move: 1331 tests passed
pnpm typecheckandtypecheck:browser- ESLint, oxlint, oxfmt and knip on the changed files
- the commit and push hooks, including fallow
|
|
|
|
Summary
This incorporates the viewport migration from merged PR #11498 and supersedes the remaining work in PR #11827 and PR #19095. Those two fallback PRs will be closed after this PR merges. The panel work is adapted to the existing
visibleCanvasViewportcontract 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.
Validation
Architecture
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.