Repository navigation
[backport cloud/1.57] fix: guard touch handlers against a missing canvas and report why - #21851
christian-byrne wants to merge 3 commits 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
|
📦 Bundle Size
⚡ Performance Report
Scenario timings
Absolute values
Raw data{
"timestamp": "2026-10-29T19:04:09.960Z",
"gitSha": "11739c5a60562a06e14c2a25ca7456e8ca4927b7",
"branch": "backport-21321-to-cloud-1.57",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2023.1850000000122,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.8920000000000003,
"layouts": 9,
"layoutDurationMs": 2.9319999999999995,
"taskDurationMs": 610.514,
"heapDeltaBytes": -889208,
"heapUsedBytes": 74036956,
"domNodes": 0,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 12.980000000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66528925619835,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2010.1300000000037,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.023999999999999,
"layouts": 9,
"layoutDurationMs": 3.064,
"taskDurationMs": 454.03099999999995,
"heapDeltaBytes": 22113252,
"heapUsedBytes": 88183248,
"domNodes": 0,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 13.271999999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1836.9450000000143,
"styleRecalcs": 77,
"styleRecalcDurationMs": 16.375,
"layouts": 8,
"layoutDurationMs": 2.659,
"taskDurationMs": 976.099,
"heapDeltaBytes": -7289764,
"heapUsedBytes": 68081468,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 164.472,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665454545454548,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1849.715999999944,
"styleRecalcs": 54,
"styleRecalcDurationMs": 19.860000000000003,
"layouts": 9,
"layoutDurationMs": 6.014,
"taskDurationMs": 995.2129999999999,
"heapDeltaBytes": -8221336,
"heapUsedBytes": 67276892,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 160.95399999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666667,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1739.2830000000004,
"styleRecalcs": 19,
"styleRecalcDurationMs": 6.505000000000001,
"layouts": 12,
"layoutDurationMs": 3.529,
"taskDurationMs": 477.10200000000003,
"heapDeltaBytes": -221912,
"heapUsedBytes": 74992676,
"domNodes": 47,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 15.723,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846156,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1707.1339999999964,
"styleRecalcs": 19,
"styleRecalcDurationMs": 5.95,
"layouts": 12,
"layoutDurationMs": 4.069999999999999,
"taskDurationMs": 456.34000000000003,
"heapDeltaBytes": -4095700,
"heapUsedBytes": 71256144,
"domNodes": 47,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 15.083000000000002,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 761.1610000000155,
"styleRecalcs": 13,
"styleRecalcDurationMs": 2.648,
"layouts": 8,
"layoutDurationMs": 2.1919999999999993,
"taskDurationMs": 551.886,
"heapDeltaBytes": 3542584,
"heapUsedBytes": 79348680,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 174.094,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.04318181818182,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 743.6250000000655,
"styleRecalcs": 14,
"styleRecalcDurationMs": 2.8019999999999996,
"layouts": 9,
"layoutDurationMs": 2.654,
"taskDurationMs": 539.3140000000001,
"heapDeltaBytes": 7012484,
"heapUsedBytes": 82100388,
"domNodes": 0,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 178.22700000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665909090909096,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1371.4200000000005,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1092.523,
"heapDeltaBytes": 658520,
"heapUsedBytes": 81393444,
"domNodes": -192,
"jsHeapTotalBytes": 12591104,
"scriptDurationMs": 64.713,
"eventListeners": -106,
"totalBlockingTimeMs": 666,
"frameDurationMs": 35.96315789473685,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1242.0309999999972,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 968.6,
"heapDeltaBytes": -3739296,
"heapUsedBytes": 81229256,
"domNodes": -212,
"jsHeapTotalBytes": 12591104,
"scriptDurationMs": 61.54900000000001,
"eventListeners": -106,
"totalBlockingTimeMs": 547,
"frameDurationMs": 33.33243243243244,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 842.7959999999644,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 453.7739999999992,
"heapDeltaBytes": -4472580,
"heapUsedBytes": 76909188,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 149.59699999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 183,
"frameDurationMs": 23.805714285714256,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 808.2010000000537,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 471.2500000000004,
"heapDeltaBytes": -4746632,
"heapUsedBytes": 75204064,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 138.196,
"eventListeners": 0,
"totalBlockingTimeMs": 187,
"frameDurationMs": 24.017647058823542,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "extension-clean-combined-draw",
"durationMs": 12358.055000000008,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11352.904,
"heapDeltaBytes": -15423456,
"heapUsedBytes": 73437840,
"domNodes": -258,
"jsHeapTotalBytes": 10612736,
"scriptDurationMs": 9065.369,
"eventListeners": -68,
"totalBlockingTimeMs": 1514,
"frameDurationMs": 33.197580645161295,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "extension-clean-combined-draw",
"durationMs": 9606.746000000043,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8696.01,
"heapDeltaBytes": -21717424,
"heapUsedBytes": 78844936,
"domNodes": -278,
"jsHeapTotalBytes": 10350592,
"scriptDurationMs": 6761.454000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 391,
"frameDurationMs": 31.682178217821786,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10212.773,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.07200000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9359.404,
"heapDeltaBytes": -14701220,
"heapUsedBytes": 84662448,
"domNodes": -258,
"jsHeapTotalBytes": 8777728,
"scriptDurationMs": 7300.968,
"eventListeners": -68,
"totalBlockingTimeMs": 534,
"frameDurationMs": 31.532098765432096,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 9313.003999999979,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.03799999999999984,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8458.58,
"heapDeltaBytes": 14265984,
"heapUsedBytes": 102064052,
"domNodes": -258,
"jsHeapTotalBytes": 3796992,
"scriptDurationMs": 6562.294,
"eventListeners": -68,
"totalBlockingTimeMs": 195,
"frameDurationMs": 29.998709677419356,
"p95FrameDurationMs": 50
},
{
"name": "large-combo-open",
"durationMs": 239.1709999999989,
"styleRecalcs": 23,
"styleRecalcDurationMs": 18.648999999999997,
"layouts": 11,
"layoutDurationMs": 3.6049999999999995,
"taskDurationMs": 190.702,
"heapDeltaBytes": -7566392,
"heapUsedBytes": 79886420,
"domNodes": 917,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 11.398,
"eventListeners": 196,
"totalBlockingTimeMs": 6,
"frameDurationMs": 24.990000000000055,
"p95FrameDurationMs": 100
},
{
"name": "large-combo-open",
"durationMs": 235.81400000000485,
"styleRecalcs": 25,
"styleRecalcDurationMs": 15.911000000000001,
"layouts": 11,
"layoutDurationMs": 3.4830000000000005,
"taskDurationMs": 181.201,
"heapDeltaBytes": -8190128,
"heapUsedBytes": 79142164,
"domNodes": 917,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 10.331,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.199999999999985,
"p95FrameDurationMs": 66.60000000000036
},
{
"name": "large-graph-idle",
"durationMs": 2051.243999999997,
"styleRecalcs": 6,
"styleRecalcDurationMs": 2.165,
"layouts": 6,
"layoutDurationMs": 2.26,
"taskDurationMs": 741.0110000000001,
"heapDeltaBytes": -3153216,
"heapUsedBytes": 76098724,
"domNodes": -258,
"jsHeapTotalBytes": 3534848,
"scriptDurationMs": 37.028,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2056.5350000000535,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.535,
"layouts": 8,
"layoutDurationMs": 2.683,
"taskDurationMs": 738.5720000000001,
"heapDeltaBytes": -21609552,
"heapUsedBytes": 75554272,
"domNodes": -258,
"jsHeapTotalBytes": 3309568,
"scriptDurationMs": 36.086,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 3018.201000000033,
"styleRecalcs": 67,
"styleRecalcDurationMs": 6.523000000000001,
"layouts": 6,
"layoutDurationMs": 2.0319999999999996,
"taskDurationMs": 1930.713,
"heapDeltaBytes": -6268276,
"heapUsedBytes": 92262936,
"domNodes": -278,
"jsHeapTotalBytes": 6156288,
"scriptDurationMs": 888.243,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665555555555557,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2369.2290000000185,
"styleRecalcs": 67,
"styleRecalcDurationMs": 6.157,
"layouts": 6,
"layoutDurationMs": 1.8360000000000003,
"taskDurationMs": 1654.2910000000002,
"heapDeltaBytes": -12335864,
"heapUsedBytes": 68470804,
"domNodes": -258,
"jsHeapTotalBytes": 4059136,
"scriptDurationMs": 842.65,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.785000000000004,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 4070.4470000000015,
"styleRecalcs": 71,
"styleRecalcDurationMs": 8.139999999999999,
"layouts": 64,
"layoutDurationMs": 11.82,
"taskDurationMs": 2046.6519999999998,
"heapDeltaBytes": -32206612,
"heapUsedBytes": 67595348,
"domNodes": -254,
"jsHeapTotalBytes": 4620288,
"scriptDurationMs": 865.262,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.734567901234566,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3635.61100000004,
"styleRecalcs": 70,
"styleRecalcDurationMs": 7.887999999999999,
"layouts": 64,
"layoutDurationMs": 11.370999999999999,
"taskDurationMs": 1656.107,
"heapDeltaBytes": 822292,
"heapUsedBytes": 83399564,
"domNodes": 24,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 790.6700000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.742857142857144,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3337.013000000013,
"styleRecalcs": 43,
"styleRecalcDurationMs": 4.926000000000002,
"layouts": 3,
"layoutDurationMs": 0.8199999999999995,
"taskDurationMs": 2294.5099999999998,
"heapDeltaBytes": 14340816,
"heapUsedBytes": 92947232,
"domNodes": -258,
"jsHeapTotalBytes": 5263360,
"scriptDurationMs": 1075.395,
"eventListeners": -59,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.006122448979593,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 3239.616000000069,
"styleRecalcs": 44,
"styleRecalcDurationMs": 5.1419999999999995,
"layouts": 4,
"layoutDurationMs": 1.4340000000000004,
"taskDurationMs": 2116.2839999999997,
"heapDeltaBytes": 892196,
"heapUsedBytes": 83967932,
"domNodes": 0,
"jsHeapTotalBytes": 6574080,
"scriptDurationMs": 990.275,
"eventListeners": -65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.75284974093264,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2068.588000000034,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.5589999999999997,
"layouts": 6,
"layoutDurationMs": 2.226,
"taskDurationMs": 775.8499999999999,
"heapDeltaBytes": -27037060,
"heapUsedBytes": 72144560,
"domNodes": -278,
"jsHeapTotalBytes": 2785280,
"scriptDurationMs": 43.611,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66532258064516,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2047.4249999999756,
"styleRecalcs": 6,
"styleRecalcDurationMs": 1.8400000000000005,
"layouts": 6,
"layoutDurationMs": 2.077,
"taskDurationMs": 540.2139999999999,
"heapDeltaBytes": -2166020,
"heapUsedBytes": 79610696,
"domNodes": -258,
"jsHeapTotalBytes": 3534848,
"scriptDurationMs": 34.767,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665040650406507,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 736.1369999999852,
"styleRecalcs": 45,
"styleRecalcDurationMs": 5.122,
"layouts": 7,
"layoutDurationMs": 2.099,
"taskDurationMs": 511.47900000000004,
"heapDeltaBytes": 21634792,
"heapUsedBytes": 89340336,
"domNodes": 0,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 155.47,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665909090909096,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 675.322000000051,
"styleRecalcs": 48,
"styleRecalcDurationMs": 5.859999999999999,
"layouts": 11,
"layoutDurationMs": 3.3240000000000003,
"taskDurationMs": 466.19899999999996,
"heapDeltaBytes": -1097080,
"heapUsedBytes": 76872260,
"domNodes": 0,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 144.64300000000003,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853658,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2038.9260000000036,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.0940000000000003,
"layouts": 9,
"layoutDurationMs": 3.4400000000000004,
"taskDurationMs": 616.572,
"heapDeltaBytes": -228992,
"heapUsedBytes": 76761664,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 12.054999999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666393442622947,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2022.4120000000312,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.5269999999999997,
"layouts": 8,
"layoutDurationMs": 2.514,
"taskDurationMs": 583.92,
"heapDeltaBytes": 22417868,
"heapUsedBytes": 89761216,
"domNodes": 0,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 12.543,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 2011.049000000014,
"styleRecalcs": 87,
"styleRecalcDurationMs": 17.964000000000002,
"layouts": 9,
"layoutDurationMs": 2.5189999999999997,
"taskDurationMs": 1198.6200000000001,
"heapDeltaBytes": -11360784,
"heapUsedBytes": 65969080,
"domNodes": 0,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 123.54399999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1992.3420000000078,
"styleRecalcs": 89,
"styleRecalcDurationMs": 17.361,
"layouts": 10,
"layoutDurationMs": 3.194,
"taskDurationMs": 1109.2530000000002,
"heapDeltaBytes": -11386552,
"heapUsedBytes": 66535864,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 113.731,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665546218487396,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-transition-enter",
"durationMs": 1435.0839999999607,
"styleRecalcs": 19,
"styleRecalcDurationMs": 24.261,
"layouts": 5,
"layoutDurationMs": 14.016,
"taskDurationMs": 1054.6540000000002,
"heapDeltaBytes": 7525880,
"heapUsedBytes": 100142464,
"domNodes": 15953,
"jsHeapTotalBytes": 17702912,
"scriptDurationMs": 30.246999999999996,
"eventListeners": 3244,
"totalBlockingTimeMs": 159,
"frameDurationMs": 19.86027397260274,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8661.676,
"styleRecalcs": 251,
"styleRecalcDurationMs": 21.103000000000005,
"layouts": 9,
"layoutDurationMs": 3.104,
"taskDurationMs": 5856.942,
"heapDeltaBytes": 5367688,
"heapUsedBytes": 84479820,
"domNodes": -258,
"jsHeapTotalBytes": 3989504,
"scriptDurationMs": 2858.721,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.698262548262548,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8952.87099999996,
"styleRecalcs": 250,
"styleRecalcDurationMs": 19.438,
"layouts": 8,
"layoutDurationMs": 2.0860000000000003,
"taskDurationMs": 6424.361,
"heapDeltaBytes": -17772392,
"heapUsedBytes": 79649956,
"domNodes": -258,
"jsHeapTotalBytes": 5894144,
"scriptDurationMs": 2827.395,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.759550561797752,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 21137.781000000017,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20834.938000000002,
"heapDeltaBytes": -8724168,
"heapUsedBytes": 269084596,
"domNodes": -3330,
"jsHeapTotalBytes": 14409728,
"scriptDurationMs": 315.64599999999996,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 37.86350626118068,
"p95FrameDurationMs": 66.80000000000109
},
{
"name": "vue-large-graph-idle",
"durationMs": 20909.719999999994,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20399.396000000004,
"heapDeltaBytes": -15400408,
"heapUsedBytes": 265061948,
"domNodes": -3330,
"jsHeapTotalBytes": 13357056,
"scriptDurationMs": 286.66999999999996,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 38.167335766423356,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-large-graph-pan",
"durationMs": 26147.172000000013,
"styleRecalcs": 181,
"styleRecalcDurationMs": 20.808999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 25846.11,
"heapDeltaBytes": -27921616,
"heapUsedBytes": 273054232,
"domNodes": -3330,
"jsHeapTotalBytes": 5754880,
"scriptDurationMs": 966.367,
"eventListeners": -651,
"totalBlockingTimeMs": 16,
"frameDurationMs": 49.24482109227871,
"p95FrameDurationMs": 100
},
{
"name": "vue-large-graph-pan",
"durationMs": 17350.062999999976,
"styleRecalcs": 125,
"styleRecalcDurationMs": 11.879000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17086.536000000004,
"heapDeltaBytes": -21640596,
"heapUsedBytes": 274681160,
"domNodes": -3330,
"jsHeapTotalBytes": 18075648,
"scriptDurationMs": 797.6139999999999,
"eventListeners": -651,
"totalBlockingTimeMs": 23,
"frameDurationMs": 33.046285714285716,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-node-resize-workload",
"durationMs": 7597.017999999991,
"styleRecalcs": 20,
"styleRecalcDurationMs": 66.219,
"layouts": 20,
"layoutDurationMs": 24.49,
"taskDurationMs": 7494.831,
"heapDeltaBytes": -22716324,
"heapUsedBytes": 272470840,
"domNodes": -307,
"jsHeapTotalBytes": 17027072,
"scriptDurationMs": 121.525,
"eventListeners": -7,
"totalBlockingTimeMs": 0,
"frameDurationMs": 43.83236994219653,
"p95FrameDurationMs": 83.39999999999964
},
{
"name": "vue-node-resize-workload",
"durationMs": 7615.981000000033,
"styleRecalcs": 20,
"styleRecalcDurationMs": 70.28500000000001,
"layouts": 20,
"layoutDurationMs": 26.069999999999997,
"taskDurationMs": 7549.133000000002,
"heapDeltaBytes": -2712404,
"heapUsedBytes": 273686604,
"domNodes": -3330,
"jsHeapTotalBytes": 17813504,
"scriptDurationMs": 130.12099999999998,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 43.77241379310345,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6899.997000000041,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6471.353000000001,
"heapDeltaBytes": -6262600,
"heapUsedBytes": 250914196,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 106.80999999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 24.124825174825176,
"p95FrameDurationMs": 49.900000000001455
},
{
"name": "vue-zoom-out-idle",
"durationMs": 10410.315000000082,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10257.985999999999,
"heapDeltaBytes": 4239184,
"heapUsedBytes": 277925508,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 141.96399999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 37.20071428571429,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "workflow-execution",
"durationMs": 176.82600000000548,
"styleRecalcs": 12,
"styleRecalcDurationMs": 15.634000000000002,
"layouts": 9,
"layoutDurationMs": 4.397999999999999,
"taskDurationMs": 135.41500000000002,
"heapDeltaBytes": -15007940,
"heapUsedBytes": 68371504,
"domNodes": 99,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 14.605,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.511111111111102,
"p95FrameDurationMs": 33.30000000000018
},
{
"name": "workflow-execution",
"durationMs": 137.84799999996267,
"styleRecalcs": 10,
"styleRecalcDurationMs": 12.042999999999997,
"layouts": 10,
"layoutDurationMs": 4.236999999999999,
"taskDurationMs": 95.858,
"heapDeltaBytes": 4472744,
"heapUsedBytes": 77708236,
"domNodes": 117,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 7.350000000000002,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.662500000000023,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 608.1590000000006,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.442,
"layouts": 76,
"layoutDurationMs": 20.447,
"taskDurationMs": 550.2360000000001,
"heapDeltaBytes": 12329892,
"heapUsedBytes": 84782312,
"domNodes": 4,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 251.39000000000001,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66486486486485,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 517.2049999999899,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.014,
"layouts": 76,
"layoutDurationMs": 17.958,
"taskDurationMs": 473.164,
"heapDeltaBytes": 11441852,
"heapUsedBytes": 103067476,
"domNodes": 4,
"jsHeapTotalBytes": 11796480,
"scriptDurationMs": 215.919,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.662499999999994,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 719.9659999999994,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.4589999999999996,
"layouts": 76,
"layoutDurationMs": 20.162,
"taskDurationMs": 677.301,
"heapDeltaBytes": 1728540,
"heapUsedBytes": 133196596,
"domNodes": 4,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 275.224,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665116279069775,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 659.1679999999087,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.518,
"layouts": 76,
"layoutDurationMs": 20.145,
"taskDurationMs": 616.992,
"heapDeltaBytes": 1019992,
"heapUsedBytes": 120496532,
"domNodes": 4,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 243.199,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E CoverageLine coverage: 64.4% Coverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 2284 passed, 0 failed · 1 flaky📊 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 a5029907fcc0fefb74c215642f65b30da870efed
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.
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 6 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 1 |
| 🟢 Low | 4 |
| ⚪ Nit | 1 |
Panel: 6/6 reviewers contributed findings.
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## cloud/1.57 #21851 +/- ##
=============================================
Coverage ? 84.08%
=============================================
Files ? 3017
Lines ? 160302
Branches ? 38655
=============================================
Hits ? 134796
Misses ? 25116
Partials ? 390
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Full context for agent readers
|
…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>
|
Closing: cloud.comfy.org now serves cloud/1.58, so cloud/1.57 won't be redeployed. |
…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
…rst frame (#22656) Backport of #22273. The auto-backport hit cherry-pick conflicts. - After a failed first frame, the canvas keeps drawing instead of staying frozen for the session. - A pinch with two fingers on the same point no longer breaks the zoom. - The startup tracer records the first-frame outcome. This line predates the touch-support refactor on main (`touchGesture`, the exported extension), so the port was done by hand: - `LGraphCanvas.ts`: the changed lines match #22273 exactly; only the placement of `MAX_FAILED_FRAMES` conflicted. - `simpleTouchSupport.ts`: same `handlePinchMove` and `MIN_PINCH_DISTANCE` guard as main, using this line's module-level `touchZooming` flag. - `simpleTouchSupport.test.ts`: this line's test file, with the viewport mock hoisted so the four pinch-zoom tests from #22273 can read it. - `LGraphCanvas.startRendering.test.ts`: main's tests, importing `reportError` from `@/platform/telemetry/reportError` and mocking it in the file (this line predates #22135 and #22018). Local checks: the touch, startRendering and bootstrapTracer suites pass (43 tests). Without the source changes, 14 of them fail. Lint, format and `typecheck:app` passed in the commit hooks on this branch. Extra 1.57 change: this line's tracer has no `_timeoutReported` flag, so the port adds it and sets it when the watchdog reports `timed_out`. That is what lets `outcome` read `timed_out`. Nothing else in the watchdog changes. Not backported to `cloud/1.57`: cloud no longer deploys that line (same reason #21851 was closed).
Summary
Backports #21321 to
cloud/1.57.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(30 passed)oxfmt --check: passedSource commit:
42f00b3f1b33d42b8da10b3fbdcd47a97fcbc8a8