Repository navigation
[backport core/1.56] fix: guard touch handlers against a missing canvas and report why - #21853
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
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-10-23T22:45:31.159Z",
"gitSha": "ecce045f81871d3254de21f3889cb60abd678b0f",
"branch": "backport-21321-to-core-1.56",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2010.0370000000112,
"styleRecalcs": 12,
"styleRecalcDurationMs": 4.18,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 373.64300000000003,
"heapDeltaBytes": 1297576,
"heapUsedBytes": 70282064,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 10.778,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2010.7509999999706,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.8589999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 336.384,
"heapDeltaBytes": -2587388,
"heapUsedBytes": 59064972,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 8.003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1696.4669999999842,
"styleRecalcs": 73,
"styleRecalcDurationMs": 16.572999999999997,
"layouts": 12,
"layoutDurationMs": 4.132000000000001,
"taskDurationMs": 671.089,
"heapDeltaBytes": -2143960,
"heapUsedBytes": 65752988,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 129.64299999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1687.340000000006,
"styleRecalcs": 72,
"styleRecalcDurationMs": 14.635999999999997,
"layouts": 12,
"layoutDurationMs": 3.676,
"taskDurationMs": 628.2460000000001,
"heapDeltaBytes": -2090496,
"heapUsedBytes": 65712528,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 120.84999999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66435643564356,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1709.6349999999916,
"styleRecalcs": 31,
"styleRecalcDurationMs": 9.060999999999998,
"layouts": 6,
"layoutDurationMs": 1.175,
"taskDurationMs": 274.97400000000005,
"heapDeltaBytes": 194056,
"heapUsedBytes": 61749768,
"domNodes": 53,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 11.331000000000001,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666019417475724,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1720.1119999999719,
"styleRecalcs": 30,
"styleRecalcDurationMs": 9.234000000000002,
"layouts": 6,
"layoutDurationMs": 1.167,
"taskDurationMs": 280.9510000000001,
"heapDeltaBytes": -342484,
"heapUsedBytes": 59276092,
"domNodes": 53,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 11.120000000000001,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66601941747573,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 580.1920000000109,
"styleRecalcs": 15,
"styleRecalcDurationMs": 3.9619999999999984,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 377.51,
"heapDeltaBytes": -7152368,
"heapUsedBytes": 61661272,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 137.45399999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665714285714277,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 581.6309999999589,
"styleRecalcs": 12,
"styleRecalcDurationMs": 2.8199999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 389.026,
"heapDeltaBytes": 14328680,
"heapUsedBytes": 68612708,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 141.27200000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66285714285715,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1016.9710000000123,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 650.554,
"heapDeltaBytes": 15658484,
"heapUsedBytes": 85432720,
"domNodes": 0,
"jsHeapTotalBytes": 3309568,
"scriptDurationMs": 52.66499999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 386,
"frameDurationMs": 29.902941176470584,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1026.0859999999639,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 628.005,
"heapDeltaBytes": 38848652,
"heapUsedBytes": 108578396,
"domNodes": 0,
"jsHeapTotalBytes": 2523136,
"scriptDurationMs": 51.31599999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 378,
"frameDurationMs": 29.899999999999984,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 797.9270000000156,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 398.37599999999986,
"heapDeltaBytes": -8881884,
"heapUsedBytes": 78641988,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 127.80700000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 163,
"frameDurationMs": 22.857142857142858,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 785.2020000000266,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 384.2650000000001,
"heapDeltaBytes": -9305652,
"heapUsedBytes": 78485948,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 125.58600000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 163,
"frameDurationMs": 23.03823529411765,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "extension-clean-combined-draw",
"durationMs": 7203.3830000000025,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.35400000000000015,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6461.047,
"heapDeltaBytes": -4457740,
"heapUsedBytes": 80034656,
"domNodes": -142,
"jsHeapTotalBytes": -10883072,
"scriptDurationMs": 5195.807999999999,
"eventListeners": -74,
"totalBlockingTimeMs": 87,
"frameDurationMs": 25.622064056939507,
"p95FrameDurationMs": 49.900000000000546
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6917.0790000000015,
"styleRecalcs": 3,
"styleRecalcDurationMs": 1.0600000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6240.7919999999995,
"heapDeltaBytes": -11259296,
"heapUsedBytes": 73522372,
"domNodes": -142,
"jsHeapTotalBytes": -1708032,
"scriptDurationMs": 5075.148,
"eventListeners": -78,
"totalBlockingTimeMs": 33,
"frameDurationMs": 25.711152416356875,
"p95FrameDurationMs": 49.899999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6747.370000000018,
"styleRecalcs": 3,
"styleRecalcDurationMs": 1.0229999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6172.478,
"heapDeltaBytes": -219528,
"heapUsedBytes": 85564424,
"domNodes": -143,
"jsHeapTotalBytes": -9834496,
"scriptDurationMs": 4943.213,
"eventListeners": -82,
"totalBlockingTimeMs": 77,
"frameDurationMs": 25.861302681992342,
"p95FrameDurationMs": 49.899999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6907.636999999966,
"styleRecalcs": 3,
"styleRecalcDurationMs": 1.0399999999999991,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6329.472,
"heapDeltaBytes": 1569424,
"heapUsedBytes": 87814072,
"domNodes": -172,
"jsHeapTotalBytes": 389120,
"scriptDurationMs": 5155.08,
"eventListeners": -82,
"totalBlockingTimeMs": 40,
"frameDurationMs": 26.036603773584908,
"p95FrameDurationMs": 50
},
{
"name": "large-graph-idle",
"durationMs": 2005.5429999999888,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.356999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 406.924,
"heapDeltaBytes": -8766300,
"heapUsedBytes": 80280272,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 30.370999999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2010.3199999999788,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.578000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 462.1000000000001,
"heapDeltaBytes": -8773252,
"heapUsedBytes": 80340872,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 32.065000000000005,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2137.6490000000103,
"styleRecalcs": 70,
"styleRecalcDurationMs": 11.415999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1342.103,
"heapDeltaBytes": 14047460,
"heapUsedBytes": 95102500,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 714.191,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666406249999994,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2104.5780000000605,
"styleRecalcs": 67,
"styleRecalcDurationMs": 9.981,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1283.254,
"heapDeltaBytes": -20147156,
"heapUsedBytes": 69109328,
"domNodes": 0,
"jsHeapTotalBytes": 1085440,
"scriptDurationMs": 670.922,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66587301587302,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3237.905000000012,
"styleRecalcs": 74,
"styleRecalcDurationMs": 13.666,
"layouts": 60,
"layoutDurationMs": 13.478,
"taskDurationMs": 1360.402,
"heapDeltaBytes": 1599108,
"heapUsedBytes": 69841284,
"domNodes": 24,
"jsHeapTotalBytes": 1572864,
"scriptDurationMs": 658.513,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665979381443297,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3231.767999999988,
"styleRecalcs": 72,
"styleRecalcDurationMs": 13.892,
"layouts": 60,
"layoutDurationMs": 14.287,
"taskDurationMs": 1424.029,
"heapDeltaBytes": 906824,
"heapUsedBytes": 69971588,
"domNodes": 24,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 664.8309999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665979381443297,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2233.4469999999556,
"styleRecalcs": 47,
"styleRecalcDurationMs": 7.256,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1533.325,
"heapDeltaBytes": 4492436,
"heapUsedBytes": 73758648,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 820.066,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.79242424242424,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2444.663999999989,
"styleRecalcs": 46,
"styleRecalcDurationMs": 7.006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1616.097,
"heapDeltaBytes": 5920324,
"heapUsedBytes": 75051608,
"domNodes": 0,
"jsHeapTotalBytes": 1310720,
"scriptDurationMs": 858.592,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.78137931034483,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2020.4070000000343,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.9309999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 393.49400000000014,
"heapDeltaBytes": -8993364,
"heapUsedBytes": 80850812,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 30.071,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2017.910000000029,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.2950000000000013,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 409.299,
"heapDeltaBytes": -9000204,
"heapUsedBytes": 80834120,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 34.14900000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 526.7069999999876,
"styleRecalcs": 48,
"styleRecalcDurationMs": 6.005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 322.6410000000001,
"heapDeltaBytes": -12625840,
"heapUsedBytes": 57960916,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 115.94399999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.668750000000003,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 533.5509999999886,
"styleRecalcs": 48,
"styleRecalcDurationMs": 5.961000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 338.861,
"heapDeltaBytes": -12284112,
"heapUsedBytes": 58521352,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 120.77300000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66562499999999,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2012.1760000000108,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.811,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 374.209,
"heapDeltaBytes": 1109144,
"heapUsedBytes": 70896148,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 8.454000000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2010.8900000000176,
"styleRecalcs": 12,
"styleRecalcDurationMs": 4.597,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 408.79299999999995,
"heapDeltaBytes": 1562464,
"heapUsedBytes": 72549704,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 10.799000000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1678.487999999959,
"styleRecalcs": 75,
"styleRecalcDurationMs": 14.971,
"layouts": 16,
"layoutDurationMs": 4.482,
"taskDurationMs": 590.158,
"heapDeltaBytes": -5537728,
"heapUsedBytes": 64684780,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 87.62599999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665346534653462,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1694.5360000000846,
"styleRecalcs": 76,
"styleRecalcDurationMs": 18.104000000000003,
"layouts": 16,
"layoutDurationMs": 5.43,
"taskDurationMs": 636.007,
"heapDeltaBytes": -5589372,
"heapUsedBytes": 63158768,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 94.276,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665686274509806,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 867.7859999999669,
"styleRecalcs": 18,
"styleRecalcDurationMs": 23.268000000000004,
"layouts": 5,
"layoutDurationMs": 10.778000000000002,
"taskDurationMs": 698.415,
"heapDeltaBytes": -744144,
"heapUsedBytes": 90895164,
"domNodes": 14227,
"jsHeapTotalBytes": 2097152,
"scriptDurationMs": 23.860000000000007,
"eventListeners": 2463,
"totalBlockingTimeMs": 85,
"frameDurationMs": 19.695454545454552,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8182.3449999999975,
"styleRecalcs": 251,
"styleRecalcDurationMs": 36.632999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4411.487999999999,
"heapDeltaBytes": 11743472,
"heapUsedBytes": 100035052,
"domNodes": 0,
"jsHeapTotalBytes": 1277952,
"scriptDurationMs": 2186.426,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665987780040734,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8156.034999999974,
"styleRecalcs": 251,
"styleRecalcDurationMs": 36.333,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4467.944,
"heapDeltaBytes": 7724340,
"heapUsedBytes": 96053256,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 2232.103,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666053169734152,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 14451.251000000013,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13931.927000000001,
"heapDeltaBytes": -32154412,
"heapUsedBytes": 181678720,
"domNodes": -3045,
"jsHeapTotalBytes": 8409088,
"scriptDurationMs": 201.081,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 25.129391304347827,
"p95FrameDurationMs": 50
},
{
"name": "vue-large-graph-idle",
"durationMs": 15806.866000000013,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15300.913,
"heapDeltaBytes": -59675568,
"heapUsedBytes": 179735440,
"domNodes": -3045,
"jsHeapTotalBytes": 2203648,
"scriptDurationMs": 237.12000000000003,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 29.642401500938085,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "vue-large-graph-pan",
"durationMs": 17246.75500000001,
"styleRecalcs": 140,
"styleRecalcDurationMs": 14.869999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16843.638,
"heapDeltaBytes": -37616164,
"heapUsedBytes": 175439412,
"domNodes": -3045,
"jsHeapTotalBytes": 7098368,
"scriptDurationMs": 690.864,
"eventListeners": -14915,
"totalBlockingTimeMs": 4,
"frameDurationMs": 32.121601489757914,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-large-graph-pan",
"durationMs": 17946.627999999917,
"styleRecalcs": 138,
"styleRecalcDurationMs": 18.371000000000027,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17676.292,
"heapDeltaBytes": -30927268,
"heapUsedBytes": 185030056,
"domNodes": -3045,
"jsHeapTotalBytes": 9547776,
"scriptDurationMs": 744.4259999999999,
"eventListeners": -14915,
"totalBlockingTimeMs": 6,
"frameDurationMs": 33.930812854442344,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-node-resize-workload",
"durationMs": 5279.70700000003,
"styleRecalcs": 20,
"styleRecalcDurationMs": 61.25399999999998,
"layouts": 20,
"layoutDurationMs": 22.568000000000005,
"taskDurationMs": 5232.700000000001,
"heapDeltaBytes": 963444,
"heapUsedBytes": 214633264,
"domNodes": 0,
"jsHeapTotalBytes": 1310720,
"scriptDurationMs": 84.55399999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 31.535928143712574,
"p95FrameDurationMs": 66.59999999999854
},
{
"name": "vue-node-resize-workload",
"durationMs": 5663.591999999994,
"styleRecalcs": 20,
"styleRecalcDurationMs": 63.752,
"layouts": 20,
"layoutDurationMs": 25.430999999999994,
"taskDurationMs": 5563.6449999999995,
"heapDeltaBytes": 9347880,
"heapUsedBytes": 226768040,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 96.11699999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 34.449390243902435,
"p95FrameDurationMs": 66.69999999999891
},
{
"name": "vue-zoom-out-idle",
"durationMs": 7393.485999999995,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7093.8949999999995,
"heapDeltaBytes": -17602108,
"heapUsedBytes": 185678348,
"domNodes": -3045,
"jsHeapTotalBytes": 9457664,
"scriptDurationMs": 105.62699999999997,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 26.427500000000002,
"p95FrameDurationMs": 50
},
{
"name": "vue-zoom-out-idle",
"durationMs": 7658.603999999968,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7456.820000000001,
"heapDeltaBytes": -22471184,
"heapUsedBytes": 180875908,
"domNodes": -3045,
"jsHeapTotalBytes": 7360512,
"scriptDurationMs": 114.226,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 27.418279569892476,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "workflow-execution",
"durationMs": 110.28299999998126,
"styleRecalcs": 8,
"styleRecalcDurationMs": 10.677000000000001,
"layouts": 3,
"layoutDurationMs": 1.553,
"taskDurationMs": 71.318,
"heapDeltaBytes": 3903852,
"heapUsedBytes": 69538216,
"domNodes": 117,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.453999999999995,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.657142857142844,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 115.72599999999511,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.814,
"layouts": 2,
"layoutDurationMs": 1.1720000000000002,
"taskDurationMs": 70.45599999999999,
"heapDeltaBytes": 3718868,
"heapUsedBytes": 62670140,
"domNodes": 114,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 4.868000000000001,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.67142857142861,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 666.4260000000013,
"styleRecalcs": 78,
"styleRecalcDurationMs": 89.479,
"layouts": 76,
"layoutDurationMs": 23.338,
"taskDurationMs": 633.507,
"heapDeltaBytes": -16446644,
"heapUsedBytes": 68718524,
"domNodes": 76,
"jsHeapTotalBytes": 10747904,
"scriptDurationMs": 239.02300000000002,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667499999999997,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 771.233000000052,
"styleRecalcs": 78,
"styleRecalcDurationMs": 103.455,
"layouts": 76,
"layoutDurationMs": 25.131,
"taskDurationMs": 741.424,
"heapDeltaBytes": -15283328,
"heapUsedBytes": 69990720,
"domNodes": 76,
"jsHeapTotalBytes": 10747904,
"scriptDurationMs": 285.31199999999995,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.028260869565223,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1295.884000000001,
"styleRecalcs": 78,
"styleRecalcDurationMs": 269.26,
"layouts": 76,
"layoutDurationMs": 28.306,
"taskDurationMs": 1277.524,
"heapDeltaBytes": -19102816,
"heapUsedBytes": 109142692,
"domNodes": 76,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 393.297,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1206.3079999999218,
"styleRecalcs": 78,
"styleRecalcDurationMs": 259.219,
"layouts": 76,
"layoutDurationMs": 26.689,
"taskDurationMs": 1189.6689999999999,
"heapDeltaBytes": -13238816,
"heapUsedBytes": 107816660,
"domNodes": 76,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 354.518,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.897222222222226,
"p95FrameDurationMs": 16.700000000000728
}
]
}🎭 Playwright: ✅ 2206 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 44482ac581f30d7e322a3a0c08fc3998e83cf25d
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 @@
## core/1.56 #21853 +/- ##
==========================================
Coverage 82.79% 82.79%
==========================================
Files 2690 2691 +1
Lines 152066 152087 +21
Branches 36730 36663 -67
==========================================
+ Hits 125900 125922 +22
+ Misses 25781 25780 -1
Partials 385 385
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file 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 7 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 3 |
| 🟢 Low | 2 |
| ⚪ Nit | 2 |
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 — requestedScale is used as a divisor with no finiteness check: when both pinch points report identical coordinates getMultiTouchPos returns 0, so the scale is 0 (or NaN when touchDist is also 0) and newX/newY become Infinity/NaN. NaN also passes both clamp branches below (NaN < min_scale and NaN > max_scale are both false), so ds.scale and ds.offset are poisoned and the viewport is unrecoverable without a reset-view; the call-site guard only rejects null, not zero. The math is carried over verbatim from the pre-refactor inline code, but the extracted helper is the cheap place to bail when touchDist/newTouchDist is not a positive finite number. Raised by 8 of 8 reviewers (all four labs, both review types).
| try { | ||
| renderFrame.call(this) | ||
| } catch (cause) { | ||
| this.is_rendering = false |
There was a problem hiding this comment.
🟡 Medium — Clearing is_rendering here retries nothing: the only production caller of startRendering() is the LGraphCanvas constructor, and nothing else drives stopRendering/is_rendering. A transient first-frame failure therefore lets construction and ComfyApp.setup() report success while the render loop stays dead for the whole session — repainting only on the handful of explicit canvas.draw(true, true) calls, with no user-visible error — where previously the exception propagated and failed fast. Consider a bounded recovery (e.g. rescheduling one frame) or surfacing the failure, rather than telemetry only. Raised by 5 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case).
| /** Render loop */ | ||
| function renderFrame(this: LGraphCanvas) { | ||
| if (!this.pause_rendering) { | ||
| this.draw() |
There was a problem hiding this comment.
🟡 Medium — The try/catch only wraps the first, synchronous renderFrame call; every later frame runs from the requestAnimationFrame/setTimeout callback, so a throw from this.draw() on frame 2+ escapes uncaught before the next frame is scheduled and leaves is_rendering === true. The if (this.is_rendering) return guard then makes that permanent, so the loop dies silently with nothing reported — an extension patching draw after boot (the exact scenario the new test names) is the case the guard misses. Wrapping the body of renderFrame instead would cover all frames. Raised by 4 of 8 reviewers (claude-opus-5-thinking-max adversarial, gemini-3.1-pro adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro edge-case).
| 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 — This probes the global app.canvasOrUndefined and discards the result while the next line operates on this, so the two are unrelated: any processMouseDown reaching a valid canvas before app.canvas is assigned emits a false error_handling_touch_input_missing_canvas, and the override is not gated on pointer type so plain mouse clicks can trigger it too. Because reportMissingCanvas dedupes permanently per entry-point string, that one false report silences every genuine touch case this instrumentation exists to capture. Gate on e.pointerType === 'touch', or key the dedup set on entry point plus pointer type. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro edge-case).
| 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(), so the watchdog path that reports timed_out leaves outcome returning 'pending' forever. A startup hung past the deadline — the most likely reason the canvas is missing — is then indistinguishable from one still legitimately in progress in the new bootstrapOutcome context field, which is precisely the distinction touchCanvasAccess added it for. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, 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.
⚪ Nit — This guard returns before e.preventDefault(), which previously ran unconditionally on this branch, so a two-finger gesture with no canvas now falls through to the browser's native page pinch-zoom instead of being suppressed. Hoisting preventDefault() above the guard keeps the degraded state from also being a visibly broken one. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
| ) { | ||
| let scale = requestedScale | ||
| const newX = (center.clientX - lastTouch.clientX) / requestedScale | ||
| const newY = (center.clientY - lastTouch.clientY) / requestedScale |
There was a problem hiding this comment.
⚪ Nit — newX/newY divide by the unclamped requestedScale while the zoom actually applied uses the clamped scale, so once a pinch pushes past min_scale/max_scale the pan delta is scaled by a factor the canvas never adopts and the view jumps relative to the fingers. This faithfully preserves the pre-refactor behaviour, but splitting the value into two named variables makes the mismatch look deliberate; if it isn't, divide by the clamped scale. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case).
|
Closing: |
Summary
Backports #21321 to
core/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