Repository navigation
fix: avoid TDZ crash restoring saved multiline widget value - #18324
Conversation
Loading a workflow with a previously saved value for a multiline STRING widget restores that value synchronously during node.addDOMWidget(), before the outer widget binding in useStringWidget.ts is initialized. This test simulates that restore path and currently fails with a ReferenceError.
setValue closed over the outer widget const to read widget.options, but addDOMWidget can call setValue synchronously (restoring a saved value while loading a workflow) before that const is initialized, throwing a ReferenceError. Hoist the options object into its own widgetOptions const declared before addDOMWidget is called, and reference that instead of widget.options, so setValue no longer depends on the outer binding.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🌾 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 1585418a9389d101da22911b938b4ab8e0e7812b
Full docs: ADR-DEVEX-LINT-0015 🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 2073 passed, 0 failed · 2 flaky📊 Browser Reports
📦 Bundle: 9.96 MB gzip 🟢 -645 BDetailsSummary
Category Glance App Entry Points — 3.87 kB (baseline 3.87 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.46 MB (baseline 1.46 MB) • 🟢 -728 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 132 kB (baseline 132 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 14 added / 14 removed / 4 unchanged Panels & Settings — 639 kB (baseline 639 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 18 unchanged User & Accounts — 37.9 kB (baseline 37.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 5 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 123 kB (baseline 123 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed / 9 unchanged Data & Services — 3.88 MB (baseline 3.88 MB) • 🟢 -1.25 kBStores, services, APIs, and repositories
Status: 13 added / 13 removed / 3 unchanged Utilities & Hooks — 577 kB (baseline 577 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 19 added / 19 removed / 19 unchanged Vendor & Third-Party — 17.4 MB (baseline 17.4 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 17.8 MB (baseline 17.8 MB) • 🟢 -2 BBundles that do not match a named category
Status: 74 added / 74 removed / 228 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-22T02:10:08.936Z",
"gitSha": "48c6d2dfdaab39ae5c65d5dce8a794e70e2a24d4",
"branch": "fix/usestringwidget-tdz-setvalue",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2021.1849999999458,
"styleRecalcs": 8,
"styleRecalcDurationMs": 9.322000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 601.727,
"heapDeltaBytes": 16746656,
"heapUsedBytes": 77933160,
"domNodes": -262,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 14.024000000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2023.8150000000132,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.578,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 592.051,
"heapDeltaBytes": 17625200,
"heapUsedBytes": 79319932,
"domNodes": -260,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 14.681000000000003,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1876.184999999964,
"styleRecalcs": 77,
"styleRecalcDurationMs": 35.154,
"layouts": 14,
"layoutDurationMs": 4.875,
"taskDurationMs": 892.79,
"heapDeltaBytes": 17888468,
"heapUsedBytes": 80046176,
"domNodes": -262,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 184.415,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1858.9070000000447,
"styleRecalcs": 76,
"styleRecalcDurationMs": 33.734,
"layouts": 14,
"layoutDurationMs": 4.702000000000001,
"taskDurationMs": 897.2689999999999,
"heapDeltaBytes": 13381776,
"heapUsedBytes": 80654084,
"domNodes": -263,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 179.25000000000003,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1725.8249999999862,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.046000000000003,
"layouts": 6,
"layoutDurationMs": 1.439,
"taskDurationMs": 435.494,
"heapDeltaBytes": 2361276,
"heapUsedBytes": 63622804,
"domNodes": 73,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 16.605,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1679.3840000000273,
"styleRecalcs": 30,
"styleRecalcDurationMs": 17.73,
"layouts": 6,
"layoutDurationMs": 1.2349999999999999,
"taskDurationMs": 431.70000000000005,
"heapDeltaBytes": 2157464,
"heapUsedBytes": 64194672,
"domNodes": 76,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 16.779,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 710.1940000000013,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.102999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 472.501,
"heapDeltaBytes": 19015664,
"heapUsedBytes": 79931416,
"domNodes": 14,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 188.10299999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 732.7119999999923,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.065000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 504.84499999999997,
"heapDeltaBytes": 18830624,
"heapUsedBytes": 80062116,
"domNodes": 16,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 181.638,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1318.6510000000453,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1030.537,
"heapDeltaBytes": 32203644,
"heapUsedBytes": 101846156,
"domNodes": 0,
"jsHeapTotalBytes": 19034112,
"scriptDurationMs": 73.193,
"eventListeners": 0,
"totalBlockingTimeMs": 691,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1408.2779999999957,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1131.453,
"heapDeltaBytes": 8727188,
"heapUsedBytes": 95019924,
"domNodes": -298,
"jsHeapTotalBytes": 22958080,
"scriptDurationMs": 77.20100000000001,
"eventListeners": -195,
"totalBlockingTimeMs": 776,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 868.7919999999849,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 535.99,
"heapDeltaBytes": 14306756,
"heapUsedBytes": 90627804,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 181.97900000000007,
"eventListeners": 0,
"totalBlockingTimeMs": 244,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 888.1069999999909,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 544.1659999999997,
"heapDeltaBytes": 14190392,
"heapUsedBytes": 88989008,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 189.24200000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 245,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11969.68800000002,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10948.154,
"heapDeltaBytes": 2497492,
"heapUsedBytes": 84254504,
"domNodes": -14,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 8999.034,
"eventListeners": 0,
"totalBlockingTimeMs": 1845,
"frameDurationMs": 20,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11473.300999999992,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10530.557,
"heapDeltaBytes": -9267940,
"heapUsedBytes": 72900704,
"domNodes": -18,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 8642.977,
"eventListeners": 0,
"totalBlockingTimeMs": 1654,
"frameDurationMs": 20.553333333333285,
"p95FrameDurationMs": 50.10000000000218
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 11665.474000000017,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10672.097000000002,
"heapDeltaBytes": 2455168,
"heapUsedBytes": 84090492,
"domNodes": -10,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 8771.988000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 1817,
"frameDurationMs": 18.889999999999905,
"p95FrameDurationMs": 50
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 12350.161999999955,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11378.757,
"heapDeltaBytes": 19538040,
"heapUsedBytes": 95736020,
"domNodes": -12,
"jsHeapTotalBytes": 12058624,
"scriptDurationMs": 9400.222,
"eventListeners": 0,
"totalBlockingTimeMs": 2329,
"frameDurationMs": 18.886666666666738,
"p95FrameDurationMs": 49.900000000001455
},
{
"name": "large-graph-idle",
"durationMs": 2031.8749999999,
"styleRecalcs": 6,
"styleRecalcDurationMs": 6.437000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 763.486,
"heapDeltaBytes": 2525664,
"heapUsedBytes": 82930896,
"domNodes": -247,
"jsHeapTotalBytes": -270336,
"scriptDurationMs": 42.135000000000005,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2045.39299999999,
"styleRecalcs": 6,
"styleRecalcDurationMs": 7.675000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 772.595,
"heapDeltaBytes": -610860,
"heapUsedBytes": 79697000,
"domNodes": -254,
"jsHeapTotalBytes": -532480,
"scriptDurationMs": 42.428999999999995,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 3100.642999999991,
"styleRecalcs": 62,
"styleRecalcDurationMs": 8.707000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1893.355,
"heapDeltaBytes": -14344,
"heapUsedBytes": 64565988,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 967.547,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2759.551999999985,
"styleRecalcs": 65,
"styleRecalcDurationMs": 14.63,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1711.737,
"heapDeltaBytes": 20213644,
"heapUsedBytes": 84164928,
"domNodes": -255,
"jsHeapTotalBytes": 1273856,
"scriptDurationMs": 947.119,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3966.173000000026,
"styleRecalcs": 60,
"styleRecalcDurationMs": 11.024,
"layouts": 60,
"layoutDurationMs": 14.773000000000001,
"taskDurationMs": 1836.0369999999998,
"heapDeltaBytes": 10088812,
"heapUsedBytes": 75047352,
"domNodes": -11,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 901.746,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3913.9819999998053,
"styleRecalcs": 61,
"styleRecalcDurationMs": 11.488999999999999,
"layouts": 60,
"layoutDurationMs": 13.937000000000001,
"taskDurationMs": 1915.1970000000001,
"heapDeltaBytes": 8207040,
"heapUsedBytes": 74086976,
"domNodes": -9,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 879.386,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3307.0120000000998,
"styleRecalcs": 40,
"styleRecalcDurationMs": 5.763000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2202.867,
"heapDeltaBytes": 507792,
"heapUsedBytes": 66762368,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 1142.13,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3312.5159999999596,
"styleRecalcs": 40,
"styleRecalcDurationMs": 5.446,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2218.9260000000004,
"heapDeltaBytes": 27686144,
"heapUsedBytes": 93745040,
"domNodes": 0,
"jsHeapTotalBytes": 679936,
"scriptDurationMs": 1143.5870000000002,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2029.7370000000683,
"styleRecalcs": 4,
"styleRecalcDurationMs": 4.491000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 580.1610000000002,
"heapDeltaBytes": -3635700,
"heapUsedBytes": 84439188,
"domNodes": -255,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 40.975999999999985,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 1993.9830000000711,
"styleRecalcs": 3,
"styleRecalcDurationMs": 2.701000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 719.702,
"heapDeltaBytes": 20170388,
"heapUsedBytes": 84221244,
"domNodes": -256,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 48.00099999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 744.1519999999855,
"styleRecalcs": 46,
"styleRecalcDurationMs": 12.318,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 470.85999999999996,
"heapDeltaBytes": 14067488,
"heapUsedBytes": 83855780,
"domNodes": 18,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 162.434,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 680.9200000000146,
"styleRecalcs": 46,
"styleRecalcDurationMs": 11.8,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 460.26800000000003,
"heapDeltaBytes": 13142220,
"heapUsedBytes": 76843468,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 155.579,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2040.0169999999207,
"styleRecalcs": 9,
"styleRecalcDurationMs": 10.089999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 594.98,
"heapDeltaBytes": 12671520,
"heapUsedBytes": 76320532,
"domNodes": -277,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 13.914,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2022.3270000000184,
"styleRecalcs": 11,
"styleRecalcDurationMs": 12.940999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 479.99199999999996,
"heapDeltaBytes": 6474420,
"heapUsedBytes": 76193520,
"domNodes": -276,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 13.455000000000002,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1792.459000000008,
"styleRecalcs": 77,
"styleRecalcDurationMs": 30.7,
"layouts": 18,
"layoutDurationMs": 6.2589999999999995,
"taskDurationMs": 901.3829999999999,
"heapDeltaBytes": 15429980,
"heapUsedBytes": 79108380,
"domNodes": -277,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 127.61600000000001,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1705.9709999999768,
"styleRecalcs": 77,
"styleRecalcDurationMs": 29.653,
"layouts": 18,
"layoutDurationMs": 5.599,
"taskDurationMs": 872.6949999999999,
"heapDeltaBytes": 16363528,
"heapUsedBytes": 80030720,
"domNodes": -278,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 122.72199999999998,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1449.824000000035,
"styleRecalcs": 18,
"styleRecalcDurationMs": 33.097,
"layouts": 5,
"layoutDurationMs": 14.607,
"taskDurationMs": 1065.3739999999998,
"heapDeltaBytes": -8142916,
"heapUsedBytes": 81388884,
"domNodes": 13667,
"jsHeapTotalBytes": 12058624,
"scriptDurationMs": 36.21200000000001,
"eventListeners": 2383,
"totalBlockingTimeMs": 180,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 10405.01800000004,
"styleRecalcs": 245,
"styleRecalcDurationMs": 37.464999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6778.74,
"heapDeltaBytes": 3313164,
"heapUsedBytes": 84728900,
"domNodes": -252,
"jsHeapTotalBytes": 221184,
"scriptDurationMs": 3152.5019999999995,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000073,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 10433.014999999841,
"styleRecalcs": 245,
"styleRecalcDurationMs": 38.382,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6772.111,
"heapDeltaBytes": -605072,
"heapUsedBytes": 80403096,
"domNodes": -256,
"jsHeapTotalBytes": 221184,
"scriptDurationMs": 3185.9480000000003,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999952,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 17839.197999999895,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17468.655000000002,
"heapDeltaBytes": -40843676,
"heapUsedBytes": 181751960,
"domNodes": -8061,
"jsHeapTotalBytes": -19517440,
"scriptDurationMs": 336.901,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 13767.847000000074,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13365.978000000003,
"heapDeltaBytes": -49354980,
"heapUsedBytes": 168291948,
"domNodes": -8061,
"jsHeapTotalBytes": -5103616,
"scriptDurationMs": 236.09999999999997,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 16221.31300000001,
"styleRecalcs": 89,
"styleRecalcDurationMs": 15.871000000000024,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16080.874000000002,
"heapDeltaBytes": -19372040,
"heapUsedBytes": 169124868,
"domNodes": 0,
"jsHeapTotalBytes": -21233664,
"scriptDurationMs": 992.9129999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 79,
"frameDurationMs": 17.216666666666665,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 22346.408000000112,
"styleRecalcs": 166,
"styleRecalcDurationMs": 25.029999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22217.576999999997,
"heapDeltaBytes": -58948132,
"heapUsedBytes": 182191868,
"domNodes": -8061,
"jsHeapTotalBytes": -16977920,
"scriptDurationMs": 996.3870000000002,
"eventListeners": -14928,
"totalBlockingTimeMs": 373,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-node-resize-workload",
"durationMs": 6485.47300000007,
"styleRecalcs": 20,
"styleRecalcDurationMs": 96.83799999999998,
"layouts": 20,
"layoutDurationMs": 31.440999999999995,
"taskDurationMs": 6447.3330000000005,
"heapDeltaBytes": -44228608,
"heapUsedBytes": 173020652,
"domNodes": -8061,
"jsHeapTotalBytes": 10285056,
"scriptDurationMs": 126.554,
"eventListeners": -14928,
"totalBlockingTimeMs": 525,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6529.252999999926,
"styleRecalcs": 20,
"styleRecalcDurationMs": 89.46600000000005,
"layouts": 20,
"layoutDurationMs": 29.612000000000013,
"taskDurationMs": 6471.83,
"heapDeltaBytes": -36343728,
"heapUsedBytes": 180780172,
"domNodes": -8061,
"jsHeapTotalBytes": 10809344,
"scriptDurationMs": 125.44899999999998,
"eventListeners": -14928,
"totalBlockingTimeMs": 527,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6718.7770000000455,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6506.206999999999,
"heapDeltaBytes": 9751980,
"heapUsedBytes": 194738872,
"domNodes": 0,
"jsHeapTotalBytes": -3407872,
"scriptDurationMs": 135.151,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9149.171000000024,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8904.005,
"heapDeltaBytes": -11632284,
"heapUsedBytes": 170199280,
"domNodes": 0,
"jsHeapTotalBytes": -29884416,
"scriptDurationMs": 151.90899999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 139.23899999997502,
"styleRecalcs": 8,
"styleRecalcDurationMs": 18.982,
"layouts": 4,
"layoutDurationMs": 2.317,
"taskDurationMs": 103.247,
"heapDeltaBytes": 3167504,
"heapUsedBytes": 64708864,
"domNodes": 131,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 9.830000000000002,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 126.47799999990639,
"styleRecalcs": 8,
"styleRecalcDurationMs": 18.232000000000003,
"layouts": 3,
"layoutDurationMs": 2.132,
"taskDurationMs": 96.18199999999999,
"heapDeltaBytes": 3066676,
"heapUsedBytes": 64774816,
"domNodes": 108,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 8.045999999999998,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #18324 +/- ##
==========================================
+ Coverage 83.26% 84.25% +0.98%
==========================================
Files 2981 2280 -701
Lines 146563 129370 -17193
Branches 39739 33032 -6707
==========================================
- Hits 122038 109001 -13037
+ Misses 23242 20073 -3169
+ Partials 1283 296 -987
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 709 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
|
…widget value (#18355) <!-- ccr-slack-attribution --> _Requested via [Slack thread](https://comfy-organization.slack.com/archives/C09KFK2ABB8/p1790036595619019?thread_ts=1790036595.619019&cid=C09KFK2ABB8)_ Manual backport of #18324 to `cloud/1.54`. This target was never attempted by the automated `pr-backport.yaml` bot: it errored out after processing `core/1.53` and `cloud/1.53` and never reached `core/1.54` or `cloud/1.54`, despite #18324 carrying the `cloud/1.54` label. ## What the original PR fixed `setValue` in `useStringWidget.ts`'s `addMultilineWidget()` closed over the outer `widget` const to read `widget.options`, but `node.addDOMWidget(...)` can invoke `setValue` synchronously (while restoring a previously saved value during workflow load) before the `const widget = node.addDOMWidget(...)` assignment completes. Reading `widget.options` at that point threw a `ReferenceError` from the temporal dead zone (TDZ), crashing the app when loading a workflow with a saved multiline STRING widget value. The fix hoists the widget's `options` object into its own `widgetOptions` const, declared and fully initialized before `addDOMWidget` is called, and has `setValue` reference that instead of the outer `widget` binding. ## Conflict resolution Cherry-picking `eefd88f4f424803e102c367d296106ecd749d798` (single-parent commit, plain `git cherry-pick`) onto `cloud/1.54` auto-merged cleanly in both `useStringWidget.ts` and `useStringWidget.test.ts` with no manual conflict resolution needed. ## Verification - `useStringWidget.test.ts`: 5/5 tests pass - `pnpm typecheck`: clean, no errors - `pnpm install` succeeded with no lockfile conflicts 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KQEWS3P3LxaJx8jVvy5TUb --- _Generated by [Claude Code](https://claude.ai/code/session_01KQEWS3P3LxaJx8jVvy5TUb)_ Co-authored-by: comfy-tag-bot <comfy-tag-bot@users.noreply.github.com>
…idget value (#18354) <!-- ccr-slack-attribution --> _Requested via [Slack thread](https://comfy-organization.slack.com/archives/C09KFK2ABB8/p1790036595619019?thread_ts=1790036595.619019&cid=C09KFK2ABB8)_ Manual backport of #18324 to `core/1.54`. The automated `pr-backport.yaml` bot never reached this target (it errored out after processing `core/1.53` and `cloud/1.53`, and never attempted `core/1.54` or `cloud/1.54`), even though #18324 carries the `core/1.54` label. No bot failure comment exists for this target, so this was cherry-picked manually following the same pattern used for the `core/1.53` (#18352) and `cloud/1.53` (#18350) backports. ## Fix Fixes a `ReferenceError` (temporal-dead-zone) crash when a workflow with a saved multiline STRING widget value is loaded. `setValue` in `useStringWidget.ts`'s `addMultilineWidget()` closed over the outer `widget` const to read `widget.options`, but `node.addDOMWidget(...)` can invoke `setValue` synchronously (while restoring a saved value during workflow load) before that `const widget = node.addDOMWidget(...)` assignment completes. The fix hoists the widget's options into their own `widgetOptions` const, declared and initialized before `addDOMWidget` is called, and has `setValue` read that instead of the outer `widget` binding. ## Conflict resolution The cherry-pick of `eefd88f4f424803e102c367d296106ecd749d798` (single-parent commit, plain `git cherry-pick`) applied cleanly with no conflicts in either `useStringWidget.ts` or `useStringWidget.test.ts` — git's auto-merge resolved both files without manual intervention. ## Verification - `useStringWidget.test.ts`: 5/5 tests pass - `pnpm typecheck`: clean - No `pnpm-lock.yaml` or `package.json` changes needed 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KQEWS3P3LxaJx8jVvy5TUb --- _Generated by [Claude Code](https://claude.ai/code/session_01KQEWS3P3LxaJx8jVvy5TUb)_ Co-authored-by: comfy-tag-bot <comfy-tag-bot@users.noreply.github.com>
…idget value (#18352) <!-- ccr-slack-attribution --> _Requested via [Slack thread](https://comfy-organization.slack.com/archives/C09KFK2ABB8/p1790036595619019?thread_ts=1790036595.619019&cid=C09KFK2ABB8)_ Manual backport of #18324 to `core/1.53`. The automated backport bot hit a merge conflict in `src/renderer/extensions/vueNodes/widgets/composables/useStringWidget.ts` and could not land it automatically. ## What this fixes Loading a workflow with a saved multiline STRING widget value could crash with `ReferenceError: can't access lexical declaration 'widget' before initialization`. `setValue` in `addMultilineWidget()` read `widget.options` from the outer `widget` const, but `node.addDOMWidget(...)` can call `setValue` synchronously (while restoring the saved value) before that `const widget = ...` assignment completes — a temporal-dead-zone (TDZ) self-reference. The fix hoists the widget's options into their own `widgetOptions` const, declared and initialized before `addDOMWidget` is called, and has `setValue` read from that instead of the outer `widget` binding. ## Conflict resolution The only conflict was in `useStringWidget.ts`: `core/1.53`'s pre-fix code still referenced `widget.options ?? {}` inside `setValue`, while #18324 hoisted that into the `widgetOptions` const. Took the incoming (`widgetOptions`) version, consistent with the already-hoisted surrounding code. `useStringWidget.test.ts`'s new regression test merged cleanly with no conflicts. No `package.json` or `pnpm-lock.yaml` changes were involved. Verified: `useStringWidget.test.ts` (5/5 passing) and `pnpm typecheck` clean on `core/1.53`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KQEWS3P3LxaJx8jVvy5TUb --- _Generated by [Claude Code](https://claude.ai/code/session_01KQEWS3P3LxaJx8jVvy5TUb)_ Co-authored-by: comfy-tag-bot <comfy-tag-bot@users.noreply.github.com>
…widget value (#18350) <!-- ccr-slack-attribution --> _Requested via [Slack thread](https://comfy-organization.slack.com/archives/C09KFK2ABB8/p1790036595619019?thread_ts=1790036595.619019&cid=C09KFK2ABB8)_ Manual backport of #18324 to `cloud/1.53`. The automated backport bot hit a merge conflict in `src/renderer/extensions/vueNodes/widgets/composables/useStringWidget.ts` and could not land it automatically, so this was cherry-picked and resolved by hand. **Fix**: `setValue` in `useStringWidget.ts`'s `addMultilineWidget()` closed over the outer `widget` const to read `widget.options`, but `node.addDOMWidget(...)` can invoke `setValue` synchronously — while restoring a previously saved widget value during workflow load — before that assignment completes, throwing a `ReferenceError` (temporal dead zone). The fix hoists the widget's options object into its own `widgetOptions` const, declared and initialized before `addDOMWidget` is called, and has `setValue` reference that instead of the outer `widget` binding. **Conflict resolution**: the only conflict was in `useStringWidget.ts`, where cloud/1.53's version of `setValue` still referenced `widget.options ?? {}`; resolved by taking the fixed version (`options: widgetOptions`), consistent with the rest of the already-hoisted `widgetOptions` pattern. `useStringWidget.test.ts` merged automatically with no conflicts. No `package.json`/`pnpm-lock.yaml` changes were needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KQEWS3P3LxaJx8jVvy5TUb --- _Generated by [Claude Code](https://claude.ai/code/session_01KQEWS3P3LxaJx8jVvy5TUb)_ Co-authored-by: comfy-tag-bot <comfy-tag-bot@users.noreply.github.com>
<!-- ccr-slack-attribution -->
Requested via Slack thread
Summary
Fixes a
ReferenceErrorcrash when a workflow with a saved multiline STRING widget value is loaded, caused by a temporal-dead-zone (TDZ) self-reference inuseStringWidget.ts.Changes
setValueinuseStringWidget.ts'saddMultilineWidget()closed over the outerwidgetconst to readwidget.options, butnode.addDOMWidget(...)can invokesetValuesynchronously — while restoring a previously saved widget value during workflow load — before thatconst widget = node.addDOMWidget(...)assignment completes. Readingwidget.optionsat that point threwReferenceError: can't access lexical declaration 'widget' before initialization. The fix hoists the widget'soptionsobject into its ownwidgetOptionsconst, declared and fully initialized beforeaddDOMWidgetis called, and hassetValuereference that instead of the outerwidgetbinding.Review Focus
The fix is intentionally minimal: no behavioral change to
getValue/setValueother than removing the self-reference. Seesrc/renderer/extensions/vueNodes/widgets/composables/useStringWidget.ts(addMultilineWidget).Fixes Sentry issue CLOUD-FRONTEND-STAGING-4M6.
Before / After
Before: Loading a workflow that had a saved value for a multiline text (STRING) widget — for example a prompt box with saved text — could crash the app with an uncaught
ReferenceError, because the saved value gets restored into the widget synchronously while the widget is still being constructed.After: The same workflow loads correctly and the saved multiline text value is restored as expected, with no error.
How
LGraphNode.addCustomWidgetrestores a widget's saved value by assigningwidget.value = restored.valueas soon as the widget is created (src/lib/litegraph/src/LGraphNode.ts), and the DOM widget'svaluesetter (src/scripts/domWidget.ts) immediately callsthis.options.setValue?.(v). Since this all happens inside the call tonode.addDOMWidget(...), it runs before that call returns and beforeuseStringWidget.ts's ownconst widget = node.addDOMWidget(...)is assigned. The previous code'ssetValuereadwidget.optionsfrom that not-yet-initialized outerwidget, tripping JavaScript's temporal dead zone. Declaring the options object (widgetOptions) as its own const ahead of theaddDOMWidgetcall, and passing/reading that same object throughout, removes the dependency on the outerwidgetbinding entirely.Test Plan
src/renderer/extensions/vueNodes/widgets/composables/useStringWidget.test.tsthat simulatesaddDOMWidgetrestoring a saved value synchronously during construction (mirroringLGraphNode.addCustomWidget's restore path), and asserts widget construction does not throw.useStringWidget.test.tssuite passes (5/5).src/renderer/extensions/vueNodes/widgets/composables/andsrc/scripts/domWidgettest suites pass with no regressions (277/277).pnpm typecheckandeslintpass clean on the changed files.🤖 Generated with Claude Code
https://claude.ai/code/session_01KQEWS3P3LxaJx8jVvy5TUb
Generated by Claude Code