Repository navigation
[backport core/1.57] fix: guard touch handlers against a missing canvas and report why - #21850
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
|
📦 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-29T19:04:52.325Z",
"gitSha": "e47911cde378ffa323c5b9977daf3346e269ac30",
"branch": "backport-21321-to-core-1.57",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2023.6360000000104,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.521,
"layouts": 9,
"layoutDurationMs": 2.595,
"taskDurationMs": 526.5060000000001,
"heapDeltaBytes": -931540,
"heapUsedBytes": 74051828,
"domNodes": 0,
"jsHeapTotalBytes": 6815744,
"scriptDurationMs": 8.790000000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2039.5600000000513,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.457,
"layouts": 9,
"layoutDurationMs": 2.665,
"taskDurationMs": 535.358,
"heapDeltaBytes": 3529568,
"heapUsedBytes": 78697264,
"domNodes": 0,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 10.025000000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1740.6459999999697,
"styleRecalcs": 53,
"styleRecalcDurationMs": 12.926000000000002,
"layouts": 6,
"layoutDurationMs": 1.784,
"taskDurationMs": 864.061,
"heapDeltaBytes": -8261656,
"heapUsedBytes": 66806800,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 162.196,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846145,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1976.2799999999743,
"styleRecalcs": 84,
"styleRecalcDurationMs": 15.564000000000002,
"layouts": 10,
"layoutDurationMs": 2.593,
"taskDurationMs": 1051.2899999999997,
"heapDeltaBytes": -8256940,
"heapUsedBytes": 66872140,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 160.29000000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666386554621848,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.3139999999926,
"styleRecalcs": 18,
"styleRecalcDurationMs": 6.119000000000001,
"layouts": 12,
"layoutDurationMs": 3.5820000000000003,
"taskDurationMs": 419.77,
"heapDeltaBytes": -4541040,
"heapUsedBytes": 70506984,
"domNodes": 47,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 12.715,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846153,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1737.9770000000008,
"styleRecalcs": 19,
"styleRecalcDurationMs": 5.495,
"layouts": 12,
"layoutDurationMs": 2.7880000000000003,
"taskDurationMs": 291.33599999999996,
"heapDeltaBytes": 18725016,
"heapUsedBytes": 85127332,
"domNodes": 47,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 11.091,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846153,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 712.1559999999931,
"styleRecalcs": 14,
"styleRecalcDurationMs": 2.6,
"layouts": 10,
"layoutDurationMs": 3.038,
"taskDurationMs": 508.2390000000001,
"heapDeltaBytes": 25611036,
"heapUsedBytes": 92045316,
"domNodes": 0,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 170.42800000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664285714285718,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 651.8089999999575,
"styleRecalcs": 13,
"styleRecalcDurationMs": 2.661,
"layouts": 9,
"layoutDurationMs": 2.634,
"taskDurationMs": 483.565,
"heapDeltaBytes": 3467364,
"heapUsedBytes": 79070920,
"domNodes": 0,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 168.01100000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664102564102556,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1215.0879999999802,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 864.0659999999999,
"heapDeltaBytes": -11593448,
"heapUsedBytes": 81241816,
"domNodes": -192,
"jsHeapTotalBytes": 22028288,
"scriptDurationMs": 74.54799999999999,
"eventListeners": -106,
"totalBlockingTimeMs": 530,
"frameDurationMs": 32.88108108108109,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1200.4929999999376,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 860.829,
"heapDeltaBytes": -11516420,
"heapUsedBytes": 81158968,
"domNodes": -192,
"jsHeapTotalBytes": 20717568,
"scriptDurationMs": 74.42299999999999,
"eventListeners": -105,
"totalBlockingTimeMs": 534,
"frameDurationMs": 33.33055555555555,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 860.7619999999656,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 497.6189999999998,
"heapDeltaBytes": -3648528,
"heapUsedBytes": 76111644,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 165.36299999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 218,
"frameDurationMs": 24.99999999999997,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 857.7890000000252,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 456.49999999999966,
"heapDeltaBytes": -5692880,
"heapUsedBytes": 75855356,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 161.099,
"eventListeners": 0,
"totalBlockingTimeMs": 229,
"frameDurationMs": 25.488235294117658,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11756.359000000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10857.943000000001,
"heapDeltaBytes": -1937456,
"heapUsedBytes": 97983028,
"domNodes": -258,
"jsHeapTotalBytes": 10612736,
"scriptDurationMs": 8927.122000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 1891,
"frameDurationMs": 33.617094017094026,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10419.682999999965,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9603.964999999998,
"heapDeltaBytes": -18754612,
"heapUsedBytes": 75306988,
"domNodes": -258,
"jsHeapTotalBytes": 5369856,
"scriptDurationMs": 7833.54,
"eventListeners": -68,
"totalBlockingTimeMs": 993,
"frameDurationMs": 31.280180180180178,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10315.34400000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9497.077000000001,
"heapDeltaBytes": -5656392,
"heapUsedBytes": 88740920,
"domNodes": -258,
"jsHeapTotalBytes": 4321280,
"scriptDurationMs": 7661.658,
"eventListeners": -68,
"totalBlockingTimeMs": 896,
"frameDurationMs": 31.072891566265064,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 11173.032000000036,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10399.178,
"heapDeltaBytes": -23674728,
"heapUsedBytes": 76251824,
"domNodes": -278,
"jsHeapTotalBytes": 14020608,
"scriptDurationMs": 8548.74,
"eventListeners": -68,
"totalBlockingTimeMs": 1454,
"frameDurationMs": 31.632577903682716,
"p95FrameDurationMs": 66.59999999999945
},
{
"name": "large-combo-open",
"durationMs": 228.11300000000756,
"styleRecalcs": 24,
"styleRecalcDurationMs": 15.57,
"layouts": 11,
"layoutDurationMs": 3.4909999999999997,
"taskDurationMs": 165.24600000000004,
"heapDeltaBytes": -8066304,
"heapUsedBytes": 80220120,
"domNodes": 917,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 8.641000000000002,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.218181818181787,
"p95FrameDurationMs": 66.69999999999982
},
{
"name": "large-combo-open",
"durationMs": 217.24200000005567,
"styleRecalcs": 24,
"styleRecalcDurationMs": 15.064000000000002,
"layouts": 11,
"layoutDurationMs": 3.106,
"taskDurationMs": 161.317,
"heapDeltaBytes": -8263652,
"heapUsedBytes": 79211908,
"domNodes": 917,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 8.428999999999998,
"eventListeners": 196,
"totalBlockingTimeMs": 1,
"frameDurationMs": 21.66999999999998,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "large-graph-idle",
"durationMs": 2056.418000000008,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.3500000000000005,
"layouts": 8,
"layoutDurationMs": 2.221,
"taskDurationMs": 656.4910000000002,
"heapDeltaBytes": -19934720,
"heapUsedBytes": 77196472,
"domNodes": -258,
"jsHeapTotalBytes": 4620288,
"scriptDurationMs": 34.187,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2055.250000000001,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.279,
"layouts": 8,
"layoutDurationMs": 2.4210000000000003,
"taskDurationMs": 641.1320000000002,
"heapDeltaBytes": -25622368,
"heapUsedBytes": 72860336,
"domNodes": -258,
"jsHeapTotalBytes": 5668864,
"scriptDurationMs": 33.505,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2374.7470000000135,
"styleRecalcs": 70,
"styleRecalcDurationMs": 6.596,
"layouts": 8,
"layoutDurationMs": 1.904,
"taskDurationMs": 1718.7450000000001,
"heapDeltaBytes": -7303056,
"heapUsedBytes": 91076052,
"domNodes": -278,
"jsHeapTotalBytes": 5894144,
"scriptDurationMs": 850.668,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666197183098593,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2230.4570000000012,
"styleRecalcs": 68,
"styleRecalcDurationMs": 5.939000000000001,
"layouts": 7,
"layoutDurationMs": 1.6390000000000002,
"taskDurationMs": 1486.1870000000001,
"heapDeltaBytes": -12286988,
"heapUsedBytes": 67954268,
"domNodes": -278,
"jsHeapTotalBytes": 3796992,
"scriptDurationMs": 836.809,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66616541353383,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3706.596999999988,
"styleRecalcs": 71,
"styleRecalcDurationMs": 7.423,
"layouts": 65,
"layoutDurationMs": 10.779,
"taskDurationMs": 1799.5069999999998,
"heapDeltaBytes": -22782196,
"heapUsedBytes": 76740856,
"domNodes": -254,
"jsHeapTotalBytes": 5668864,
"scriptDurationMs": 808.278,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.741176470588236,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3670.6459999999197,
"styleRecalcs": 69,
"styleRecalcDurationMs": 7.18,
"layouts": 63,
"layoutDurationMs": 10.505,
"taskDurationMs": 1817.304,
"heapDeltaBytes": -9716488,
"heapUsedBytes": 72331192,
"domNodes": -254,
"jsHeapTotalBytes": 3534848,
"scriptDurationMs": 800.3939999999999,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66590909090909,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3072.597999999971,
"styleRecalcs": 44,
"styleRecalcDurationMs": 4.817,
"layouts": 4,
"layoutDurationMs": 1.0890000000000002,
"taskDurationMs": 1962.7100000000003,
"heapDeltaBytes": 4805340,
"heapUsedBytes": 83252040,
"domNodes": 0,
"jsHeapTotalBytes": 2621440,
"scriptDurationMs": 962.672,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.84945054945055,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3084.251999999992,
"styleRecalcs": 43,
"styleRecalcDurationMs": 4.4559999999999995,
"layouts": 4,
"layoutDurationMs": 0.8829999999999997,
"taskDurationMs": 1950.5330000000001,
"heapDeltaBytes": 16801236,
"heapUsedBytes": 99902720,
"domNodes": 0,
"jsHeapTotalBytes": 5922816,
"scriptDurationMs": 958.66,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.75621621621622,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2056.083000000001,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.0290000000000004,
"layouts": 8,
"layoutDurationMs": 2.174,
"taskDurationMs": 650.32,
"heapDeltaBytes": -2115052,
"heapUsedBytes": 76243140,
"domNodes": -258,
"jsHeapTotalBytes": 3010560,
"scriptDurationMs": 33.81400000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2062.6170000000457,
"styleRecalcs": 7,
"styleRecalcDurationMs": 1.8550000000000006,
"layouts": 7,
"layoutDurationMs": 2.132,
"taskDurationMs": 650.0460000000002,
"heapDeltaBytes": -22111756,
"heapUsedBytes": 76632548,
"domNodes": -258,
"jsHeapTotalBytes": 2260992,
"scriptDurationMs": 32.425000000000004,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666935483870972,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 559.221999999977,
"styleRecalcs": 46,
"styleRecalcDurationMs": 4.764,
"layouts": 9,
"layoutDurationMs": 2.7979999999999996,
"taskDurationMs": 377.65999999999997,
"heapDeltaBytes": 20245460,
"heapUsedBytes": 87674604,
"domNodes": 0,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 148.84599999999998,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66470588235295,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 544.3369999999277,
"styleRecalcs": 47,
"styleRecalcDurationMs": 4.592,
"layouts": 9,
"layoutDurationMs": 2.391,
"taskDurationMs": 378.79999999999995,
"heapDeltaBytes": 21536412,
"heapUsedBytes": 89063068,
"domNodes": 0,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 151.012,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663636363636353,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2016.8749999999704,
"styleRecalcs": 8,
"styleRecalcDurationMs": 1.784000000000001,
"layouts": 7,
"layoutDurationMs": 1.7740000000000005,
"taskDurationMs": 519.4239999999999,
"heapDeltaBytes": 22044772,
"heapUsedBytes": 89403868,
"domNodes": 0,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 7.844,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760327,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2011.4990000000716,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.4949999999999997,
"layouts": 9,
"layoutDurationMs": 2.7230000000000003,
"taskDurationMs": 381.266,
"heapDeltaBytes": 22394676,
"heapUsedBytes": 89765220,
"domNodes": 0,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 8.059999999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1693.037000000004,
"styleRecalcs": 76,
"styleRecalcDurationMs": 15.386,
"layouts": 10,
"layoutDurationMs": 2.817,
"taskDurationMs": 810.8040000000001,
"heapDeltaBytes": -7097324,
"heapUsedBytes": 70216104,
"domNodes": 0,
"jsHeapTotalBytes": 11796480,
"scriptDurationMs": 110.361,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1960.9350000000632,
"styleRecalcs": 86,
"styleRecalcDurationMs": 16.747,
"layouts": 10,
"layoutDurationMs": 2.458,
"taskDurationMs": 900.16,
"heapDeltaBytes": 11270516,
"heapUsedBytes": 78680920,
"domNodes": 0,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 113.293,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666101694915252,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1485.5459999999994,
"styleRecalcs": 17,
"styleRecalcDurationMs": 26.994999999999997,
"layouts": 5,
"layoutDurationMs": 14.409000000000002,
"taskDurationMs": 1084.5139999999997,
"heapDeltaBytes": 9306176,
"heapUsedBytes": 118004724,
"domNodes": 15953,
"jsHeapTotalBytes": 14815232,
"scriptDurationMs": 31.466000000000008,
"eventListeners": 3244,
"totalBlockingTimeMs": 167,
"frameDurationMs": 20,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 9276.828000000023,
"styleRecalcs": 247,
"styleRecalcDurationMs": 18.537000000000003,
"layouts": 5,
"layoutDurationMs": 1.4929999999999997,
"taskDurationMs": 6080.589,
"heapDeltaBytes": -8481340,
"heapUsedBytes": 88734584,
"domNodes": -258,
"jsHeapTotalBytes": 5337088,
"scriptDurationMs": 2810.8940000000002,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.75631768953069,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8707.43600000003,
"styleRecalcs": 251,
"styleRecalcDurationMs": 18.419999999999998,
"layouts": 9,
"layoutDurationMs": 2.292,
"taskDurationMs": 5917.029,
"heapDeltaBytes": -10880396,
"heapUsedBytes": 68147408,
"domNodes": -278,
"jsHeapTotalBytes": 4583424,
"scriptDurationMs": 2750.308,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666091954022985,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16679.441,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15666.432,
"heapDeltaBytes": -31569508,
"heapUsedBytes": 263559796,
"domNodes": -3330,
"jsHeapTotalBytes": 20176896,
"scriptDurationMs": 258.357,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 28.371938775510205,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "vue-large-graph-idle",
"durationMs": 16836.502999999993,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15926.8,
"heapDeltaBytes": -4094376,
"heapUsedBytes": 287250296,
"domNodes": -3330,
"jsHeapTotalBytes": 21483520,
"scriptDurationMs": 262.06399999999996,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 28.77367521367522,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "vue-large-graph-pan",
"durationMs": 27831.017000000033,
"styleRecalcs": 181,
"styleRecalcDurationMs": 15.172999999999991,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 27345.336000000003,
"heapDeltaBytes": -33758876,
"heapUsedBytes": 253582220,
"domNodes": -3330,
"jsHeapTotalBytes": 6017024,
"scriptDurationMs": 887.4870000000001,
"eventListeners": -651,
"totalBlockingTimeMs": 48,
"frameDurationMs": 49.61176470588235,
"p95FrameDurationMs": 100
},
{
"name": "vue-large-graph-pan",
"durationMs": 28465.867000000002,
"styleRecalcs": 181,
"styleRecalcDurationMs": 15.451999999999993,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 28037.784000000003,
"heapDeltaBytes": -8567336,
"heapUsedBytes": 287357096,
"domNodes": -3330,
"jsHeapTotalBytes": 9617408,
"scriptDurationMs": 896.182,
"eventListeners": -651,
"totalBlockingTimeMs": 7,
"frameDurationMs": 51.5679347826087,
"p95FrameDurationMs": 100.10000000000218
},
{
"name": "vue-node-resize-workload",
"durationMs": 5863.435999999979,
"styleRecalcs": 20,
"styleRecalcDurationMs": 94.02099999999999,
"layouts": 20,
"layoutDurationMs": 29.70199999999999,
"taskDurationMs": 5748.811,
"heapDeltaBytes": -49119936,
"heapUsedBytes": 252494060,
"domNodes": -3330,
"jsHeapTotalBytes": 19124224,
"scriptDurationMs": 101.795,
"eventListeners": -653,
"totalBlockingTimeMs": 16,
"frameDurationMs": 34.50823529411765,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-node-resize-workload",
"durationMs": 8436.307000000055,
"styleRecalcs": 20,
"styleRecalcDurationMs": 73.13099999999997,
"layouts": 20,
"layoutDurationMs": 23.100999999999996,
"taskDurationMs": 8308.608,
"heapDeltaBytes": -17315540,
"heapUsedBytes": 259293484,
"domNodes": -3330,
"jsHeapTotalBytes": 17551360,
"scriptDurationMs": 154.554,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 49.41345029239766,
"p95FrameDurationMs": 100
},
{
"name": "vue-zoom-out-idle",
"durationMs": 11496.984999999995,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11215.083,
"heapDeltaBytes": 4515244,
"heapUsedBytes": 275056776,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 159.04000000000008,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 39.24744027303754,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-zoom-out-idle",
"durationMs": 11433.944999999994,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11166.231999999998,
"heapDeltaBytes": -8836508,
"heapUsedBytes": 262273024,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 154.94699999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 38.49427609427609,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "workflow-execution",
"durationMs": 137.9389999999603,
"styleRecalcs": 10,
"styleRecalcDurationMs": 12.41,
"layouts": 8,
"layoutDurationMs": 3.5129999999999995,
"taskDurationMs": 102.523,
"heapDeltaBytes": 4602616,
"heapUsedBytes": 76832684,
"domNodes": 118,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 12.181000000000001,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.662499999999966,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 132.3579999999538,
"styleRecalcs": 9,
"styleRecalcDurationMs": 10.792,
"layouts": 8,
"layoutDurationMs": 3.894,
"taskDurationMs": 104.06,
"heapDeltaBytes": -10759000,
"heapUsedBytes": 69010800,
"domNodes": 117,
"jsHeapTotalBytes": 9437184,
"scriptDurationMs": 6.430999999999999,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 453.728999999953,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.31,
"layouts": 76,
"layoutDurationMs": 14.569,
"taskDurationMs": 398.554,
"heapDeltaBytes": -14325120,
"heapUsedBytes": 81545080,
"domNodes": 4,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 189.51299999999998,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 536.4319999999907,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.0610000000000002,
"layouts": 76,
"layoutDurationMs": 14.642999999999999,
"taskDurationMs": 486.46500000000003,
"heapDeltaBytes": -20659288,
"heapUsedBytes": 71803784,
"domNodes": 4,
"jsHeapTotalBytes": 12320768,
"scriptDurationMs": 237.18699999999998,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665624999999977,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 641.9700000000148,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.039,
"layouts": 76,
"layoutDurationMs": 15.791,
"taskDurationMs": 593.437,
"heapDeltaBytes": 1015704,
"heapUsedBytes": 132492260,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 250.413,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.668421052631594,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 539.9669999999333,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.8339999999999999,
"layouts": 76,
"layoutDurationMs": 14.894,
"taskDurationMs": 502.21000000000004,
"heapDeltaBytes": 412900,
"heapUsedBytes": 119126440,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 209.406,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
}
]
}🔬 E2E CoverageLine coverage: 64.7% Coverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 2287 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 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 🌾 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 2d0fbff2b420b14cecfa02178528ef33a0318a38
Full docs: ADR-DEVEX-LINT-0015 |
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.57 #21850 +/- ##
==========================================
Coverage 84.04% 84.04%
==========================================
Files 3000 3001 +1
Lines 159495 159522 +27
Branches 40774 40781 +7
==========================================
+ Hits 134045 134072 +27
Misses 25060 25060
Partials 390 390
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 10 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 4 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 1 |
| 🟢 Low | 2 |
| ⚪ Nit | 1 |
Panel: 6/6 reviewers contributed findings.
|
Holding this until comfyanonymous tags Monday's ComfyUI stable on frontend 1.57.3. Please don't approve it before then: approved backports to |
Full context for agent readers
|
There was a problem hiding this comment.
Verdict: faithful backport of #21321; approval is pending required CI on the updated live head.
I reviewed 41ce8f08, which supersedes the head in the review brief, against merged source 42f00b3f, verified on current main. The target lacks the extracted touchPointerGuards module, so its change stays in the existing inline wrapper and the tests retain import-time registration. The pinch helper is identical, and all missing-canvas regression cases are carried. The tracer adds the same outcome field/getter/assignment without introducing the source parent's timeout-reporting field, absent on 1.57. The other source hunks match. I found no dropped behavior or tests.
With core/1.57's own dependencies, all 25 tests across the four affected suites pass; changed-source ESLint and whitespace checks pass. I verified the release-hold condition has passed: ComfyUI's v0.43.0 tag exists and pins frontend 1.57.4. However, CI restarted for the updated head: lint-and-format has passed, but required test and e2e-status have not reported success. I am withholding approval only for incomplete required CI.
…as and report why (#22278) Backport of #21321 to `core/1.58`. The auto-backport hit cherry-pick conflicts. - Touch handlers no longer crash when `app.canvas` is missing, and they report why. - A throwing first frame no longer aborts `LGraphCanvas` construction. - The diff is the same as the reviewed 1.57 carriers (#21850 and #21851), since `simpleTouchSupport.ts` matches between 1.57 and 1.58. <details><summary>Full context for agent readers</summary> Built by cherry-picking the core/1.57 carrier's resolution onto `core/1.58`. The only conflict was `bootstrapTracer.ts`, where both `_timeoutReported` (already on 1.58) and the new `_outcome` field are kept. Local checks: the touch, startRendering and bootstrapTracer suites pass (30 tests), and `pnpm typecheck` is clean. The AI co-author trailer from the source squash is dropped from this commit. Follow-up #22273 (render loop recovery, pinch scale guard, timed_out outcome) will be backported here after it merges. </details> Part of https://linear.app/comfyorg/issue/FRONT-3716 Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
…vas and report why (#22279) Backport of #21321 to `cloud/1.58`. The auto-backport hit cherry-pick conflicts. - Touch handlers no longer crash when `app.canvas` is missing, and they report why. - A throwing first frame no longer aborts `LGraphCanvas` construction. - The diff is the same as the reviewed 1.57 carriers (#21850 and #21851), since `simpleTouchSupport.ts` matches between 1.57 and 1.58. <details><summary>Full context for agent readers</summary> Built by cherry-picking the core/1.57 carrier's resolution onto `cloud/1.58`. The only conflict was `bootstrapTracer.ts`, where both `_timeoutReported` (already on 1.58) and the new `_outcome` field are kept. Local checks: the touch, startRendering and bootstrapTracer suites pass (30 tests), and `pnpm typecheck` is clean. The AI co-author trailer from the source squash is dropped from this commit. Follow-up #22273 (render loop recovery, pinch scale guard, timed_out outcome) will be backported here after it merges. </details> Part of https://linear.app/comfyorg/issue/FRONT-3716 Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
…22273) Follow-up to Comfy-Org#21321, from review findings on its backports Comfy-Org#21850 and Comfy-Org#21851. - **The canvas keeps rendering after a frame throws.** Comfy-Org#21321 caught a throwing first frame so the `LGraphCanvas` constructor could finish, but it also stopped the render loop, so the canvas stayed frozen for the rest of the session. Now any frame that throws is reported (each distinct error once). The 2D context is reset to its DPR base transform, both canvases are redrawn, and the loop continues. After 60 failed drawing frames with no successful draw in between, the loop stops, reports `error_rendering_canvas_stopped` and can be restarted. - **Pinch zoom no longer writes NaN, 0 or Infinity into the viewport.** This happened when two fingers touched the same point. A pinch that starts that way now measures from the first move where the fingers are at least 8px apart. - **`bootstrapTracer.outcome` reads `timed_out` after the watchdog fires,** not `pending`, so the missing-canvas report can tell a hung startup from one that is still loading. <details><summary>Full context for agent readers</summary> **Tests, red first.** On `main` these failed: - `is_rendering` was false after a throwing first frame, and no frame was scheduled. - A persistently throwing draw escaped on frame 2 and left `is_rendering` stuck at true. - A same-point pinch changed the viewport. - `outcome` stayed `pending` after the watchdog fired. They pass with this PR. Local results: - `vitest run src/extensions/core src/lib/litegraph/src/LGraphCanvas* src/platform/telemetry/perf`: 1793 passed. - `pnpm typecheck`, oxlint and eslint are clean. - The pre-push hooks pass: depcruise, knip and the fallow audit. **Review rounds.** CodeRabbit and Cursor review findings on the first heads are addressed in 8014af1: context reset, dirty marking, failure counting that ignores idle frames, an outer guard on the first frame, the 8px pinch threshold, no inline comments, and a later-frame failure test. **Adversarial review.** A fresh Claude reviewer ran on the first push (Codex is unavailable on this host). Its HIGH finding: a persistent failure still killed the loop on frame 2, and `is_rendering` stayed stuck. This push addresses that with the bounded retry, frame-level tests and stronger pinch assertions. **Also changed:** - The touchmove pinch branch moved into `handlePinchMove`, to stay under the complexity gate. - The test no longer imports `@/scripts/app`, which was a boundary-rule violation. **Not changed.** The `canvasOrReport('processMouseDown')` false-positive finding on the backports does not apply to `main`, which has no processMouseDown wrapper in `simpleTouchSupport.ts`. **Backports.** Labels are set for 1.57, 1.58 and 1.59. The 1.57 and 1.58 lines need the Comfy-Org#21321 carriers first; 1.59 already has Comfy-Org#21321. </details> Part of https://linear.app/comfyorg/issue/FRONT-3716
Backport of #21321 to
core/1.57after the automatic carrier conflicted.The target predates the extraction of
touchPointerGuards.ts, so the resolution keeps the target’s inline pointer guards while applying the source behavior: pinch handlers fail closed throughcanvasOrReport,processMouseDownuses its receiver’s pointer, initial render failures are reported without aborting construction, and bootstrap outcome is exposed for diagnostics. No deleted helper was resurrected.Verification: the four focused Vitest files pass (25 tests); targeted ESLint has no errors; targeted formatting passes. Source commit:
42f00b3f1b33d42b8da10b3fbdcd47a97fcbc8a8.