Repository navigation
[backport cloud/1.56] fix: guard touch handlers against a missing canvas and report why - #21854
christian-byrne wants to merge 1 commit into
Conversation
…1321) <!-- claude-slack-attribution --> _Requested via [Slack thread](https://comfy-organization.slack.com/archives/C09KFK2ABB8/p1792317627366019?thread_ts=1792317627.366019&cid=C09KFK2ABB8)_ **Before:** If `app.canvas` was never assigned, every click on the canvas threw `TypeError: Cannot read properties of undefined (reading 'pointer')` from the touch-support `processMouseDown` wrapper, and the two-finger touch handlers threw the same way. One production RUM session shows how that state arises: a browser userscript patches `CanvasRenderingContext2D.drawImage` and throws. The throw happens in the first synchronous frame inside `new LGraphCanvas(...)` (`startRendering` -> `renderFrame` -> `draw` -> `drawFrontCanvas`), so `ComfyApp.setup()` aborts before `app.canvas` is assigned. Event listeners were already bound by then, so each click hit the wrapper with no canvas. The app stayed unusable for the whole session. **After:** The wrapper uses the canvas it is called on (`this.pointer`) instead of the global, and the touch handlers read `app.canvasOrUndefined` once and skip the gesture when it is missing. A throwing first frame no longer aborts `LGraphCanvas` construction: it is reported and the instance finishes constructing, so `app.canvas` gets assigned. Per-frame behaviour is unchanged. - `simpleTouchSupport.ts`: `this.pointer.isDown = false` in the `processMouseDown` wrapper; `canvasOrReport` guards in the `touchstart` and `touchmove` pinch paths; pinch math moved into `zoomCanvasAroundPinch` unchanged. - `touchCanvasAccess.ts`: when a touch or pointer entry point finds no canvas, report once per entry point per page load (`errorType: error_handling_touch_input_missing_canvas`, level warning) with context: entry point, event type, pointer type, isPrimary, `document.readyState`, startup outcome (`pending`/`completed`/`failed`), whether `window.app` is defined, whether the canvas element exists and is connected, and whether the event target is the canvas element. No URLs, user data or ids. - `bootstrapTracer.ts`: read-only `outcome` getter so the report can say whether startup failed. - `LGraphCanvas.startRendering`: the initial `renderFrame` call is wrapped; on failure it resets `is_rendering`, reports `error_rendering_canvas_initial_frame` and returns instead of throwing out of the constructor. - Root cause is evidenced for one production session (the patched `drawImage` above), not proven for every occurrence. The new telemetry is meant to show whether other sessions share it or have a different cause. - Tests: `pnpm test:unit` on `simpleTouchSupport.test.ts`, `touchCanvasAccess.test.ts`, `LGraphCanvas.startRendering.test.ts`, `bootstrapTracer.test.ts` (30 passing). The new wrapper and construction tests fail against the previous code. - Not covered: a real browser with a userscript patching `drawImage`. - After release: query `@error.type:error_handling_touch_input_missing_canvas` and `@error.type:error_rendering_canvas_initial_frame` in Datadog and group by `bootstrapOutcome` and `entryPoint`. --- _Generated by [Claude Code](https://claude.ai/code/session_01EFm3kPsvMhmwyTUYf8eYuJ)_ Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit 42f00b3)
|
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 |
📦 Bundle Size
⚡ Performance Report
Scenario timings
Absolute values
Raw data{
"timestamp": "2026-10-23T22:45:02.769Z",
"gitSha": "c3f0d126aaf2bcdb81e2ef71fe81956c40e3a535",
"branch": "backport-21321-to-cloud-1.56",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2020.9239999999795,
"styleRecalcs": 13,
"styleRecalcDurationMs": 4.7299999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 397.98999999999995,
"heapDeltaBytes": 673296,
"heapUsedBytes": 68693988,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 12.566,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2007.8980000000115,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.246999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 399.90100000000007,
"heapDeltaBytes": 689476,
"heapUsedBytes": 68227040,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 13.645999999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1713.6969999999963,
"styleRecalcs": 72,
"styleRecalcDurationMs": 20.256000000000004,
"layouts": 12,
"layoutDurationMs": 4.848,
"taskDurationMs": 686.595,
"heapDeltaBytes": -2040744,
"heapUsedBytes": 66001064,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 139.043,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66601941747573,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1709.1139999999996,
"styleRecalcs": 73,
"styleRecalcDurationMs": 17.274,
"layouts": 12,
"layoutDurationMs": 4.4799999999999995,
"taskDurationMs": 630.99,
"heapDeltaBytes": -2047700,
"heapUsedBytes": 66189004,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 121.004,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1709.0269999999919,
"styleRecalcs": 29,
"styleRecalcDurationMs": 9.933,
"layouts": 6,
"layoutDurationMs": 1.3419999999999999,
"taskDurationMs": 338.01500000000004,
"heapDeltaBytes": 4171812,
"heapUsedBytes": 72257708,
"domNodes": 53,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 16.281000000000002,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666019417475727,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1737.9949999999553,
"styleRecalcs": 33,
"styleRecalcDurationMs": 11.718000000000002,
"layouts": 6,
"layoutDurationMs": 1.4459999999999997,
"taskDurationMs": 307.30100000000004,
"heapDeltaBytes": 4195792,
"heapUsedBytes": 71751320,
"domNodes": 53,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 16.488000000000003,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846156,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 592.4440000000004,
"styleRecalcs": 15,
"styleRecalcDurationMs": 4.607,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 408.01,
"heapDeltaBytes": -7071332,
"heapUsedBytes": 61490968,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 143.56199999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 556.9500000000289,
"styleRecalcs": 15,
"styleRecalcDurationMs": 4.494,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 375.437,
"heapDeltaBytes": -7408592,
"heapUsedBytes": 59458076,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 128.414,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663636363636368,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 969.5020000000056,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 595.188,
"heapDeltaBytes": 39617428,
"heapUsedBytes": 107714808,
"domNodes": 0,
"jsHeapTotalBytes": 2260992,
"scriptDurationMs": 47.346,
"eventListeners": 0,
"totalBlockingTimeMs": 318,
"frameDurationMs": 27.617142857142856,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 978.0120000000352,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 624.563,
"heapDeltaBytes": 15925004,
"heapUsedBytes": 85165008,
"domNodes": 0,
"jsHeapTotalBytes": 3309568,
"scriptDurationMs": 41.239,
"eventListeners": 0,
"totalBlockingTimeMs": 348,
"frameDurationMs": 29.290909090909103,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 716.0739999999919,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 332.35400000000004,
"heapDeltaBytes": 17697456,
"heapUsedBytes": 100274784,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 116.10300000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 103,
"frameDurationMs": 21.073529411764707,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 714.7370000000137,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 327.94100000000003,
"heapDeltaBytes": 17325304,
"heapUsedBytes": 99715812,
"domNodes": 0,
"jsHeapTotalBytes": 528384,
"scriptDurationMs": 109.52199999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 100,
"frameDurationMs": 21.076470588235306,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6405.352999999991,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.6740000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5438.512000000001,
"heapDeltaBytes": -7230932,
"heapUsedBytes": 69566684,
"domNodes": -142,
"jsHeapTotalBytes": -9834496,
"scriptDurationMs": 4172.436000000001,
"eventListeners": -74,
"totalBlockingTimeMs": 13,
"frameDurationMs": 22.14463667820069,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6414.182000000039,
"styleRecalcs": 3,
"styleRecalcDurationMs": 1.162,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5481.3859999999995,
"heapDeltaBytes": -14995440,
"heapUsedBytes": 69158216,
"domNodes": -142,
"jsHeapTotalBytes": -12980224,
"scriptDurationMs": 4163.903,
"eventListeners": -78,
"totalBlockingTimeMs": 14,
"frameDurationMs": 23.247463768115946,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6535.687999999993,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.7859999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5676.2519999999995,
"heapDeltaBytes": -12841736,
"heapUsedBytes": 71528184,
"domNodes": -142,
"jsHeapTotalBytes": -6164480,
"scriptDurationMs": 4447.736000000001,
"eventListeners": -78,
"totalBlockingTimeMs": 29,
"frameDurationMs": 24.286617100371746,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6635.485999999957,
"styleRecalcs": 3,
"styleRecalcDurationMs": 1.2119999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5693.429,
"heapDeltaBytes": 668568,
"heapUsedBytes": 84850384,
"domNodes": -142,
"jsHeapTotalBytes": -8523776,
"scriptDurationMs": 4430.334999999999,
"eventListeners": -78,
"totalBlockingTimeMs": 90,
"frameDurationMs": 23.94620938628159,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "large-graph-idle",
"durationMs": 2008.0350000000067,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.553000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 493.9000000000001,
"heapDeltaBytes": -9612416,
"heapUsedBytes": 78229644,
"domNodes": 0,
"jsHeapTotalBytes": 36864,
"scriptDurationMs": 36.425,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2008.1279999999992,
"styleRecalcs": 9,
"styleRecalcDurationMs": 3.9480000000000017,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 473.553,
"heapDeltaBytes": -10654464,
"heapUsedBytes": 76925508,
"domNodes": 0,
"jsHeapTotalBytes": 561152,
"scriptDurationMs": 35.32299999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66528925619835,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2168.768,
"styleRecalcs": 69,
"styleRecalcDurationMs": 13.939000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1316.124,
"heapDeltaBytes": -19150224,
"heapUsedBytes": 69726800,
"domNodes": 0,
"jsHeapTotalBytes": 1347584,
"scriptDurationMs": 659.977,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.7953488372093,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2201.7779999999902,
"styleRecalcs": 70,
"styleRecalcDurationMs": 14.265000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1324.5939999999998,
"heapDeltaBytes": -20226256,
"heapUsedBytes": 68817340,
"domNodes": 0,
"jsHeapTotalBytes": 1347584,
"scriptDurationMs": 688.438,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.793129770992362,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3147.9680000000485,
"styleRecalcs": 72,
"styleRecalcDurationMs": 16.376,
"layouts": 60,
"layoutDurationMs": 16.874,
"taskDurationMs": 1367.0559999999998,
"heapDeltaBytes": 1205196,
"heapUsedBytes": 69299020,
"domNodes": 24,
"jsHeapTotalBytes": 1310720,
"scriptDurationMs": 615.5849999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666137566137568,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3212.8660000000195,
"styleRecalcs": 72,
"styleRecalcDurationMs": 16.467,
"layouts": 60,
"layoutDurationMs": 16.839,
"taskDurationMs": 1441.422,
"heapDeltaBytes": 2053712,
"heapUsedBytes": 69661724,
"domNodes": 24,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 663.834,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666321243523317,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2563.9320000000225,
"styleRecalcs": 47,
"styleRecalcDurationMs": 9.065,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1632.4289999999999,
"heapDeltaBytes": 6474000,
"heapUsedBytes": 75133196,
"domNodes": 0,
"jsHeapTotalBytes": 1310720,
"scriptDurationMs": 871.043,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.775657894736845,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2413.735000000031,
"styleRecalcs": 47,
"styleRecalcDurationMs": 8.750999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1615.176,
"heapDeltaBytes": -14186608,
"heapUsedBytes": 68692492,
"domNodes": 0,
"jsHeapTotalBytes": 1085440,
"scriptDurationMs": 831.189,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665972222222226,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2018.979999999999,
"styleRecalcs": 8,
"styleRecalcDurationMs": 3.580999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 496.03,
"heapDeltaBytes": -9231460,
"heapUsedBytes": 80077280,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 35.17000000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2018.0250000000797,
"styleRecalcs": 9,
"styleRecalcDurationMs": 3.289,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 460.45899999999995,
"heapDeltaBytes": -9360624,
"heapUsedBytes": 79853112,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 36.292,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 532.1579999999813,
"styleRecalcs": 47,
"styleRecalcDurationMs": 7.403999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 336.76900000000006,
"heapDeltaBytes": -11953612,
"heapUsedBytes": 58117240,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 110.77600000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665625000000006,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 577.9890000000023,
"styleRecalcs": 48,
"styleRecalcDurationMs": 7.867000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 361.85499999999996,
"heapDeltaBytes": -12356148,
"heapUsedBytes": 58195472,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 114.29499999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664705882352937,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2022.260999999986,
"styleRecalcs": 12,
"styleRecalcDurationMs": 4.277000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 415.78800000000007,
"heapDeltaBytes": -2584032,
"heapUsedBytes": 60897552,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 11.790000000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2009.0759999999932,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.7919999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 397.33599999999996,
"heapDeltaBytes": 1190024,
"heapUsedBytes": 70688356,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 12.641,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1694.293000000016,
"styleRecalcs": 76,
"styleRecalcDurationMs": 20.258,
"layouts": 16,
"layoutDurationMs": 6.319999999999999,
"taskDurationMs": 653.405,
"heapDeltaBytes": -5814360,
"heapUsedBytes": 63885844,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 108.297,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1692.4149999999827,
"styleRecalcs": 76,
"styleRecalcDurationMs": 18.709,
"layouts": 16,
"layoutDurationMs": 5.433999999999999,
"taskDurationMs": 643.0519999999999,
"heapDeltaBytes": 17017936,
"heapUsedBytes": 80547872,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 102.764,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1318.6239999999998,
"styleRecalcs": 19,
"styleRecalcDurationMs": 24.14199999999999,
"layouts": 5,
"layoutDurationMs": 10.678,
"taskDurationMs": 815.348,
"heapDeltaBytes": 1228984,
"heapUsedBytes": 93766184,
"domNodes": 14227,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 30.226000000000003,
"eventListeners": 2463,
"totalBlockingTimeMs": 93,
"frameDurationMs": 18.51805555555556,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8212.747999999976,
"styleRecalcs": 250,
"styleRecalcDurationMs": 49.38,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4739.293999999999,
"heapDeltaBytes": -18258068,
"heapUsedBytes": 70945416,
"domNodes": 0,
"jsHeapTotalBytes": 1085440,
"scriptDurationMs": 2293.7340000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665922920892495,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8282.83399999998,
"styleRecalcs": 251,
"styleRecalcDurationMs": 46.835,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4728.976000000001,
"heapDeltaBytes": 7878364,
"heapUsedBytes": 95722988,
"domNodes": 0,
"jsHeapTotalBytes": 1572864,
"scriptDurationMs": 2268.163,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.699596774193548,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 13913.911999999982,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13324.252,
"heapDeltaBytes": -39257016,
"heapUsedBytes": 177632792,
"domNodes": -3045,
"jsHeapTotalBytes": 7217152,
"scriptDurationMs": 214.92900000000003,
"eventListeners": -14919,
"totalBlockingTimeMs": 0,
"frameDurationMs": 24.688099467140315,
"p95FrameDurationMs": 50
},
{
"name": "vue-large-graph-idle",
"durationMs": 13450.369000000024,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12862.307999999999,
"heapDeltaBytes": -45083620,
"heapUsedBytes": 181788124,
"domNodes": -3046,
"jsHeapTotalBytes": 9457664,
"scriptDurationMs": 216.313,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 23.240138408304496,
"p95FrameDurationMs": 33.5
},
{
"name": "vue-large-graph-pan",
"durationMs": 16180.155000000013,
"styleRecalcs": 96,
"styleRecalcDurationMs": 20.625999999999976,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15659.511,
"heapDeltaBytes": -17046116,
"heapUsedBytes": 186069496,
"domNodes": -3045,
"jsHeapTotalBytes": 5197824,
"scriptDurationMs": 735.52,
"eventListeners": -14915,
"totalBlockingTimeMs": 18,
"frameDurationMs": 29.537158469945354,
"p95FrameDurationMs": 66.69999999999709
},
{
"name": "vue-large-graph-pan",
"durationMs": 15433.712000000014,
"styleRecalcs": 78,
"styleRecalcDurationMs": 16.518000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14979.848,
"heapDeltaBytes": -29667724,
"heapUsedBytes": 169336936,
"domNodes": -3046,
"jsHeapTotalBytes": 7688192,
"scriptDurationMs": 684.735,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 27.470870337477802,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "vue-node-resize-workload",
"durationMs": 4967.258000000015,
"styleRecalcs": 20,
"styleRecalcDurationMs": 58.18099999999998,
"layouts": 20,
"layoutDurationMs": 27.293,
"taskDurationMs": 4917.906000000001,
"heapDeltaBytes": -2833288,
"heapUsedBytes": 214423244,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 88.215,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 29.21411764705882,
"p95FrameDurationMs": 50
},
{
"name": "vue-node-resize-workload",
"durationMs": 4717.404999999985,
"styleRecalcs": 20,
"styleRecalcDurationMs": 54.839,
"layouts": 20,
"layoutDurationMs": 24.318999999999992,
"taskDurationMs": 4618.263,
"heapDeltaBytes": 958248,
"heapUsedBytes": 217018552,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 80.24199999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 27.35953757225433,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6854.642000000013,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6598.337,
"heapDeltaBytes": -24061572,
"heapUsedBytes": 182755856,
"domNodes": -3045,
"jsHeapTotalBytes": 8790016,
"scriptDurationMs": 107.871,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 23.041275167785237,
"p95FrameDurationMs": 49.89999999999782
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6504.6140000000605,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6301.4090000000015,
"heapDeltaBytes": -37658252,
"heapUsedBytes": 175430796,
"domNodes": -3045,
"jsHeapTotalBytes": 6246400,
"scriptDurationMs": 102.178,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.738127090301006,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "workflow-execution",
"durationMs": 120.8580000000552,
"styleRecalcs": 9,
"styleRecalcDurationMs": 12.721000000000002,
"layouts": 3,
"layoutDurationMs": 1.092,
"taskDurationMs": 90.08300000000003,
"heapDeltaBytes": 3918788,
"heapUsedBytes": 69095340,
"domNodes": 97,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 10.771999999999997,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.657142857142844,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 90.12999999993099,
"styleRecalcs": 8,
"styleRecalcDurationMs": 11.885000000000002,
"layouts": 3,
"layoutDurationMs": 1.601,
"taskDurationMs": 59.77200000000002,
"heapDeltaBytes": 3635564,
"heapUsedBytes": 68576572,
"domNodes": 113,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 4.560000000000001,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 617.3230000000558,
"styleRecalcs": 78,
"styleRecalcDurationMs": 105.269,
"layouts": 76,
"layoutDurationMs": 29.575,
"taskDurationMs": 582.748,
"heapDeltaBytes": -16729052,
"heapUsedBytes": 68093088,
"domNodes": 76,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 197.002,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664864864864875,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 561.3550000000487,
"styleRecalcs": 78,
"styleRecalcDurationMs": 99.276,
"layouts": 76,
"layoutDurationMs": 28.745,
"taskDurationMs": 527.4929999999999,
"heapDeltaBytes": -17508548,
"heapUsedBytes": 68018212,
"domNodes": 76,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 171.39800000000002,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667647058823523,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1105.5299999999306,
"styleRecalcs": 78,
"styleRecalcDurationMs": 276.81899999999996,
"layouts": 76,
"layoutDurationMs": 29.822000000000003,
"taskDurationMs": 1082.907,
"heapDeltaBytes": 6793824,
"heapUsedBytes": 114934552,
"domNodes": 76,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 292.625,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665671641791036,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1047.971000000075,
"styleRecalcs": 78,
"styleRecalcDurationMs": 251.17899999999997,
"layouts": 76,
"layoutDurationMs": 29.553,
"taskDurationMs": 1020.923,
"heapDeltaBytes": 6168156,
"heapUsedBytes": 112989840,
"domNodes": 76,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 269.806,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66507936507936,
"p95FrameDurationMs": 16.700000000000728
}
]
}🎭 Playwright: ✅ 2205 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🌾 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 68a0aaa81bde9b1f9484e267e59ef7710360fe42
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 |
christian-byrne
left a comment
There was a problem hiding this comment.
Reviewed the complete exact-head carrier diff against source #21321 and the target branch architecture. The conflict resolution intentionally keeps the release branch’s inline touch-count/zoom guards, does not resurrect the deleted touchPointerGuards helper, routes all nullable canvas access through canvasOrReport, preserves this.pointer on the LGraphCanvas method, and adds the source regression coverage. Focused touch/canvas/bootstrap tests, targeted lint/format, commit typecheck, and the repository pre-push gate passed. No actionable finding from this review.
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## cloud/1.56 #21854 +/- ##
=============================================
Coverage ? 83.16%
=============================================
Files ? 2398
Lines ? 128028
Branches ? 39133
=============================================
Hits ? 106469
Misses ? 21148
Partials ? 411
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 7 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 3 |
| 🟢 Low | 3 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
| lastTouch: TouchPoint | ||
| ) { | ||
| let scale = requestedScale | ||
| const newX = (center.clientX - lastTouch.clientX) / requestedScale |
There was a problem hiding this comment.
🟡 Medium — newX/newY divide by the unclamped requestedScale, and the caller only guards touchDist/lastScale against null, not zero. Two touches reporting identical coordinates make getMultiTouchPos return 0, so requestedScale is 0 (or NaN when touchDist was also 0) and ±Infinity/NaN is added into canvas.ds.offset, which never recovers; a NaN scale also slips past both clamp branches into ds.scale. Requiring a finite positive ratio and dividing by the clamped scale fixes this and the pan drift that occurs at the min/max zoom limits. Raised by 7 of 8 reviewers (gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro adversarial, kimi-k3-max edge-case).
| this.is_rendering = true | ||
| renderFrame.call(this) | ||
| try { | ||
| renderFrame.call(this) |
There was a problem hiding this comment.
🟡 Medium — The try/catch only wraps the synchronous first renderFrame.call(this). Frames 2+ run from the requestAnimationFrame/setTimeout callback inside renderFrame, so a draw() throw there escapes before the re-scheduling block, queues no next frame, and leaves is_rendering === true — which makes every later startRendering() early-return, with no telemetry. Wrapping the body of renderFrame itself would cover the first and subsequent frames alike. Raised by 5 of 8 reviewers (gemini-3.1-pro edge-case, claude-opus-5-thinking-max adversarial, kimi-k3-max edge-case).
| try { | ||
| renderFrame.call(this) | ||
| } catch (cause) { | ||
| this.is_rendering = false |
There was a problem hiding this comment.
🟡 Medium — Catching the first-frame throw converts a loud constructor failure into a silently blank canvas: the constructor is the only production caller of startRendering(), so nothing re-arms the loop and reportError reaches telemetry but not the user. Startup then completes into a graph editor where no later setDirty() is ever painted. Consider a recovery path — re-arming rendering on the next setDirty, or a user-visible reload prompt — rather than leaving the canvas permanently dead. Raised by 3 of 8 reviewers (gpt-5.6-sol-max edge-case, gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max adversarial).
| return | ||
| } | ||
| app.canvas.pointer.isDown = false // Prevent context menu from opening on second tap | ||
| canvasOrReport('processMouseDown', e) |
There was a problem hiding this comment.
🟢 Low — canvasOrReport('processMouseDown', e) is now a pure telemetry probe (the line below mutates this), but it inspects the global app.canvasOrUndefined instead of the this canvas actually handling the event, and it runs for mouse and pen pointers too. A plain mouse press on a secondary or pre-assignment canvas therefore emits a false-positive error_handling_touch_input_missing_canvas, and since dedupe is permanent per entry point it consumes the single report a genuine touch press would have sent. Gate on e.pointerType === 'touch' and check the canvas handling the event. Raised by 4 of 8 reviewers (gemini-3.1-pro edge-case, claude-opus-5-thinking-max edge-case, kimi-k3-max adversarial, kimi-k3-max edge-case).
| } | ||
| if (e.touches.length === 2 && lastTouch && !e.ctrlKey && !e.shiftKey) { | ||
| const canvas = canvasOrReport('touchmove', e) | ||
| if (!canvas) return |
There was a problem hiding this comment.
🟢 Low — This early return now precedes e.preventDefault(), which previously ran unconditionally on a two-finger touchmove. In exactly the degraded state this change instruments, the browser regains native pinch-zoom of the whole page — the behaviour the comment on the next line says the handler exists to suppress. Hoist preventDefault() above the canvasOrReport call. Raised by 4 of 8 reviewers (claude-opus-5-thinking-max edge-case, kimi-k3-max edge-case, claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial).
| return [...this._timings].sort((a, b) => a.startMs - b.startMs) | ||
| } | ||
|
|
||
| get outcome(): 'completed' | 'failed' | 'pending' { |
There was a problem hiding this comment.
🟢 Low — _outcome is only assigned in complete(), while a watchdog timeout emits its 'timed_out' outcome through _report() without touching it, so a startup that blew past the deadline still reads as 'pending' from this getter. That leaves the new bootstrapOutcome field in the touch telemetry unable to distinguish a hung startup — the case it most needs to diagnose — from one still legitimately in flight. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
| }) | ||
| } | ||
|
|
||
| export function canvasOrReport(entryPoint: string, e: Event) { |
There was a problem hiding this comment.
⚪ Nit — entryPoint is a free-form string keying a module-global Set that is never cleared, so a future caller passing a per-event value (event type, node id, timestamp) would grow the set unboundedly and defeat the dedupe it exists for. Narrowing the parameter to a string-literal union of the real entry points makes that bound a type guarantee and documents the accepted values. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
|
Closing: |
Summary
Backports #21321 to
cloud/1.56.The target predates extraction of
touchPointerGuards.ts, so this conflict resolution preserves the target branch's inline pointer guards rather than resurrecting the deleted helper. It adds guarded canvas access, telemetry, bootstrap outcome tracking, and the source regression tests.Validation
NODE_OPTIONS=--no-experimental-webstorage pnpm vitest run src/extensions/core/simpleTouchSupport.test.ts src/extensions/core/touchCanvasAccess.test.ts src/lib/litegraph/src/LGraphCanvas.startRendering.test.ts src/platform/telemetry/perf/bootstrapTracer.test.ts(25 passed)oxfmt --check: passedSource commit:
42f00b3f1b33d42b8da10b3fbdcd47a97fcbc8a8