Repository navigation
Conversation
…on, #10146) Adds an instanceId dimension to widgetValueStore so promoted widgets on sibling SubgraphNode instances no longer collide on a shared key. The store becomes the single source of truth for per-instance promoted widget values, replacing the _instanceWidgetValues Map bolted onto SubgraphNode by #10849. Persistence keeps the existing positional widgets_values format that the rest of the ComfyUI ecosystem speaks. SubgraphNode.serialize emits widgets_values only when at least one promoted view has a scoped store value — pre-#10849 templates without per-instance edits do not write the field, restoring the dead-field invariant for unedited workflows. The 4-tuple [nid, name, disambig, {value}] schema variant added by PR #11559 is accepted by parseProxyWidgets as a one-release migration shim; the writer never emits it. Workflows saved on the #11559 branch hydrate their inline {value} into the store on load and re-save in the positional widgets_values format. DEV-only console.warn fires when legacy widgets_values length does not match proxyWidgets length, dropping the stale array. Renderer paths in useGraphNodeManager and useProcessedWidgets thread the storeInstanceId through SafeWidgetData so Vue reads pick the right instance scope without a parallel snapshot field. Tests: regression coverage from PR #11559 ported and adjusted for positional widgets_values; new Cohort C migration test pins the 4-tuple→positional rewrite on first save after upgrade.
Address Oracle review of mixed-edit and first-paint cases: - SubgraphNode.serialize falls back to view.value (source default) when no scoped store value exists, instead of writing null. Avoids null replay corrupting un-edited widgets on reload. - _internalConfigureAfterSlots skips null/undefined entries from legacy widgets_values defensively so older saves cannot poison the store. - SafeWidgetData gains a read-only defaultValue field sourced from the underlying widget at construction. useProcessedWidgets falls back to it when no scoped store entry exists yet, so first paint of un-edited promoted widgets shows the source default.
🎨 Storybook: ✅ Built — View Storybook |
🎭 Playwright: ❌ 1423 passed, 1 failed · 1 flaky❌ Failed Tests📊 Browser Reports
|
📝 WalkthroughWalkthroughWidget value persistence moves from per-instance in-memory maps to an instance-scoped widgetValueStore. Promoted views gain instance identity and scoped accessors; SafeWidgetData and processed-widget flows now carry/consume Changes
Sequence Diagram(s)sequenceDiagram
participant UI as UI / ProcessedWidgets
participant Manager as GraphNodeManager
participant View as PromotedWidgetView
participant Store as WidgetValueStore
participant Source as InnerWidget
UI->>Manager: request processed widget (includes storeInstanceId)
Manager->>View: resolve promoted view and defaultValue
View->>Store: getWidget(graphId, nodeId, name, instanceId)
alt scoped entry exists
Store-->>View: scoped value
View-->>UI: simplified.value = scoped value
else no scoped entry
View-->>Source: read host/source widget .value
Source-->>View: source value
View-->>UI: simplified.value = defaultValue (source or view default)
end
UI->>View: user updates promoted widget
View->>Store: register/write scoped value for instance (deep-clone)
Store-->>View: ack
View-->>UI: update confirmed
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
📦 Bundle: 5.23 MB gzip 🔴 +529 BDetailsSummary
Category Glance App Entry Points — 22.5 kB (baseline 22.5 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.24 MB (baseline 1.24 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 77.7 kB (baseline 77.7 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 2 unchanged Panels & Settings — 488 kB (baseline 488 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 11 unchanged User & Accounts — 17.4 kB (baseline 17.4 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed / 2 unchanged Editors & Dialogs — 113 kB (baseline 113 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 4 added / 4 removed UI Components — 61 kB (baseline 61 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 8 unchanged Data & Services — 3.04 MB (baseline 3.04 MB) • 🔴 +1.41 kBStores, services, APIs, and repositories
Status: 13 added / 13 removed / 4 unchanged Utilities & Hooks — 364 kB (baseline 364 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 13 added / 13 removed / 18 unchanged Vendor & Third-Party — 9.88 MB (baseline 9.88 MB) • 🔴 +861 BExternal libraries and shared vendor chunks
Status: 1 added / 1 removed / 15 unchanged Other — 8.83 MB (baseline 8.83 MB) • ⚪ 0 BBundles that do not match a named category
Status: 58 added / 58 removed / 77 unchanged ⚡ Performance Report
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-04-29T18:25:42.079Z",
"gitSha": "674e4734ba8d895c3e8be89dcbc0b93e02110622",
"branch": "glary/subgraph-widget-store-instance-keyspace",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2030.5529999999976,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.484000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 380.314,
"heapDeltaBytes": 3525816,
"heapUsedBytes": 71696764,
"domNodes": 22,
"jsHeapTotalBytes": 18874368,
"scriptDurationMs": 22.420999999999996,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-idle",
"durationMs": 2017.411999999979,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.411999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 327.03,
"heapDeltaBytes": 22363100,
"heapUsedBytes": 71855000,
"domNodes": 16,
"jsHeapTotalBytes": 14680064,
"scriptDurationMs": 14.935,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 1998.6340000000382,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.312,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 328.316,
"heapDeltaBytes": 22648588,
"heapUsedBytes": 71016924,
"domNodes": 16,
"jsHeapTotalBytes": 14942208,
"scriptDurationMs": 14.818000000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1978.8270000000239,
"styleRecalcs": 76,
"styleRecalcDurationMs": 51.222,
"layouts": 12,
"layoutDurationMs": 3.615,
"taskDurationMs": 907.522,
"heapDeltaBytes": 3382060,
"heapUsedBytes": 52021764,
"domNodes": -265,
"jsHeapTotalBytes": 15855616,
"scriptDurationMs": 136.852,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1832.8450000000203,
"styleRecalcs": 72,
"styleRecalcDurationMs": 36.362,
"layouts": 12,
"layoutDurationMs": 3.659,
"taskDurationMs": 784.423,
"heapDeltaBytes": -779584,
"heapUsedBytes": 47281672,
"domNodes": -265,
"jsHeapTotalBytes": 15855616,
"scriptDurationMs": 129.251,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1813.5879999999815,
"styleRecalcs": 75,
"styleRecalcDurationMs": 41.622,
"layouts": 12,
"layoutDurationMs": 3.758,
"taskDurationMs": 788.151,
"heapDeltaBytes": 18973876,
"heapUsedBytes": 67923096,
"domNodes": 59,
"jsHeapTotalBytes": 15466496,
"scriptDurationMs": 136.077,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1725.479000000007,
"styleRecalcs": 30,
"styleRecalcDurationMs": 17.266000000000002,
"layouts": 6,
"layoutDurationMs": 0.578,
"taskDurationMs": 295.054,
"heapDeltaBytes": 529136,
"heapUsedBytes": 48553376,
"domNodes": 77,
"jsHeapTotalBytes": 14680064,
"scriptDurationMs": 24.042,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1727.170000000001,
"styleRecalcs": 32,
"styleRecalcDurationMs": 19.242,
"layouts": 6,
"layoutDurationMs": 0.6859999999999999,
"taskDurationMs": 308.224,
"heapDeltaBytes": 267836,
"heapUsedBytes": 49362620,
"domNodes": 80,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 26.669000000000004,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1751.8069999999852,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.58,
"layouts": 6,
"layoutDurationMs": 0.673,
"taskDurationMs": 306.50699999999995,
"heapDeltaBytes": 175632,
"heapUsedBytes": 48867780,
"domNodes": 75,
"jsHeapTotalBytes": 14680064,
"scriptDurationMs": 20.781000000000002,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 539.1529999999989,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.974,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 342.086,
"heapDeltaBytes": 8757772,
"heapUsedBytes": 57376284,
"domNodes": 18,
"jsHeapTotalBytes": 15466496,
"scriptDurationMs": 61.422,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 542.2780000000103,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.586,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 330.561,
"heapDeltaBytes": 8483504,
"heapUsedBytes": 57112108,
"domNodes": 18,
"jsHeapTotalBytes": 15990784,
"scriptDurationMs": 60.480000000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 532.4519999999211,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.068000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 344.306,
"heapDeltaBytes": 8792956,
"heapUsedBytes": 57363852,
"domNodes": 16,
"jsHeapTotalBytes": 14942208,
"scriptDurationMs": 62.452999999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2032.1280000000002,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.455,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 541.4080000000001,
"heapDeltaBytes": 1881052,
"heapUsedBytes": 60388464,
"domNodes": -265,
"jsHeapTotalBytes": 4227072,
"scriptDurationMs": 91.58400000000002,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2022.357999999997,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.801999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 533.254,
"heapDeltaBytes": 1761756,
"heapUsedBytes": 60344596,
"domNodes": -263,
"jsHeapTotalBytes": 5799936,
"scriptDurationMs": 90.47599999999998,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2010.8249999999543,
"styleRecalcs": 8,
"styleRecalcDurationMs": 9.857999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 609.225,
"heapDeltaBytes": 4274724,
"heapUsedBytes": 62652832,
"domNodes": -265,
"jsHeapTotalBytes": 557056,
"scriptDurationMs": 107.83099999999999,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2132.0590000000266,
"styleRecalcs": 68,
"styleRecalcDurationMs": 16.904,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1080.3740000000003,
"heapDeltaBytes": -228700,
"heapUsedBytes": 58984624,
"domNodes": -264,
"jsHeapTotalBytes": 1024000,
"scriptDurationMs": 407.709,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2134.8330000000146,
"styleRecalcs": 69,
"styleRecalcDurationMs": 19.625999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1095.888,
"heapDeltaBytes": 4818472,
"heapUsedBytes": 64192728,
"domNodes": -261,
"jsHeapTotalBytes": 1286144,
"scriptDurationMs": 396.176,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2137.6789999999346,
"styleRecalcs": 68,
"styleRecalcDurationMs": 19.137999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1206.327,
"heapDeltaBytes": 7775516,
"heapUsedBytes": 68063568,
"domNodes": -265,
"jsHeapTotalBytes": 4984832,
"scriptDurationMs": 433.01500000000004,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3118.3340000000044,
"styleRecalcs": 64,
"styleRecalcDurationMs": 17.287000000000003,
"layouts": 60,
"layoutDurationMs": 7.394,
"taskDurationMs": 1315.9579999999999,
"heapDeltaBytes": 11459576,
"heapUsedBytes": 72368072,
"domNodes": -268,
"jsHeapTotalBytes": 557056,
"scriptDurationMs": 489.26599999999996,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3147.699999999986,
"styleRecalcs": 65,
"styleRecalcDurationMs": 17.889,
"layouts": 60,
"layoutDurationMs": 7.308999999999999,
"taskDurationMs": 1310.5849999999998,
"heapDeltaBytes": 6129740,
"heapUsedBytes": 67051516,
"domNodes": -269,
"jsHeapTotalBytes": 6062080,
"scriptDurationMs": 484.252,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3142.6680000000715,
"styleRecalcs": 63,
"styleRecalcDurationMs": 17.184,
"layouts": 60,
"layoutDurationMs": 7.745,
"taskDurationMs": 1351.9,
"heapDeltaBytes": 18600496,
"heapUsedBytes": 79836408,
"domNodes": -272,
"jsHeapTotalBytes": 1081344,
"scriptDurationMs": 501.699,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2020.0350000000071,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.593,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 518.869,
"heapDeltaBytes": 4948160,
"heapUsedBytes": 65076468,
"domNodes": -266,
"jsHeapTotalBytes": 557056,
"scriptDurationMs": 84.68900000000001,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2056.455000000028,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.051,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 549.79,
"heapDeltaBytes": 3037916,
"heapUsedBytes": 63075864,
"domNodes": -262,
"jsHeapTotalBytes": 557056,
"scriptDurationMs": 98.664,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2026.3130000000729,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.578,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 536.862,
"heapDeltaBytes": 1527824,
"heapUsedBytes": 61674260,
"domNodes": -265,
"jsHeapTotalBytes": 5537792,
"scriptDurationMs": 95.541,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 529.7449999999913,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.736,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 361.2799999999999,
"heapDeltaBytes": 9266924,
"heapUsedBytes": 57712796,
"domNodes": 20,
"jsHeapTotalBytes": 16252928,
"scriptDurationMs": 126.464,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 543.3729999999741,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.399000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 353.84800000000007,
"heapDeltaBytes": 9250492,
"heapUsedBytes": 57810688,
"domNodes": 19,
"jsHeapTotalBytes": 15990784,
"scriptDurationMs": 119.96600000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 587.7629999999954,
"styleRecalcs": 46,
"styleRecalcDurationMs": 11.348999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 371.4270000000001,
"heapDeltaBytes": 8770092,
"heapUsedBytes": 57420396,
"domNodes": 18,
"jsHeapTotalBytes": 15990784,
"scriptDurationMs": 128.84799999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-idle",
"durationMs": 2000.5669999999895,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.157999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 330.805,
"heapDeltaBytes": 22860408,
"heapUsedBytes": 71414052,
"domNodes": 17,
"jsHeapTotalBytes": 14942208,
"scriptDurationMs": 13.343999999999998,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2017.6380000000336,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.067000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 325.64900000000006,
"heapDeltaBytes": 22469664,
"heapUsedBytes": 71145216,
"domNodes": 16,
"jsHeapTotalBytes": 14942208,
"scriptDurationMs": 14.232000000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2050.636999999938,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.473999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 435.505,
"heapDeltaBytes": -4413264,
"heapUsedBytes": 44279776,
"domNodes": -265,
"jsHeapTotalBytes": 14807040,
"scriptDurationMs": 20.476,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1981.9679999999948,
"styleRecalcs": 88,
"styleRecalcDurationMs": 47.198,
"layouts": 16,
"layoutDurationMs": 4.196,
"taskDurationMs": 929.4259999999998,
"heapDeltaBytes": 14402904,
"heapUsedBytes": 63555392,
"domNodes": 73,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 103.325,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1690.686000000028,
"styleRecalcs": 75,
"styleRecalcDurationMs": 36.955,
"layouts": 16,
"layoutDurationMs": 4.573,
"taskDurationMs": 659.516,
"heapDeltaBytes": 13955936,
"heapUsedBytes": 62284636,
"domNodes": 60,
"jsHeapTotalBytes": 14942208,
"scriptDurationMs": 94.595,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1688.9770000000226,
"styleRecalcs": 77,
"styleRecalcDurationMs": 39.769,
"layouts": 16,
"layoutDurationMs": 5.223999999999999,
"taskDurationMs": 699.638,
"heapDeltaBytes": 14689328,
"heapUsedBytes": 64278284,
"domNodes": 63,
"jsHeapTotalBytes": 14680064,
"scriptDurationMs": 101.01299999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8150.177999999983,
"styleRecalcs": 249,
"styleRecalcDurationMs": 51.07,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3770.2890000000007,
"heapDeltaBytes": 8599760,
"heapUsedBytes": 66937420,
"domNodes": -265,
"jsHeapTotalBytes": 6266880,
"scriptDurationMs": 1249.9099999999999,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8133.047999999973,
"styleRecalcs": 250,
"styleRecalcDurationMs": 52.034,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3723.4110000000005,
"heapDeltaBytes": 4360776,
"heapUsedBytes": 62396704,
"domNodes": -260,
"jsHeapTotalBytes": 6791168,
"scriptDurationMs": 1259.8590000000002,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8197.75500000003,
"styleRecalcs": 249,
"styleRecalcDurationMs": 52.540000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3957.757,
"heapDeltaBytes": 16061348,
"heapUsedBytes": 74300900,
"domNodes": -264,
"jsHeapTotalBytes": 2859008,
"scriptDurationMs": 1303.1,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12277.00900000002,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12233.711,
"heapDeltaBytes": -44282048,
"heapUsedBytes": 181715168,
"domNodes": -9850,
"jsHeapTotalBytes": 24178688,
"scriptDurationMs": 643.266,
"eventListeners": -23959,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 12580.09000000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12569.945,
"heapDeltaBytes": -57658596,
"heapUsedBytes": 162047900,
"domNodes": -9850,
"jsHeapTotalBytes": -9113600,
"scriptDurationMs": 616.8439999999999,
"eventListeners": -23987,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 12543.24500000007,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12529.019,
"heapDeltaBytes": -35727864,
"heapUsedBytes": 181004516,
"domNodes": -9850,
"jsHeapTotalBytes": -13307904,
"scriptDurationMs": 627.521,
"eventListeners": -23961,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 14636.55399999999,
"styleRecalcs": 66,
"styleRecalcDurationMs": 15.940999999999983,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14603.835000000001,
"heapDeltaBytes": -63856324,
"heapUsedBytes": 166385744,
"domNodes": -9850,
"jsHeapTotalBytes": -12521472,
"scriptDurationMs": 941.543,
"eventListeners": -23955,
"totalBlockingTimeMs": 34,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 14414.775999999962,
"styleRecalcs": 68,
"styleRecalcDurationMs": 18.718999999999987,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14391.689999999999,
"heapDeltaBytes": -48560316,
"heapUsedBytes": 164356264,
"domNodes": -9850,
"jsHeapTotalBytes": -11210752,
"scriptDurationMs": 883.724,
"eventListeners": -23985,
"totalBlockingTimeMs": 65,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14926.081999999951,
"styleRecalcs": 68,
"styleRecalcDurationMs": 17.69599999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14895.899000000001,
"heapDeltaBytes": -65671072,
"heapUsedBytes": 165293164,
"domNodes": -9850,
"jsHeapTotalBytes": -15667200,
"scriptDurationMs": 909.109,
"eventListeners": -23983,
"totalBlockingTimeMs": 121,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 451.16899999999305,
"styleRecalcs": 17,
"styleRecalcDurationMs": 22.772000000000002,
"layouts": 4,
"layoutDurationMs": 1.15,
"taskDurationMs": 119.78800000000001,
"heapDeltaBytes": 5267724,
"heapUsedBytes": 55232888,
"domNodes": 167,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 22.69,
"eventListeners": 69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 459.7149999999601,
"styleRecalcs": 16,
"styleRecalcDurationMs": 26.282999999999998,
"layouts": 5,
"layoutDurationMs": 1.271,
"taskDurationMs": 117.23700000000001,
"heapDeltaBytes": 5004764,
"heapUsedBytes": 54903760,
"domNodes": 152,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 23.786,
"eventListeners": 69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 461.2260000000106,
"styleRecalcs": 15,
"styleRecalcDurationMs": 20.581000000000003,
"layouts": 5,
"layoutDurationMs": 1.257,
"taskDurationMs": 114.43100000000001,
"heapDeltaBytes": 5020180,
"heapUsedBytes": 56217796,
"domNodes": 152,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 22.770000000000003,
"eventListeners": 69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
}
]
} |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #11766 +/- ##
===========================================
- Coverage 70.44% 53.47% -16.98%
===========================================
Files 1482 1373 -109
Lines 85986 70288 -15698
Branches 24088 19582 -4506
===========================================
- Hits 60576 37587 -22989
- Misses 24468 32152 +7684
+ Partials 942 549 -393
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 986 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/lib/litegraph/src/subgraph/SubgraphNode.ts`:
- Around line 1006-1010: The configure() cleanup only clears widgets for the
current this.id but runs before super.configure(info) so an incoming info.id can
leak; update configure(ExportedSubgraphInstance) to also
clearInstanceWidgets(this.rootGraph.id, info.id) when info.id exists (or repeat
the clearInstanceWidgets call after super.configure(info)) so scoped widget
entries under the incoming id are removed and no bleed-through occurs.
In `@src/stores/widgetValueStore.ts`:
- Around line 95-100: Add a per-widget scoped deletion function so callers can
remove only a single promoted view’s state instead of the whole instance:
implement a new exported function (e.g., deleteWidgetScopedEntries or
clearScopedWidget) that accepts (graphId: UUID, instanceId: NodeId,
widgetIdOrScope: string), obtains the widgetStates via
getWidgetStateMap(graphId), builds the narrower prefix
`${instanceId}@${widgetIdOrScope}` and iterates widgetStates.keys() to delete
only keys that start with that prefix (mirroring clearInstanceWidgets logic but
scoped), then replace calls in the demote/rebind paths to use this new function
instead of clearInstanceWidgets to ensure only the target widget’s entries are
removed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2a3dbf4d-69ee-4570-b3cc-be320cfcd76e
📒 Files selected for processing (14)
src/composables/graph/useGraphNodeManager.test.tssrc/composables/graph/useGraphNodeManager.tssrc/core/graph/subgraph/promotedWidgetTypes.tssrc/core/graph/subgraph/promotedWidgetView.test.tssrc/core/graph/subgraph/promotedWidgetView.tssrc/core/graph/subgraph/subgraphNodePromotion.test.tssrc/core/schemas/promotionSchema.test.tssrc/core/schemas/promotionSchema.tssrc/lib/litegraph/src/subgraph/SubgraphNode.multiInstance.test.tssrc/lib/litegraph/src/subgraph/SubgraphNode.tssrc/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.tssrc/renderer/extensions/vueNodes/composables/useProcessedWidgets.tssrc/stores/widgetValueStore.test.tssrc/stores/widgetValueStore.ts
| function clearInstanceWidgets(graphId: UUID, instanceId: NodeId): void { | ||
| const widgetStates = getWidgetStateMap(graphId) | ||
| const prefix = `${instanceId}@` | ||
| for (const key of widgetStates.keys()) { | ||
| if (key.startsWith(prefix)) widgetStates.delete(key) | ||
| } |
There was a problem hiding this comment.
Expose per-widget scoped deletion, not just whole-instance cleanup.
clearInstanceWidgets() fixes node teardown, but demoting or rebinding a single promoted view still has no way to delete only that view’s scoped entries. The next promote of the same source in the same SubgraphNode will pick that stale value back up, so remove/re-promote is not a real reset. Please add a targeted delete API here and use it from the demote/rebind paths.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/stores/widgetValueStore.ts` around lines 95 - 100, Add a per-widget
scoped deletion function so callers can remove only a single promoted view’s
state instead of the whole instance: implement a new exported function (e.g.,
deleteWidgetScopedEntries or clearScopedWidget) that accepts (graphId: UUID,
instanceId: NodeId, widgetIdOrScope: string), obtains the widgetStates via
getWidgetStateMap(graphId), builds the narrower prefix
`${instanceId}@${widgetIdOrScope}` and iterates widgetStates.keys() to delete
only keys that start with that prefix (mirroring clearInstanceWidgets logic but
scoped), then replace calls in the demote/rebind paths to use this new function
instead of clearInstanceWidgets to ensure only the target widget’s entries are
removed.
There was a problem hiding this comment.
Implemented in 9242ce7. Added clearScopedWidget(graphId, instanceId, scopePrefix) to widgetValueStore with JSDoc documenting both ${nodeId} (clear all widgets on a source node) and ${nodeId}:${widgetName} (clear a single widget) prefix forms.
You're right that real leak sites existed: wired the targeted cleanup into SubgraphNode.ensureWidgetRemoved (demotion path) and SubgraphNode._setWidget (previous-view rebind path). Re-promote of the same source no longer reuses stale scoped values.
Tests:
widgetValueStore.test.ts— 3 cases pinning the prefix semantics (full-node prefix vs single-widget prefix vs legacy unscoped entries on the samenodeId).promotedWidgetView.test.ts— regression that demote → re-promote returns the source default rather than the stale scoped value.
There was a problem hiding this comment.
Skipped: comment is from another GitHub bot.
- SubgraphNode.configure now clears scoped entries under info.id when it differs from this.id, preventing bleed-through on reconfigure. - widgetValueStore exports clearScopedWidget for per-widget targeted deletion. Used by SubgraphNode ensureWidgetRemoved and _setWidget demotion paths to clear stale scoped promoted-widget values.
PR Created by the Glary-Bot Agent
S7 architectural alternative to #11559 — same regression contract (#10146 multi-instance widget collision, #10849 template-corruption regression), smaller persistence surface. Successor PR per @DrJKL's final review on #11559.
instanceIddimension towidgetValueStoreso siblingSubgraphNodeinstances no longer collide on a shared(graphId, nodeId, widgetName)key._instanceWidgetValuesMap onSubgraphNode(added by fix: store promoted widget values per SubgraphNode instance #10849) is removed.widgets_valuesformat. No new persisted schema variant.serialize()writeswidgets_valuesonly when at least one promoted view has a scoped store value; falls back toview.value(source default) for un-edited views in mixed-edit cases. Pre-fix: store promoted widget values per SubgraphNode instance #10849 templates without per-instance edits do not write the field, restoring the dead-field invariant.parseProxyWidgetsaccepts the 4-tuple[nid, name, disambig, {value}]shape from fix: restore SubgraphNode.widgets_values dead-field invariant (#10849 regression) #11559 as a one-release read-only migration shim. The writer never emits it. Workflows saved on fix: restore SubgraphNode.widgets_values dead-field invariant (#10849 regression) #11559's branch hydrate their inline{value}into the store on load and re-save in the positional format.SafeWidgetData.defaultValue(read-only) lets the Vue render path fall back to the source widget for first paint of un-edited promoted widgets. Distinct from fix: restore SubgraphNode.widgets_values dead-field invariant (#10849 regression) #11559's writablevaluesnapshot — never competes with the store at write time.Fixes #10146.
Migration
widgets_values, noproxyWidgetsproxyWidgetswith inline{value}proxyWidgets+ positionalwidgets_valuesproxyWidgets+ positionalwidgets_valuesDEV-only
console.warnfires when legacywidgets_valueslength does not matchproxyWidgetslength, dropping the stale array.What this PR drops vs. #11559
proxyWidgetswriter (parser kept as one-release read-only shim)cloneWidgetValue.tsstandalone file (inlined asJSON.parse(JSON.stringify(...))matchingLGraphNodebase)getSerializableWidgetsValues(): undefinedoverride anddelete serialized.widgets_valuesSafeWidgetData.valuewritable snapshotMost of the deletions are #10849's compensation layers (
_instanceWidgetValuesMap, sibling-fallback capture, write-meta WeakMap) collapsing once the keyspace is correct.Verification
pnpm typecheck✅pnpm format:check✅pnpm knip✅pnpm exec oxlinton changed files ✅pnpm test:unit198 tests acrosswidgetValueStore,promotionSchema,subgraphNodePromotion,SubgraphNode.multiInstance,promotedWidgetView,useProcessedWidgets,useGraphNodeManager✅16cbd8f4f:serialize()no longer writesnullfor un-edited views in mixed-edit cases (would replay nulls into the store on reload)defaultValuefor fresh promoted widgets (would render blank otherwise)preserves source defaults for unedited promoted widgets when serializing mixed editspins the mixed-edit round-trip┆Issue is synchronized with this Notion page by Unito