Repository navigation
[backport core/1.53] fix: avoid TDZ crash restoring saved multiline widget value - #18352
Conversation
Backport of #18324 to core/1.53. 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 `const widget = node.addDOMWidget(...)` assignment completes. Reading widget.options at that point threw a ReferenceError (TDZ). 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. Fixes Sentry issue CLOUD-FRONTEND-STAGING-4M6.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or 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 |
🎭 Playwright: ✅ 1907 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-22T04:40:13.524Z",
"gitSha": "58c03de71371f1797e594ba5ef9950d3807dec91",
"branch": "backport-18324-to-core-1.53",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2094.551000000024,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.874999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 626.51,
"heapDeltaBytes": -13028716,
"heapUsedBytes": 56676000,
"domNodes": -279,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 10.518999999999997,
"eventListeners": -157,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2037.371000000121,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.942999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 505.7069999999999,
"heapDeltaBytes": -1455412,
"heapUsedBytes": 69015824,
"domNodes": -282,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 9.219000000000001,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1905.6259999999838,
"styleRecalcs": 77,
"styleRecalcDurationMs": 43.142,
"layouts": 14,
"layoutDurationMs": 4.772,
"taskDurationMs": 933.479,
"heapDeltaBytes": -10889436,
"heapUsedBytes": 59843852,
"domNodes": -282,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 166.594,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1871.9590000000608,
"styleRecalcs": 76,
"styleRecalcDurationMs": 41.717000000000006,
"layouts": 14,
"layoutDurationMs": 4.602,
"taskDurationMs": 892.961,
"heapDeltaBytes": -8910228,
"heapUsedBytes": 61432336,
"domNodes": -279,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 160.631,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1738.8510000000679,
"styleRecalcs": 32,
"styleRecalcDurationMs": 19.283,
"layouts": 6,
"layoutDurationMs": 1.1480000000000001,
"taskDurationMs": 376.24099999999993,
"heapDeltaBytes": 4454496,
"heapUsedBytes": 74810020,
"domNodes": 77,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 12.887999999999996,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1735.245999999961,
"styleRecalcs": 30,
"styleRecalcDurationMs": 19.877,
"layouts": 6,
"layoutDurationMs": 1.2870000000000001,
"taskDurationMs": 410.813,
"heapDeltaBytes": 4421788,
"heapUsedBytes": 75273184,
"domNodes": 75,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 15.099000000000006,
"eventListeners": 21,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000007,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 726.4209999999593,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.498000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 465.84700000000004,
"heapDeltaBytes": -7828516,
"heapUsedBytes": 62974624,
"domNodes": 18,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 166.63400000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 660.4770000001281,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.443999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 458.21900000000005,
"heapDeltaBytes": 17828404,
"heapUsedBytes": 88267824,
"domNodes": 16,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 165.69400000000002,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2045.5479999999397,
"styleRecalcs": 3,
"styleRecalcDurationMs": 4.061999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 654.991,
"heapDeltaBytes": 10263388,
"heapUsedBytes": 86268336,
"domNodes": -274,
"jsHeapTotalBytes": -1392640,
"scriptDurationMs": 38.461999999999996,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2053.677000000107,
"styleRecalcs": 7,
"styleRecalcDurationMs": 7.065999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 613.303,
"heapDeltaBytes": -14105728,
"heapUsedBytes": 86446992,
"domNodes": -264,
"jsHeapTotalBytes": -45056,
"scriptDurationMs": 31.666000000000007,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2394.482000000039,
"styleRecalcs": 66,
"styleRecalcDurationMs": 12.775000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1756.548,
"heapDeltaBytes": 8341148,
"heapUsedBytes": 84841264,
"domNodes": -273,
"jsHeapTotalBytes": 667648,
"scriptDurationMs": 843.788,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2239.5219999998517,
"styleRecalcs": 65,
"styleRecalcDurationMs": 10.615,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1637.3280000000002,
"heapDeltaBytes": 19058592,
"heapUsedBytes": 84552692,
"domNodes": -277,
"jsHeapTotalBytes": 1798144,
"scriptDurationMs": 829.332,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3666.979999999967,
"styleRecalcs": 63,
"styleRecalcDurationMs": 13.265000000000002,
"layouts": 60,
"layoutDurationMs": 12.488000000000001,
"taskDurationMs": 1794.244,
"heapDeltaBytes": -2366212,
"heapUsedBytes": 75975148,
"domNodes": -276,
"jsHeapTotalBytes": -1654784,
"scriptDurationMs": 786.4630000000001,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3777.708999999959,
"styleRecalcs": 62,
"styleRecalcDurationMs": 12.116999999999999,
"layouts": 60,
"layoutDurationMs": 12.386000000000001,
"taskDurationMs": 1827.771,
"heapDeltaBytes": 10657476,
"heapUsedBytes": 77375904,
"domNodes": -276,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 846.228,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3152.735000000007,
"styleRecalcs": 40,
"styleRecalcDurationMs": 5.1990000000000025,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1982.922,
"heapDeltaBytes": 23714388,
"heapUsedBytes": 91232280,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 956.39,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3143.3029999998325,
"styleRecalcs": 42,
"styleRecalcDurationMs": 6.869,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2012.6119999999999,
"heapDeltaBytes": 27438820,
"heapUsedBytes": 93384820,
"domNodes": -278,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 969.5989999999999,
"eventListeners": -1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2024.1170000000466,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 559.3379999999999,
"heapDeltaBytes": 22097388,
"heapUsedBytes": 88063912,
"domNodes": -279,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 36.025,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2037.3809999998684,
"styleRecalcs": 3,
"styleRecalcDurationMs": 3.159000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 662.5390000000001,
"heapDeltaBytes": 10966508,
"heapUsedBytes": 87092624,
"domNodes": -276,
"jsHeapTotalBytes": -2179072,
"scriptDurationMs": 38.583999999999996,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 613.3579999999483,
"styleRecalcs": 46,
"styleRecalcDurationMs": 11.604,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 429.732,
"heapDeltaBytes": 14759712,
"heapUsedBytes": 87510132,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 147.985,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 599.2380000000139,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.399000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 425.84999999999997,
"heapDeltaBytes": 15085492,
"heapUsedBytes": 87490544,
"domNodes": 20,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 144.314,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2023.5699999999497,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.347999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 505.29,
"heapDeltaBytes": -11001820,
"heapUsedBytes": 61546472,
"domNodes": -296,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 8.878,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2022.5860000000466,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.512999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 496.06300000000005,
"heapDeltaBytes": -514780,
"heapUsedBytes": 71445004,
"domNodes": -295,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 7.768000000000001,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1806.149000000005,
"styleRecalcs": 79,
"styleRecalcDurationMs": 42.80499999999999,
"layouts": 18,
"layoutDurationMs": 6.507000000000001,
"taskDurationMs": 955.69,
"heapDeltaBytes": -12723696,
"heapUsedBytes": 60037860,
"domNodes": -296,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 122.93399999999998,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1722.5009999999656,
"styleRecalcs": 79,
"styleRecalcDurationMs": 38.341,
"layouts": 18,
"layoutDurationMs": 5.16,
"taskDurationMs": 839.4209999999999,
"heapDeltaBytes": -1774216,
"heapUsedBytes": 69708272,
"domNodes": -295,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 112.151,
"eventListeners": -233,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1449.8829999999998,
"styleRecalcs": 19,
"styleRecalcDurationMs": 33.389,
"layouts": 15,
"layoutDurationMs": 16.172,
"taskDurationMs": 976.9030000000002,
"heapDeltaBytes": 21101152,
"heapUsedBytes": 109721444,
"domNodes": 13751,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 33.982,
"eventListeners": 2381,
"totalBlockingTimeMs": 140,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 9063.135999999986,
"styleRecalcs": 248,
"styleRecalcDurationMs": 37.898,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6158.004999999999,
"heapDeltaBytes": 13292812,
"heapUsedBytes": 88553204,
"domNodes": -270,
"jsHeapTotalBytes": 110592,
"scriptDurationMs": 2779.7239999999997,
"eventListeners": -167,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8971.24800000006,
"styleRecalcs": 247,
"styleRecalcDurationMs": 37.274,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6084.173,
"heapDeltaBytes": 13820616,
"heapUsedBytes": 89443956,
"domNodes": -270,
"jsHeapTotalBytes": 143360,
"scriptDurationMs": 2757.942,
"eventListeners": -167,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 18206.699000000073,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17344.468999999997,
"heapDeltaBytes": -35479320,
"heapUsedBytes": 174102376,
"domNodes": -6548,
"jsHeapTotalBytes": -536576,
"scriptDurationMs": 320.44399999999996,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.890000000000025,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18309.825000000048,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17568.619,
"heapDeltaBytes": -34689324,
"heapUsedBytes": 175707928,
"domNodes": -6548,
"jsHeapTotalBytes": 3665920,
"scriptDurationMs": 319.796,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20674.88900000012,
"styleRecalcs": 168,
"styleRecalcDurationMs": 16.99099999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20273.384000000002,
"heapDeltaBytes": -51929872,
"heapUsedBytes": 162835860,
"domNodes": -6548,
"jsHeapTotalBytes": 3944448,
"scriptDurationMs": 865.742,
"eventListeners": -7467,
"totalBlockingTimeMs": 63,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 21972.07000000003,
"styleRecalcs": 171,
"styleRecalcDurationMs": 22.273999999999962,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21749.037,
"heapDeltaBytes": -40634396,
"heapUsedBytes": 169438456,
"domNodes": -6548,
"jsHeapTotalBytes": -3313664,
"scriptDurationMs": 957.367,
"eventListeners": -7469,
"totalBlockingTimeMs": 193,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6219.16699999997,
"styleRecalcs": 20,
"styleRecalcDurationMs": 80.28000000000002,
"layouts": 20,
"layoutDurationMs": 22.965000000000014,
"taskDurationMs": 6128.48,
"heapDeltaBytes": -19670228,
"heapUsedBytes": 185223456,
"domNodes": -6548,
"jsHeapTotalBytes": 18083840,
"scriptDurationMs": 116.17199999999998,
"eventListeners": -7471,
"totalBlockingTimeMs": 412,
"frameDurationMs": 17.776666666666703,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-node-resize-workload",
"durationMs": 6455.862000000025,
"styleRecalcs": 20,
"styleRecalcDurationMs": 81.12800000000003,
"layouts": 20,
"layoutDurationMs": 24.911000000000016,
"taskDurationMs": 6354.558999999999,
"heapDeltaBytes": -23870312,
"heapUsedBytes": 178544024,
"domNodes": -6584,
"jsHeapTotalBytes": 16773120,
"scriptDurationMs": 126.48199999999999,
"eventListeners": -7469,
"totalBlockingTimeMs": 402,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 121.48900000011054,
"styleRecalcs": 8,
"styleRecalcDurationMs": 16.028000000000002,
"layouts": 2,
"layoutDurationMs": 0.776,
"taskDurationMs": 77.967,
"heapDeltaBytes": 3159064,
"heapUsedBytes": 71704484,
"domNodes": 110,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.718000000000001,
"eventListeners": 49,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 107.85899999996218,
"styleRecalcs": 8,
"styleRecalcDurationMs": 15.895,
"layouts": 3,
"layoutDurationMs": 1.7360000000000002,
"taskDurationMs": 77.67099999999999,
"heapDeltaBytes": 3105444,
"heapUsedBytes": 70484784,
"domNodes": 127,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 7.128000000000001,
"eventListeners": 25,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.53 #18352 +/- ##
=============================================
+ Coverage 83.29% 83.41% +0.11%
=============================================
Files 2036 2034 -2
Lines 117787 117875 +88
Branches 33287 32706 -581
=============================================
+ Hits 98109 98322 +213
+ Misses 19322 19199 -123
+ Partials 356 354 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 71 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…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>
…tibility (#18472) Manual backport of #18301 to `core/1.53`. Cherry-picked from upstream merge commit `1344a91e0e5fd03ce2131bacf30d1faca7dcd26a`. ## Why Restores Impact Preview Bridge mask registration, WAS Pause live button enablement, and MiniMax RefMod schema-order serialization for the widget ECS compatibility layer shipped in core/1.53. ## Dependency check #18352 is still open, but it only changes `useStringWidget.ts` and its test. It is not in #18301's ancestry and does not overlap this backport, so the bot's stacking suggestion did not apply. ## Conflict resolution - `browser_tests/tests/loadWorkflowInMedia.spec.ts` — kept core/1.53's runtime settings and URL setup; added only the fixed LoadImage option fixture from #18301. - `src/components/graph/GraphCanvas.vue` — kept `LiteGraph.vueNodesMode` ownership in core/1.53's `useVueFeatureFlags`; refreshes live disabled state on renderer transitions without importing main's newer visibility facade. - `src/core/graph/widgets/nodeWidgetValues.ts` — preserved the target branch's callback behavior and added `widget.value` assignment after successful store writes so extension setters run. - `src/lib/litegraph/src/types/widgets.ts` and `BaseWidget.ts` — added only the live-disabled synchronization contract; omitted main-only visibility APIs. - `src/lib/litegraph/src/widgets/widgetMap.ts` — preserved core/1.53's normalizing setter composition from #16602 while retaining the extension's live `disabled` getter. - Browser compatibility specs use core/1.53's existing `getNodeRefsByType(...)[0]` helper because main's singular helper is unavailable. ## Backport-only compatibility fix Core/1.53's mask editor predates the shared widget-value boundary migration present on main. Its image write adapter now delegates to `setNodeWidgetValue`, ensuring mask Save reaches extension value setters while preserving the stable branch's store-first read path and `properties.image` mirror. A regression test covers this boundary. ## Validation - `pnpm test:unit src/composables/maskeditor/imageWidgetAdapter.test.ts src/core/graph/widgets/nodeWidgetValues.test.ts src/lib/litegraph/src/widgets/widgetMap.test.ts src/lib/litegraph/src/LGraph.serialise.test.ts` — 4 files, 39 tests passed. - `pnpm typecheck` — passed. - `pnpm typecheck:browser` — passed. - Changed-file ESLint — 0 errors; 26 pre-existing layer-boundary warnings in LiteGraph files. - Changed-file Oxlint — passed. - `pnpm exec oxfmt --check <changed JSON/TS/Vue/JS files>` — passed. - `python -m compileall -q tools/devtools/nodes` — passed. - Push-time `knip --cache` — passed. The three new browser compatibility specs require a production frontend served by a ComfyUI backend with `tools/devtools` installed; the local Vite workflow deliberately does not expose those extensions, so they were not run locally. Original PR: #18301
<!-- ccr-slack-attribution -->
Requested via Slack thread
Manual backport of #18324 to
core/1.53. The automated backport bot hit a merge conflict insrc/renderer/extensions/vueNodes/widgets/composables/useStringWidget.tsand 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.setValueinaddMultilineWidget()readwidget.optionsfrom the outerwidgetconst, butnode.addDOMWidget(...)can callsetValuesynchronously (while restoring the saved value) before thatconst widget = ...assignment completes — a temporal-dead-zone (TDZ) self-reference.The fix hoists the widget's options into their own
widgetOptionsconst, declared and initialized beforeaddDOMWidgetis called, and hassetValueread from that instead of the outerwidgetbinding.Conflict resolution
The only conflict was in
useStringWidget.ts:core/1.53's pre-fix code still referencedwidget.options ?? {}insidesetValue, while #18324 hoisted that into thewidgetOptionsconst. Took the incoming (widgetOptions) version, consistent with the already-hoisted surrounding code.useStringWidget.test.ts's new regression test merged cleanly with no conflicts. Nopackage.jsonorpnpm-lock.yamlchanges were involved.Verified:
useStringWidget.test.ts(5/5 passing) andpnpm typecheckclean oncore/1.53.🤖 Generated with Claude Code
https://claude.ai/code/session_01KQEWS3P3LxaJx8jVvy5TUb
Generated by Claude Code