Repository navigation
Still Draft Feature: ECS Migration - #14246
Conversation
🎭 Playwright: ✅ 1991 passed, 0 failed · 2 flaky📊 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-08-24T10:57:33.003Z",
"gitSha": "89e850fcaac9d0723055f66e3371d49aa128c78f",
"branch": "feature/ecs-migration",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 1998.6770000000433,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.239000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 407.186,
"heapDeltaBytes": -10976616,
"heapUsedBytes": 58208068,
"domNodes": -283,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 6.859999999999999,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 1993.4829999999693,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.958,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 409.40999999999997,
"heapDeltaBytes": 7008288,
"heapUsedBytes": 76437504,
"domNodes": -280,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 6.952000000000001,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2084.2250000000035,
"styleRecalcs": 78,
"styleRecalcDurationMs": 29.119000000000003,
"layouts": 12,
"layoutDurationMs": 2.8840000000000003,
"taskDurationMs": 1039.369,
"heapDeltaBytes": -447396,
"heapUsedBytes": 68751408,
"domNodes": -282,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 117.15299999999999,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1860.1639999999406,
"styleRecalcs": 77,
"styleRecalcDurationMs": 25.902999999999995,
"layouts": 12,
"layoutDurationMs": 2.4549999999999996,
"taskDurationMs": 895.4469999999999,
"heapDeltaBytes": 10187144,
"heapUsedBytes": 79804168,
"domNodes": -280,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 108.11999999999999,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1681.0870000000477,
"styleRecalcs": 29,
"styleRecalcDurationMs": 11.636999999999999,
"layouts": 6,
"layoutDurationMs": 0.5429999999999999,
"taskDurationMs": 282.46700000000004,
"heapDeltaBytes": 3905132,
"heapUsedBytes": 72788668,
"domNodes": 77,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 8.424999999999999,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1720.9159999999883,
"styleRecalcs": 31,
"styleRecalcDurationMs": 12.328999999999999,
"layouts": 6,
"layoutDurationMs": 0.54,
"taskDurationMs": 276.533,
"heapDeltaBytes": 4205044,
"heapUsedBytes": 72426856,
"domNodes": 78,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 8.287,
"eventListeners": 21,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 591.5960000000382,
"styleRecalcs": 11,
"styleRecalcDurationMs": 4.695999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 303.67100000000005,
"heapDeltaBytes": -5952536,
"heapUsedBytes": 63320876,
"domNodes": 18,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 21.942,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 605.4439999999204,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.114000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 309.596,
"heapDeltaBytes": -7152768,
"heapUsedBytes": 61944664,
"domNodes": 18,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 22.16,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2009.3650000000025,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.052,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 466.514,
"heapDeltaBytes": -22077052,
"heapUsedBytes": 68590700,
"domNodes": -276,
"jsHeapTotalBytes": 2355200,
"scriptDurationMs": 25.43999999999999,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2025.7480000000214,
"styleRecalcs": 7,
"styleRecalcDurationMs": 4.301000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 478.227,
"heapDeltaBytes": -22236780,
"heapUsedBytes": 68874516,
"domNodes": -272,
"jsHeapTotalBytes": 4452352,
"scriptDurationMs": 26.438999999999997,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 3168.641999999977,
"styleRecalcs": 67,
"styleRecalcDurationMs": 8.53,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1922.2710000000002,
"heapDeltaBytes": -12924724,
"heapUsedBytes": 77957880,
"domNodes": -248,
"jsHeapTotalBytes": 4415488,
"scriptDurationMs": 658.035,
"eventListeners": -179,
"totalBlockingTimeMs": 1,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 3127.7710000000525,
"styleRecalcs": 68,
"styleRecalcDurationMs": 8.224,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1867.5010000000002,
"heapDeltaBytes": -7171084,
"heapUsedBytes": 84523232,
"domNodes": -267,
"jsHeapTotalBytes": 745472,
"scriptDurationMs": 635.706,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3988.322000000039,
"styleRecalcs": 67,
"styleRecalcDurationMs": 9.138,
"layouts": 60,
"layoutDurationMs": 6.042000000000001,
"taskDurationMs": 1780.0159999999998,
"heapDeltaBytes": 9416400,
"heapUsedBytes": 79096852,
"domNodes": 26,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 572.21,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3976.2329999999793,
"styleRecalcs": 68,
"styleRecalcDurationMs": 8.588000000000001,
"layouts": 60,
"layoutDurationMs": 5.343999999999999,
"taskDurationMs": 1797.072,
"heapDeltaBytes": 10450784,
"heapUsedBytes": 79771444,
"domNodes": 28,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 587.312,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2243.5990000000174,
"styleRecalcs": 42,
"styleRecalcDurationMs": 3.493999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1444.407,
"heapDeltaBytes": 11598740,
"heapUsedBytes": 82134040,
"domNodes": 2,
"jsHeapTotalBytes": 679936,
"scriptDurationMs": 126.87900000000002,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2234.141999999906,
"styleRecalcs": 45,
"styleRecalcDurationMs": 5.788999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1523.4289999999999,
"heapDeltaBytes": -3082316,
"heapUsedBytes": 69727072,
"domNodes": -279,
"jsHeapTotalBytes": -1089536,
"scriptDurationMs": 126.36200000000001,
"eventListeners": -1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2020.2800000000138,
"styleRecalcs": 6,
"styleRecalcDurationMs": 4.305999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 461.093,
"heapDeltaBytes": -21288884,
"heapUsedBytes": 71379280,
"domNodes": -273,
"jsHeapTotalBytes": 4190208,
"scriptDurationMs": 27.937,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2036.4319999999907,
"styleRecalcs": 6,
"styleRecalcDurationMs": 3.5340000000000007,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 433.60800000000006,
"heapDeltaBytes": -18927228,
"heapUsedBytes": 73608300,
"domNodes": -270,
"jsHeapTotalBytes": -1839104,
"scriptDurationMs": 21.278000000000002,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 527.8319999999894,
"styleRecalcs": 46,
"styleRecalcDurationMs": 6.009000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 365.281,
"heapDeltaBytes": 18029544,
"heapUsedBytes": 87743260,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 92.734,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 550.2920000000131,
"styleRecalcs": 46,
"styleRecalcDurationMs": 6.4159999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 374.092,
"heapDeltaBytes": 17258924,
"heapUsedBytes": 88062056,
"domNodes": 18,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 95.98,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1992.3700000000508,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.391,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 402.132,
"heapDeltaBytes": -7610620,
"heapUsedBytes": 62295660,
"domNodes": -297,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 5.538,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2017.6529999999957,
"styleRecalcs": 12,
"styleRecalcDurationMs": 6.260999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 406.91299999999995,
"heapDeltaBytes": 5080272,
"heapUsedBytes": 74766836,
"domNodes": -292,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 6.446999999999999,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1711.4010000000235,
"styleRecalcs": 75,
"styleRecalcDurationMs": 23.475,
"layouts": 16,
"layoutDurationMs": 2.9819999999999998,
"taskDurationMs": 782.5849999999999,
"heapDeltaBytes": -2378572,
"heapUsedBytes": 68164688,
"domNodes": -295,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 70.395,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1731.0320000000274,
"styleRecalcs": 77,
"styleRecalcDurationMs": 23.758,
"layouts": 16,
"layoutDurationMs": 2.7009999999999996,
"taskDurationMs": 803.284,
"heapDeltaBytes": -2389408,
"heapUsedBytes": 68110884,
"domNodes": -293,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 70.93199999999999,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 932.6889999999821,
"styleRecalcs": 19,
"styleRecalcDurationMs": 23.596000000000007,
"layouts": 14,
"layoutDurationMs": 9.319999999999999,
"taskDurationMs": 723.225,
"heapDeltaBytes": 20797164,
"heapUsedBytes": 108343644,
"domNodes": 13671,
"jsHeapTotalBytes": 9961472,
"scriptDurationMs": 21.428999999999995,
"eventListeners": 2381,
"totalBlockingTimeMs": 99,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 12029.696000000002,
"styleRecalcs": 247,
"styleRecalcDurationMs": 24.005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6636.292,
"heapDeltaBytes": -5629864,
"heapUsedBytes": 85354884,
"domNodes": -271,
"jsHeapTotalBytes": 2285568,
"scriptDurationMs": 2188.305,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 12048.20099999995,
"styleRecalcs": 247,
"styleRecalcDurationMs": 22.938,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6578.798,
"heapDeltaBytes": -22404796,
"heapUsedBytes": 68091260,
"domNodes": -249,
"jsHeapTotalBytes": 4714496,
"scriptDurationMs": 2179.611,
"eventListeners": -157,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 10901.704999999993,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10420.535999999998,
"heapDeltaBytes": -14789456,
"heapUsedBytes": 176421112,
"domNodes": -6548,
"jsHeapTotalBytes": 540672,
"scriptDurationMs": 167.918,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 11963.39999999998,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11092.231,
"heapDeltaBytes": -32018104,
"heapUsedBytes": 181843976,
"domNodes": -6548,
"jsHeapTotalBytes": 8376320,
"scriptDurationMs": 193.44,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 14269.183999999996,
"styleRecalcs": 67,
"styleRecalcDurationMs": 11.893999999999988,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13657.428,
"heapDeltaBytes": -5260232,
"heapUsedBytes": 187098536,
"domNodes": -6549,
"jsHeapTotalBytes": -4276224,
"scriptDurationMs": 656.314,
"eventListeners": -7475,
"totalBlockingTimeMs": 68,
"frameDurationMs": 17.216666666666665,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14166.04499999994,
"styleRecalcs": 69,
"styleRecalcDurationMs": 11.715000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13598.091,
"heapDeltaBytes": -30297320,
"heapUsedBytes": 197232392,
"domNodes": -6548,
"jsHeapTotalBytes": 757760,
"scriptDurationMs": 607.822,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 92.01600000005783,
"styleRecalcs": 7,
"styleRecalcDurationMs": 9.136999999999999,
"layouts": 2,
"layoutDurationMs": 0.6809999999999999,
"taskDurationMs": 57.24299999999999,
"heapDeltaBytes": 3327268,
"heapUsedBytes": 70078624,
"domNodes": 123,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 3.7920000000000003,
"eventListeners": 25,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 448.3590000000959,
"styleRecalcs": 15,
"styleRecalcDurationMs": 14.402,
"layouts": 2,
"layoutDurationMs": 0.42200000000000004,
"taskDurationMs": 88.19200000000001,
"heapDeltaBytes": 5443740,
"heapUsedBytes": 72331308,
"domNodes": 123,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.523999999999999,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
} |
|
Important Review skippedToo many files! This PR contains 411 files, which is 111 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (14)
📒 Files selected for processing (411)
You can disable this status message by setting the 📝 WalkthroughWalkthroughThis PR migrates LiteGraph's link, reroute, and node topology from mutable slot mirrors ( Estimated code review effort: 5 (Critical) | ~180+ minutes ChangesCore ECS store migration (link/reroute/node-data/badge stores)
Sequence Diagram(s)sequenceDiagram
participant LGraphNode as LGraphNode (connect)
participant LGraph as LGraph
participant LinkStore as linkStore (Pinia)
participant RerouteStore as rerouteStore (Pinia)
participant LayoutStore as layoutStore (Pinia)
LGraphNode->>LGraph: _addLink(link)
LGraph->>LinkStore: registerLink(graphId, topology)
LGraph->>RerouteStore: anchorRerouteChain(link)
RerouteStore->>LinkStore: derive membership from parentId chain
Note over LGraphNode,LinkStore: input.link / output.links no longer written directly
LGraphNode->>LGraph: disconnectInput/disconnectOutput
LGraph->>LinkStore: deleteLink / unregisterLinkTopology
LGraph->>LayoutStore: deleteLinkLayout(linkId)
sequenceDiagram
participant Node as LGraphNode
participant Events as graph.events
participant Hooks as useErrorClearingHooks
participant Telemetry as installNodeAddedTelemetry
Node->>Events: dispatch('node:added', { node })
Events->>Hooks: node:added listener
Hooks->>Hooks: install per-node error hooks
Events->>Telemetry: node:added listener
Telemetry->>Telemetry: trackNodeAdded(node)
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
Updating Playwright Expectations |
There was a problem hiding this comment.
Actionable comments posted: 49
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/extensions/vueNodes/components/NodeSlots.vue (1)
10-19: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winCollapse the per-slot lookups into one computed row list.
getActualInputIndexnow runs three times per input during render (:key,:index, and inside:connected), each a linearfindIndexovernodeData.inputs— O(N²) per node render on the canvas hot path. Building the rows once also removes the duplicatedrootGraphIdguards inisInputConnected/isOutputConnected.♻️ Sketch
const inputRows = computed(() => { const graphId = canvasStore.rootGraphId return filteredInputs.value.map((input, filteredIndex) => { const actualIndex = nodeData.inputs.indexOf(input) const index = actualIndex !== -1 ? actualIndex : filteredIndex return { input, index, connected: graphId ? linkStore.isInputSlotConnected(graphId, nodeData.id, index) : false } }) })- <InputSlot - v-for="(input, index) in filteredInputs" - :key="`input-${input.name}-${getActualInputIndex(input, index)}`" - :slot-data="input" - :node-type="nodeData?.type || ''" - :node-id="nodeData.id" - :has-error="inputHasError(input)" - :index="getActualInputIndex(input, index)" - :connected="isInputConnected(getActualInputIndex(input, index))" - /> + <InputSlot + v-for="row in inputRows" + :key="`input-${row.input.name}-${row.index}`" + :slot-data="row.input" + :node-type="nodeData.type" + :node-id="nodeData.id" + :has-error="inputHasError(row.input)" + :index="row.index" + :connected="row.connected" + />Also applies to: 119-125
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/renderer/extensions/vueNodes/components/NodeSlots.vue` around lines 10 - 19, In NodeSlots.vue, add computed inputRows and outputRows that resolve each slot’s actual index once and calculate connection state using the rootGraphId within the computed mapping. Update the InputSlot and OutputSlot v-for blocks to consume these row objects for keys, slot data, indices, and connected state, removing repeated getActualInputIndex calls and redundant rootGraphId guards from isInputConnected/isOutputConnected.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts`:
- Around line 1360-1365: Update the link-resolution logic near the Preview Image
node to stop reading the removed inputs[0].link mirror. Resolve the node’s
connected link through the graph topology API or graph.links, then use that
link’s identifier with getLink to obtain parentId while preserving the existing
failure messages.
In `@docs/architecture/entity-interactions.md`:
- Around line 106-108: Update the Legend in entity-interactions.md to define the
-.- edge style used by the derived linkIds and floatingLinkIds relationships,
including its meaning as a dotted, non-directional derived relationship. Keep
the existing owns, references, and extends legend entries unchanged.
In `@docs/architecture/link-topology-store.md`:
- Around line 18-21: Add language annotations to both new fenced code blocks:
use an appropriate tag such as ts or text for the LinkTopology shape in
docs/architecture/link-topology-store.md lines 18-21, and ts for the BadgeData
union in docs/architecture/node-badge-store.md lines 40-44, resolving
markdownlint MD040 without changing the documented content.
In `@docs/architecture/node-data-store.md`:
- Around line 28-43: Add the TypeScript language identifier to the NodeState
fenced code block in the architecture documentation, changing the opening fence
to use ts while leaving the schema content unchanged.
In `@docs/architecture/proto-ecs-stores.md`:
- Around line 388-413: Update the migration matrix and priority entries to
reflect the implemented state: add NodeDataStore-extracted data to the Node row,
remove stale input.link/output.links mirror work from the Link and Slot gaps,
and adjust the related priority descriptions accordingly. Use the existing
NodeDataStore and output-slot-connectivity documentation as the source of truth
while preserving the remaining unimplemented extraction work.
In `@src/components/builder/AppModeWidgetList.vue`:
- Around line 89-110: Make mappedSelections a pure computed by removing
ensureSelectedWidgetState from its getter and register resolved widgets in a
watch/watchEffect driven by resolvedInputs instead. In the computed, check
isWidgetInputLinked before calling nodeToNodeData so filtered linked inputs do
not build unused data; preserve the existing selection mapping for unlinked
ALWAYS-mode entries.
In `@src/composables/graph/useNodeErrorFlagSync.test.ts`:
- Around line 32-34: Restore Vitest mocks before each test in the setup for this
suite, alongside setActivePinia, so the rootGraph and isGraphReady getter spies
created by setupGraphWithStore and the subgraph tests do not accumulate across
it blocks. Use the project’s required reset/restore pattern consistently for all
tests.
In `@src/composables/graph/useVueNodeLifecycle.ts`:
- Around line 94-99: Update disposeVueNodeLayout to clear all node entries from
layoutStore after stopping synchronization and listeners, undoing the data
seeded by initializeVueNodeLayout. Ensure the shouldRenderVueNodes transition
handled by the whenever block leaves layoutStore empty when Vue rendering is
disabled, preserving the existing cleanup state resets.
In `@src/composables/node/useNodePricing.ts`:
- Around line 589-593: The cache-miss fallback in the node pricing evaluation
flow must use the previous label for the current signature rather than the
newest label from any cached signature. Update the state associated with
scheduleEvaluation or the surrounding caller to track and return the last label
per signature/read context, while preserving the empty-string fallback when no
matching prior label exists.
In `@src/core/graph/subgraph/promotionUtils.ts`:
- Around line 298-308: Replace the direct promotedState.label mutation in the
hostInput promotion block with the widget store’s dedicated label-update action,
adding that action if none exists. Pass hostInput.widgetId and sourceSlot.label
through the store API so state invariants, telemetry, and persistence hooks are
preserved.
In `@src/core/graph/widgets/dynamicWidgets.test.ts`:
- Around line 10-11: Remove the redundant module-level
setActivePinia(createTestingPinia({ stubActions: false })) call in
dynamicWidgets.test.ts, keeping the beforeEach setup as the sole initialization
so each test receives a fresh testing Pinia.
In `@src/core/graph/widgets/dynamicWidgets.ts`:
- Around line 269-276: Replace the deprecated indexed link lookup in the
topology loop with the graph’s store-consistent getLink() method, using
topology.id as the lookup key and preserving the existing missing-link continue
behavior.
- Around line 555-563: Move the syncNodeWidgetOrder(node) call out of the
toRemove iteration and invoke it once after the loop completes. Preserve the
existing widget removal and cleanup behavior, including skipping inputs without
a widget name.
In `@src/extensions/core/widgetInputs.test.ts`:
- Around line 19-37: Remove the explicit 30_000 ms timeout argument from the
synchronous test defined by “resets itself when the store reports a link the
graph cannot resolve,” leaving the test body and its assertions unchanged so
Vitest uses its default timeout.
In `@src/extensions/core/widgetValuePropagation.ts`:
- Around line 25-28: Update the early-return guard in the widget value
propagation function to account for both store links and extraLinks, allowing
propagation when extraLinks is non-empty even if linked is empty. Keep returning
early only when neither source contains endpoints, and preserve the existing
endpoint-merging behavior.
In `@src/lib/litegraph/src/__fixtures__/nodeHelpers.ts`:
- Around line 38-55: Update createTestWidgetNode to register an onTestFinished
cleanup alongside its WIDGET_NODE_TYPE registration, restoring the previous
LiteGraph.registered_node_types entry or removing the test type after the test
completes, matching createTestNode’s cleanup pattern. Keep node creation and
graph.add behavior unchanged.
In `@src/lib/litegraph/src/LGraph.inputSlotRealign.test.ts`:
- Around line 319-322: Update the parameter list for the parameterized test
“rekeys a serialized %s” to destructure each it.for tuple into its name and
usePurgedAlias values, ensuring both registered-link and purged-alias cases
execute with their intended boolean.
In `@src/lib/litegraph/src/LGraphCanvas.ts`:
- Line 5706: Update the clip-path shape selection near drawNodeShape to use
node.renderingShape instead of node.shape or a direct BOX fallback, keeping
clipping consistent with the shape resolved by the node body and its
class/default fallbacks.
In `@src/lib/litegraph/src/LGraphNode.test.ts`:
- Around line 878-899: Remove the redundant “defaults to a normal title” test
because it only checks constructor initialization. In the remaining “titleMode
in node state” test, avoid the private _state shape by asserting the NO_TITLE
value through the store-held state returned by getGraphNodesFor(...) or the
public title_mode accessor, while preserving coverage that TitlelessNode’s
static title_mode is propagated.
In `@src/lib/litegraph/src/LGraphNode.ts`:
- Around line 347-349: Make the _state accessors consistent by routing the id
setter, flags setter, and resizable setter through setTrackedState, ensuring
each emits node:property:changed like title, mode, color, bgcolor, and
showAdvanced. Update the affected setters and preserve their existing values and
behavior, including resizable changes triggered by pin() and configure().
- Around line 4023-4031: Optimize updateComputedDisabled to avoid repeated
inputs scans during rendering: update getSlotFromWidget or the surrounding
widget loop to return/reuse the matching input index and determine connectivity
directly from that result, rather than calling this.inputs.indexOf(slot) after
the lookup. Preserve the existing computedDisabled behavior for widgets without
slots, disabled widgets, and connected inputs.
- Around line 1149-1157: The output serialization mapping in LGraphNode
serialization currently masks a type mismatch with `@ts-expect-error`. Remove that
directive and reconcile the return type of outputAsSerialisable with the
ISserialisedNode outputs element type so the mapping type-checks without
suppression.
- Around line 1062-1070: Update the input restoration loop in configure() to
invoke onConnectionsChange only when the serialized input contains a link that
was successfully restored; skip the callback for bare inputs, matching the
output restoration behavior. Continue invoking onInputAdded for every input.
- Around line 1884-1911: Update removeInput so the replaceNodeInputs failure
path, identified when this.inputs still includes slotInfo, logs a warning before
returning. Keep the existing removal callback, floating-link adjustment, and
canvas-dirty behavior unchanged for successful removals.
In `@src/lib/litegraph/src/linkDeduplication.ts`:
- Around line 54-72: Remove the unused link lookup and its guard from
purgeOrphanedLinks; iterate over non-survivor ids and call graph._removeLink(id)
directly, preserving the survivor re-registration logic afterward.
In `@src/lib/litegraph/src/LLink.ts`:
- Around line 98-112: Update applyEndpointPatch to propagate failures from
useLinkStore().updateEndpoint instead of only logging result.error and returning
normally. Throw or otherwise surface the rejected patch through the existing
endpoint setter/configure call chain, while preserving direct Object.assign
behavior for unregistered links.
In `@src/lib/litegraph/src/node/slotLinks.ts`:
- Around line 156-158: Collapse the short single-statement if block in the
finalInputs validation by placing the condition and throw on one line,
preserving the existing duplicate-slot check and error message.
In `@src/lib/litegraph/src/node/slotUtils.test.ts`:
- Around line 32-43: Update the ordering assertion in the “serialises the links
leaving the slot, ascending by id” test to sort LinkId values with an explicit
numeric comparator. Keep the existing length assertion and verify
serialised.links against its numerically ascending copy.
In `@src/lib/litegraph/src/nodeBadgeDraw.ts`:
- Around line 76-86: The registerBadgeRowsProvider function permanently pins the
first provider and offers no cleanup path. Add an unregister/disposer mechanism
tied to the registered provider, or expose a reset API for HMR and tests, while
preserving rejection of conflicting active registrations.
- Around line 52-62: Update the badge construction loop to create the credits
icon only when row.kind is exactly 'credits', rather than treating every
non-core row as credits. Preserve core-row skipping and ensure other BadgeData
kinds are handled explicitly or rejected by the type system instead of silently
receiving the credits icon.
In `@src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts`:
- Around line 68-95: Update enableSubgraphNodeCreation to keep the event
listener and type-to-constructor registrations local to each helper instance.
Make the returned disposer remove its own listener and delete only registrations
whose current constructor still matches the locally stored constructor,
preventing helpers from affecting each other; add coverage that creates another
subgraph after disposal and verifies no registration occurs.
In `@src/lib/litegraph/src/subgraph/subgraphDeduplication.ts`:
- Around line 114-129: Parameterize findNextAvailableId with an identifier-space
label and use it in the exhaustion error instead of the hardcoded node-specific
message. Update each caller, including node and reroute ID allocation, to
provide the appropriate label while preserving the existing allocation behavior.
In `@src/lib/litegraph/src/subgraph/subgraphUtils.test.ts`:
- Line 3: Update the tests in subgraphUtils.test.ts to restore mocked globals
after every test, using an afterEach hook with vi.restoreAllMocks(). Ensure
console.error is restored even when assertions fail, and remove any reliance on
cleanup that only runs after successful assertions.
In `@src/platform/cloud/subscription/composables/useFreeTierQuota.ts`:
- Around line 28-31: Update hasInvalidNodes in useFreeTierQuota to derive the
root graph from useCanvasStore().currentGraph instead of the non-reactive
app.graph, preserving the existing graphCreditsBadges check and false fallback.
Ensure the composable accesses the reactive currentGraph source so
freeTierExecutionPermitted recalculates after workflow switches.
In `@src/renderer/extensions/minimap/data/MinimapDataSource.test.ts`:
- Around line 48-59: Update registerNodeState so useNodeDataStore().registerNode
receives the graphId parameter as its store partition key instead of the
hardcoded GRAPH_ID, while continuing to set the same graphId on the created node
state.
In `@src/renderer/extensions/vueNodes/components/LGraphNode.vue`:
- Around line 702-711: Update the widgetIds computed in LGraphNode.vue to derive
graph identity from the reactive canvasStore.rootGraphId instead of
app.rootGraph?.id. Preserve the existing empty-result guard and getNodeWidgetIds
lookup, ensuring hasRenderableWidgets and downstream computeds refresh when the
root graph is replaced.
In `@src/renderer/extensions/vueNodes/components/NodeHeader.test.ts`:
- Around line 22-32: Replace the local makeNodeData fixture with the shared
createNodeState fixture from litegraphTestUtils, adding the required import and
passing the existing overrides through it. Remove the hand-rolled NodeState
defaults so shared fields, including the ALWAYS mode, remain consistent.
In `@src/renderer/extensions/vueNodes/components/NodeWidgets.test.ts`:
- Around line 265-267: Replace the Tailwind class assertion in the NodeWidgets
test with an assertion on a semantic error signal exposed by the widget row,
such as data-has-error or aria-invalid. Update the relevant widget-row rendering
symbol to provide that signal if needed, while preserving the existing error
behavior.
In `@src/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.ts`:
- Around line 342-351: Update the test around processWidgets to avoid asserting
the literal Tailwind value ring ring-component-node-widget-advanced. Verify the
advanced/non-advanced borderStyle behavior by comparing results for showAdvanced
or reuse a shared source constant, and apply the same change to the duplicate
assertion near the other advanced-widget test.
In `@src/renderer/extensions/vueNodes/composables/useProcessedWidgets.ts`:
- Around line 411-414: Update the valueTooltip logic in useProcessedWidgets so
object-valued asset/combo widgets do not produce a tooltip from String(value),
particularly avoiding “[object Object]”. Only attach the tooltip when the value
is a meaningful primitive string representation longer than 10 characters, while
preserving the existing type and length checks.
In `@src/renderer/glsl/useGLSLUniforms.test.ts`:
- Around line 21-32: Update makeGlslNode to use a real Subgraph and LiteGraph
links from the shared test factories instead of overriding getInputLink with a
hand-rolled inputs-to-subgraph mapping. Remove the getInputLink mock so
extractUniformSources exercises the actual LGraphNode.getInputLink behavior,
while preserving the test’s intended input-link setup.
In `@src/services/litegraphService.ts`:
- Around line 467-485: Extract the duplicated serialized-output merge into a
module-level helper, such as mergeSerialisedOutputs, preserving the existing
zip, RESERVED_KEYS merge, extra-output handling, and outputAsSerialisable
fallback. Replace the inline blocks in src/services/litegraphService.ts:467-485
and src/services/litegraphService.ts:579-597 with calls to the shared helper.
In `@src/stores/widgetValueStore.graphReactivity.test.ts`:
- Around line 279-293: Strengthen the test “registers plain render metadata for
non-promoted widgets” by replacing the definedness and absent sourceExecutionId
checks with assertions for the expected non-promoted render metadata, including
hasLayoutSize: false and isDOMWidget: false. Ensure the assertions distinguish
plain registration from promoted widget registration rather than only checking
defaults.
In `@src/stores/widgetValueStore.ts`:
- Around line 146-151: Update getWidgetRenderState to validate widgetId with the
existing isWidgetId guard before calling parseWidgetId; return undefined for
non-conforming IDs, matching getWidget’s behavior, while preserving the current
graph-state lookup for valid IDs.
- Around line 61-69: Split lazy creation from reads in the widget-order store:
add an ensure helper for mutation paths and a non-mutating peek helper for
reads. Update appendNodeWidgetOrder and setNodeWidgetOrder to use
ensureNodeWidgetOrder, and getNodeWidgetIds and reconcileNodeWidgetOrder to use
peekNodeWidgetOrder so computed reads do not insert entries. Apply the same
ensure/peek separation to getWidgetRenderState, ensuring read access does not
create per-graph maps.
In `@src/stores/workspace/favoritedWidgetsStore.ts`:
- Around line 76-79: Track the deferred migration from (nodeLocatorId,
widgetName) keys to host-scoped WidgetId keys by opening an issue that documents
the favoritedWidgets persistence-format change, required one-time migration of
workflow.extra.favoritedWidgets, and removal of the
isShownOnParents/favoriteNode indirection for promoted widgets.
In `@src/systems/badgeSystem.pricing.test.ts`:
- Around line 13-22: The getNodeDisplayPrice mock currently reads
useLinkStore().isInputSlotConnected, allowing the badge computed to react
without touchPricingSources registering the dependency. Make getNodeDisplayPrice
pure by deriving its result from node data or a plain test-controlled
counter/override, then update the test setup to flip that value and assert
recomputation specifically through touchPricingSources.
In `@src/systems/badgeSystem.ts`:
- Around line 212-220: Update the Settings map entries for
Comfy.NodeBadge.NodeIdBadgeMode, Comfy.NodeBadge.NodeLifeCycleBadgeMode, and
Comfy.NodeBadge.NodeSourceBadgeMode to use NodeBadgeMode, then remove the
corresponding assertions from the badgeModes initialization. Ensure
settingStore.get infers and returns NodeBadgeMode directly for these keys.
- Around line 167-187: Update gatherSubgraphCredits to touch all dynamic pricing
dependencies for the single inner API leaf, not only
pricing.getNodeRevisionRef(leaf.id). Reuse the dependency-registration behavior
from touchPricingSources, passing the appropriate inner graph-id keys from
wrapper.subgraph for priced widget values and input connections, while
preserving the existing multi-leaf and display-price behavior.
---
Outside diff comments:
In `@src/renderer/extensions/vueNodes/components/NodeSlots.vue`:
- Around line 10-19: In NodeSlots.vue, add computed inputRows and outputRows
that resolve each slot’s actual index once and calculate connection state using
the rootGraphId within the computed mapping. Update the InputSlot and OutputSlot
v-for blocks to consume these row objects for keys, slot data, indices, and
connected state, removing repeated getActualInputIndex calls and redundant
rootGraphId guards from isInputConnected/isOutputConnected.
🪄 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: ASSERTIVE
Plan: Pro Plus
Run ID: 77516a24-b905-4d0c-b70f-f93cbf262d19
⛔ Files ignored due to path filters (14)
browser_tests/tests/domWidget.spec.ts-snapshots/focus-mode-on-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/execution.spec.ts-snapshots/execution-error-unconnected-slot-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/graphCanvasMenu.spec.ts-snapshots/canvas-with-visible-links-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-default-workflow-mobile-chrome-linux.pngis excluded by!**/*.pngbrowser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-graph-canvas-toolbar-mobile-chrome-linux.pngis excluded by!**/*.pngbrowser_tests/tests/nodeBadge.spec.ts-snapshots/node-badge-left-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/saveImageAndWebp.spec.ts-snapshots/save-image-and-webm-preview-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/selectionToolbox.spec.ts-snapshots/selection-toolbox-multiple-nodes-border-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/selectionToolbox.spec.ts-snapshots/selection-toolbox-multiple-selections-border-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/selectionToolbox.spec.ts-snapshots/selection-toolbox-single-node-no-border-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/viewport.spec.ts-snapshots/viewport-fits-when-saved-offscreen-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts-snapshots/vue-nodes-paned-with-touch-mobile-chrome-linux.pngis excluded by!**/*.pngbrowser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-dark-all-colors-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-light-all-colors-chromium-linux.pngis excluded by!**/*.png
📒 Files selected for processing (272)
browser_tests/assets/missing/missing_model_nested_promoted_widget.jsonbrowser_tests/assets/missing/missing_models_in_subgraph.jsonbrowser_tests/assets/nodes/duplicate_node_ids.jsonbrowser_tests/fixtures/helpers/NodeOperationsHelper.tsbrowser_tests/tests/appModeBuilder.spec.tsbrowser_tests/tests/nodeBadge.spec.tsbrowser_tests/tests/nodeDisplay.spec.tsbrowser_tests/tests/propertiesPanel/errorsTabCloudMissingModels.spec.tsbrowser_tests/tests/propertiesPanel/errorsTabModeAware.spec.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.tsbrowser_tests/tests/vueNodes/nodeStates/registration.spec.tsbrowser_tests/tests/vueNodes/widgets/legacy.spec.tsbrowser_tests/tests/vueNodes/widgets/widgetReactivity.spec.tsbrowser_tests/tests/workflowPersistence.spec.tsdocs/adr/0008-entity-component-system.mddocs/architecture/domain-glossary.mddocs/architecture/ecs-lifecycle-scenarios.mddocs/architecture/ecs-migration-plan.mddocs/architecture/ecs-target-architecture.mddocs/architecture/entity-interactions.mddocs/architecture/entity-problems.mddocs/architecture/link-topology-store.mddocs/architecture/node-badge-store.mddocs/architecture/node-data-store.mddocs/architecture/output-slot-connectivity.mddocs/architecture/proto-ecs-stores.mddocs/architecture/reroute-chain-store.mdsrc/components/builder/AppModeWidgetList.vuesrc/components/graph/GraphCanvas.vuesrc/components/graph/widgets/domWidgetZIndex.test.tssrc/components/rightSidePanel/errors/useErrorGroups.test.tssrc/components/rightSidePanel/errors/useErrorGroups.tssrc/components/rightSidePanel/parameters/SectionWidgets.vuesrc/components/rightSidePanel/parameters/TabSubgraphInputs.test.tssrc/components/rightSidePanel/parameters/TabSubgraphInputs.vuesrc/components/rightSidePanel/parameters/WidgetActions.test.tssrc/components/rightSidePanel/parameters/WidgetActions.vuesrc/components/rightSidePanel/parameters/WidgetItem.test.tssrc/components/rightSidePanel/parameters/WidgetItem.vuesrc/components/rightSidePanel/subgraph/SubgraphEditor.test.tssrc/components/rightSidePanel/subgraph/SubgraphEditor.vuesrc/composables/graph/useErrorClearingHooks.test.tssrc/composables/graph/useErrorClearingHooks.tssrc/composables/graph/useGraphNodeManager.test.tssrc/composables/graph/useGraphNodeManager.tssrc/composables/graph/useNodeErrorFlagSync.test.tssrc/composables/graph/useVueNodeLifecycle.test.tssrc/composables/graph/useVueNodeLifecycle.tssrc/composables/node/useNodeBadge.tssrc/composables/node/useNodePricing.test.tssrc/composables/node/useNodePricing.tssrc/composables/node/usePriceBadge.test.tssrc/composables/node/usePriceBadge.tssrc/composables/useUpstreamValue.test.tssrc/composables/useUpstreamValue.tssrc/core/graph/subgraph/migration/proxyWidgetMigration.test.tssrc/core/graph/subgraph/migration/proxyWidgetMigration.tssrc/core/graph/subgraph/promotedInputWidget.tssrc/core/graph/subgraph/promotionUtils.test.tssrc/core/graph/subgraph/promotionUtils.tssrc/core/graph/subgraph/resolveConcretePromotedWidget.test.tssrc/core/graph/subgraph/resolveSubgraphInputLink.tssrc/core/graph/widgets/dynamicWidgets.test.tssrc/core/graph/widgets/dynamicWidgets.tssrc/core/graph/widgets/matchTypeConfiguring.test.tssrc/extensions/core/groupNode.tssrc/extensions/core/load3d.tssrc/extensions/core/rerouteNode.tssrc/extensions/core/saveImageExtraOutput.test.tssrc/extensions/core/widgetInputs.test.tssrc/extensions/core/widgetInputs.tssrc/extensions/core/widgetValuePropagation.test.tssrc/extensions/core/widgetValuePropagation.tssrc/lib/litegraph/src/LGraph.inputSlotRealign.test.tssrc/lib/litegraph/src/LGraph.serialise.test.tssrc/lib/litegraph/src/LGraph.test.tssrc/lib/litegraph/src/LGraph.tssrc/lib/litegraph/src/LGraphBadge.tssrc/lib/litegraph/src/LGraphCanvas.clipboard.test.tssrc/lib/litegraph/src/LGraphCanvas.cloneZIndex.test.tssrc/lib/litegraph/src/LGraphCanvas.drawConnections.test.tssrc/lib/litegraph/src/LGraphCanvas.ghost.test.tssrc/lib/litegraph/src/LGraphCanvas.groupSelection.test.tssrc/lib/litegraph/src/LGraphCanvas.slotHitDetection.test.tssrc/lib/litegraph/src/LGraphCanvas.tssrc/lib/litegraph/src/LGraphNode.nodeState.test.tssrc/lib/litegraph/src/LGraphNode.test.tssrc/lib/litegraph/src/LGraphNode.tssrc/lib/litegraph/src/LGraphNodeProperties.test.tssrc/lib/litegraph/src/LGraphNodeProperties.tssrc/lib/litegraph/src/LLink.store.test.tssrc/lib/litegraph/src/LLink.test.tssrc/lib/litegraph/src/LLink.tssrc/lib/litegraph/src/LiteGraphGlobal.tssrc/lib/litegraph/src/Reroute.store.test.tssrc/lib/litegraph/src/Reroute.tssrc/lib/litegraph/src/__fixtures__/nodeHelpers.tssrc/lib/litegraph/src/canvas/FloatingRenderLink.test.tssrc/lib/litegraph/src/canvas/FloatingRenderLink.tssrc/lib/litegraph/src/canvas/LinkConnector.core.test.tssrc/lib/litegraph/src/canvas/LinkConnector.integration.test.tssrc/lib/litegraph/src/canvas/LinkConnector.test.tssrc/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/LinkConnectorSubgraphInputValidation.test.tssrc/lib/litegraph/src/canvas/ToInputFromIoNodeLink.tssrc/lib/litegraph/src/canvas/ToInputRenderLink.tssrc/lib/litegraph/src/infrastructure/LGraphEventMap.tssrc/lib/litegraph/src/interfaces.tssrc/lib/litegraph/src/linkDeduplication.tssrc/lib/litegraph/src/litegraph.tssrc/lib/litegraph/src/node/NodeInputSlot.test.tssrc/lib/litegraph/src/node/NodeInputSlot.tssrc/lib/litegraph/src/node/NodeOutputSlot.test.tssrc/lib/litegraph/src/node/NodeOutputSlot.tssrc/lib/litegraph/src/node/NodeSlot.test.tssrc/lib/litegraph/src/node/NodeSlot.tssrc/lib/litegraph/src/node/SlotBase.tssrc/lib/litegraph/src/node/slotEcosystemPatterns.test.tssrc/lib/litegraph/src/node/slotLinks.test.tssrc/lib/litegraph/src/node/slotLinks.tssrc/lib/litegraph/src/node/slotUtils.test.tssrc/lib/litegraph/src/node/slotUtils.tssrc/lib/litegraph/src/nodeBadgeDraw.test.tssrc/lib/litegraph/src/nodeBadgeDraw.tssrc/lib/litegraph/src/serialization.test.tssrc/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.tssrc/lib/litegraph/src/subgraph/ExecutableNodeDTO.tssrc/lib/litegraph/src/subgraph/SubgraphConversion.test.tssrc/lib/litegraph/src/subgraph/SubgraphIO.test.tssrc/lib/litegraph/src/subgraph/SubgraphInput.tssrc/lib/litegraph/src/subgraph/SubgraphInputNode.tssrc/lib/litegraph/src/subgraph/SubgraphNode.tssrc/lib/litegraph/src/subgraph/SubgraphOutput.tssrc/lib/litegraph/src/subgraph/SubgraphSerialization.test.tssrc/lib/litegraph/src/subgraph/SubgraphSlotConnections.test.tssrc/lib/litegraph/src/subgraph/SubgraphWidgetPromotion.test.tssrc/lib/litegraph/src/subgraph/__fixtures__/README.mdsrc/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.test.tssrc/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.tssrc/lib/litegraph/src/subgraph/subgraphDeduplication.test.tssrc/lib/litegraph/src/subgraph/subgraphDeduplication.tssrc/lib/litegraph/src/subgraph/subgraphUtils.test.tssrc/lib/litegraph/src/subgraph/subgraphUtils.tssrc/lib/litegraph/src/types/graphTriggers.tssrc/lib/litegraph/src/types/serialisation.tssrc/lib/litegraph/src/types/widgets.tssrc/lib/litegraph/src/utils/collections.test.tssrc/lib/litegraph/src/utils/collections.tssrc/lib/litegraph/src/utils/widget.tssrc/lib/litegraph/src/widgets/BaseWidget.test.tssrc/lib/litegraph/src/widgets/BaseWidget.tssrc/locales/ar/main.jsonsrc/locales/en/main.jsonsrc/locales/es/main.jsonsrc/locales/fa/main.jsonsrc/locales/fr/main.jsonsrc/locales/he/main.jsonsrc/locales/ja/main.jsonsrc/locales/ko/main.jsonsrc/locales/pt-BR/main.jsonsrc/locales/ru/main.jsonsrc/locales/tr/main.jsonsrc/locales/zh-TW/main.jsonsrc/locales/zh/main.jsonsrc/platform/cloud/subscription/composables/useFreeTierQuota.tssrc/platform/missingMedia/missingMediaStore.tssrc/platform/missingModel/missingModelScan.test.tssrc/platform/missingModel/missingModelScan.tssrc/platform/missingModel/missingModelStore.tssrc/platform/nodeReplacement/useNodeReplacement.test.tssrc/platform/nodeReplacement/useNodeReplacement.tssrc/platform/telemetry/nodeAdded/installNodeAddedTelemetry.test.tssrc/platform/telemetry/nodeAdded/installNodeAddedTelemetry.tssrc/platform/workflow/core/services/workflowService.insertWorkflow.test.tssrc/platform/workflow/core/services/workflowService.tssrc/renderer/core/canvas/canvasStore.test.tssrc/renderer/core/canvas/canvasStore.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/renderer/core/layout/operations/layoutMutations.test.tssrc/renderer/core/layout/operations/layoutMutations.tssrc/renderer/core/layout/store/layoutStore.test.tssrc/renderer/core/layout/store/layoutStore.tssrc/renderer/core/layout/types.tssrc/renderer/extensions/linearMode/PartnerNodesList.vuesrc/renderer/extensions/minimap/composables/useMinimap.test.tssrc/renderer/extensions/minimap/composables/useMinimapGraph.test.tssrc/renderer/extensions/minimap/composables/useMinimapGraph.tssrc/renderer/extensions/minimap/data/AbstractMinimapDataSource.tssrc/renderer/extensions/minimap/data/LayoutStoreDataSource.tssrc/renderer/extensions/minimap/data/MinimapDataSource.test.tssrc/renderer/extensions/minimap/data/MinimapDataSourceFactory.tssrc/renderer/extensions/minimap/minimapCanvasRenderer.test.tssrc/renderer/extensions/vueNodes/components/LGraphNode.subgraph.test.tssrc/renderer/extensions/vueNodes/components/LGraphNode.test.tssrc/renderer/extensions/vueNodes/components/LGraphNode.vuesrc/renderer/extensions/vueNodes/components/LGraphNodePreview.test.tssrc/renderer/extensions/vueNodes/components/LGraphNodePreview.vuesrc/renderer/extensions/vueNodes/components/NodeContent.vuesrc/renderer/extensions/vueNodes/components/NodeHeader.test.tssrc/renderer/extensions/vueNodes/components/NodeHeader.vuesrc/renderer/extensions/vueNodes/components/NodeSlots.test.tssrc/renderer/extensions/vueNodes/components/NodeSlots.vuesrc/renderer/extensions/vueNodes/components/NodeWidgets.test.tssrc/renderer/extensions/vueNodes/components/NodeWidgets.vuesrc/renderer/extensions/vueNodes/components/WidgetGrid.vuesrc/renderer/extensions/vueNodes/composables/useNodeEventHandlers.test.tssrc/renderer/extensions/vueNodes/composables/useNodeEventHandlers.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.tssrc/renderer/extensions/vueNodes/composables/useNodeTooltips.test.tssrc/renderer/extensions/vueNodes/composables/useNodeTooltips.tssrc/renderer/extensions/vueNodes/composables/usePartitionedBadges.test.tssrc/renderer/extensions/vueNodes/composables/usePartitionedBadges.tssrc/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.tssrc/renderer/extensions/vueNodes/composables/useProcessedWidgets.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.autoPan.test.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.test.tssrc/renderer/extensions/vueNodes/layout/nodeSizeReflow.test.tssrc/renderer/extensions/vueNodes/types/widgetGrid.tssrc/renderer/extensions/vueNodes/utils/__tests__/nodeDataUtils.test.tssrc/renderer/extensions/vueNodes/utils/nodeDataUtils.tssrc/renderer/extensions/vueNodes/utils/nodeErrorState.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetButton.test.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetButton.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetDOM.test.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetDOM.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetLegacy.vuesrc/renderer/extensions/vueNodes/widgets/composables/useImageUploadWidget.test.tssrc/renderer/extensions/vueNodes/widgets/composables/useProgressTextWidget.tssrc/renderer/extensions/vueNodes/widgets/composables/useWidgetRenderer.test.tssrc/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.tssrc/renderer/glsl/glslPreviewUtils.tssrc/renderer/glsl/useGLSLUniforms.test.tssrc/renderer/glsl/useGLSLUniforms.tssrc/scripts/app.test.tssrc/scripts/app.tssrc/scripts/promotedWidgetControl.test.tssrc/scripts/promotedWidgetControl.tssrc/scripts/widgets.tssrc/services/litegraphService.tssrc/stores/appModeStore.test.tssrc/stores/linkStore.test.tssrc/stores/linkStore.tssrc/stores/nodeDataStore.test.tssrc/stores/nodeDataStore.tssrc/stores/rerouteStore.test.tssrc/stores/rerouteStore.tssrc/stores/widgetValueStore.graphReactivity.test.tssrc/stores/widgetValueStore.test.tssrc/stores/widgetValueStore.tssrc/stores/workspace/favoritedWidgetsStore.tssrc/systems/badgeSystem.pricing.test.tssrc/systems/badgeSystem.subgraph.test.tssrc/systems/badgeSystem.test.tssrc/systems/badgeSystem.tssrc/types/badgeData.tssrc/types/linkTopology.tssrc/types/nodeState.tssrc/types/rerouteChain.tssrc/types/simplifiedWidget.tssrc/types/widgetState.tssrc/utils/__tests__/litegraphTestUtils.tssrc/utils/graphTraversalUtil.test.tssrc/utils/graphTraversalUtil.tssrc/utils/linkFixer.test.tssrc/utils/linkFixer.tssrc/utils/litegraphUtil.test.tssrc/utils/litegraphUtil.tssrc/utils/searchAndReplace.test.tssrc/utils/widgetUtil.tstools/devtools/web/legacyWidget.js
💤 Files with no reviewable changes (27)
- src/lib/litegraph/src/LGraphNodeProperties.test.ts
- src/composables/node/usePriceBadge.test.ts
- src/composables/node/usePriceBadge.ts
- src/lib/litegraph/src/LGraphNodeProperties.ts
- src/lib/litegraph/src/LGraphBadge.ts
- src/composables/graph/useGraphNodeManager.ts
- src/composables/graph/useGraphNodeManager.test.ts
- browser_tests/tests/nodeBadge.spec.ts
- src/locales/ru/main.json
- src/lib/litegraph/src/canvas/ToInputRenderLink.ts
- src/locales/ar/main.json
- src/locales/ja/main.json
- src/locales/zh/main.json
- src/lib/litegraph/src/types/graphTriggers.ts
- src/lib/litegraph/src/node/SlotBase.ts
- src/locales/zh-TW/main.json
- src/locales/tr/main.json
- src/lib/litegraph/src/canvas/ToInputFromIoNodeLink.ts
- src/locales/es/main.json
- src/locales/fr/main.json
- src/locales/fa/main.json
- src/scripts/app.ts
- browser_tests/fixtures/helpers/NodeOperationsHelper.ts
- src/renderer/core/layout/types.ts
- src/locales/ko/main.json
- src/locales/pt-BR/main.json
- src/locales/he/main.json
| const linkId = graph.nodes.find((n) => n.title === 'Preview Image') | ||
| ?.inputs[0].link | ||
| if (!linkId) return 'failed to resolve link id' | ||
|
|
||
| const rerouteId = graph.getLink(linkId)?.parentId | ||
| if (!rerouteId) return 'failed to resolve reroute id' |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Stop reading the removed input-link mirror.
input.link is a legacy mirror removed by this migration, so this poll cannot resolve the link. Find the Preview Image link through the graph topology API/store (or graph.links) before checking its parentId.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts`
around lines 1360 - 1365, Update the link-resolution logic near the Preview
Image node to stop reading the removed inputs[0].link mirror. Resolve the node’s
connected link through the graph topology API or graph.links, then use that
link’s identifier with getLink to obtain parentId while preserving the existing
failure messages.
There was a problem hiding this comment.
There was a problem hiding this comment.
@DrJKL, thanks for the clarification. The current NodeInputSlot.link compatibility getter reads the link-store state. Therefore, this poll can resolve the Preview Image link and inspect its parentId.
I withdraw this finding.
✏️ Learnings added
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 14246
File: browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts:1360-1365
Timestamp: 2026-08-24T04:11:37.361Z
Learning: In `src/lib/litegraph/src/node/NodeInputSlot.ts`, `NodeInputSlot.link` is a deprecated, store-backed compatibility getter. It can validly resolve the current input link for compatibility code and browser tests, even though new code should prefer the graph topology APIs where practical.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
@DrJKL I agree that this finding should be withdrawn, but I couldn't resolve this review thread on the repository platform, so it remains open. Please retry or resolve it manually.
You are interacting with an AI system.
| const mappedSelections = computed((): WidgetEntry[] => { | ||
| return resolvedInputs.value.flatMap((entry) => { | ||
| if (entry.status !== 'resolved') return [] | ||
| const { widgetId, node, widget, config } = entry | ||
| if (node.mode !== LGraphEventMode.ALWAYS) return [] | ||
|
|
||
| if (!nodeDataByNode.has(node)) { | ||
| nodeDataByNode.set(node, nodeToNodeData(node)) | ||
| } | ||
| const fullNodeData = nodeDataByNode.get(node)! | ||
|
|
||
| const matchingWidget = fullNodeData.widgets?.find((vueWidget) => { | ||
| if (vueWidget.slotMetadata?.linked) return false | ||
| return vueWidget.widgetId === widgetId | ||
| }) | ||
| if (!matchingWidget) return [] | ||
|
|
||
| matchingWidget.slotMetadata = undefined | ||
| matchingWidget.nodeId = node.id | ||
| ensureSelectedWidgetState(widgetId, widget) | ||
| const fullNodeData = nodeToNodeData(node, widgetId) | ||
| if (isWidgetInputLinked(node, widget.name)) return [] | ||
|
|
||
| return [ | ||
| { | ||
| key: widgetId, | ||
| persistedHeight: config?.height, | ||
| description: config?.description, | ||
| nodeData: { | ||
| ...fullNodeData, | ||
| widgets: [matchingWidget] | ||
| }, | ||
| nodeData: fullNodeData, | ||
| widgetIds: [widgetId], | ||
| action: { widget, node } | ||
| } | ||
| ] | ||
| }) | ||
| }) |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
mappedSelections mutates store state while deriving.
ensureSelectedWidgetState writes into widgetValueStore from inside a computed getter that also reads widgetValueStore.getWidget(...). Registering a widget invalidates the map this getter just tracked, so the computed re-runs on its own write (it only converges because the second pass short-circuits). Registration belongs in a watchEffect/watch on resolvedInputs, leaving the computed pure.
Also, nodeToNodeData(node, widgetId) (which builds a drop indicator and an image URL) is evaluated before the isWidgetInputLinked early return, so it is wasted for every filtered-out row.
♻️ Proposed restructure
-const mappedSelections = computed((): WidgetEntry[] => {
+watchEffect(() => {
+ for (const entry of resolvedInputs.value) {
+ if (entry.status !== 'resolved') continue
+ ensureSelectedWidgetState(entry.widgetId, entry.widget)
+ }
+})
+
+const mappedSelections = computed((): WidgetEntry[] => {
return resolvedInputs.value.flatMap((entry) => {
if (entry.status !== 'resolved') return []
const { widgetId, node, widget, config } = entry
if (node.mode !== LGraphEventMode.ALWAYS) return []
-
- ensureSelectedWidgetState(widgetId, widget)
- const fullNodeData = nodeToNodeData(node, widgetId)
if (isWidgetInputLinked(node, widget.name)) return []
return [
{
key: widgetId,
persistedHeight: config?.height,
description: config?.description,
- nodeData: fullNodeData,
+ nodeData: nodeToNodeData(node, widgetId),
widgetIds: [widgetId],
action: { widget, node }
}
]
})
})📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const mappedSelections = computed((): WidgetEntry[] => { | |
| return resolvedInputs.value.flatMap((entry) => { | |
| if (entry.status !== 'resolved') return [] | |
| const { widgetId, node, widget, config } = entry | |
| if (node.mode !== LGraphEventMode.ALWAYS) return [] | |
| if (!nodeDataByNode.has(node)) { | |
| nodeDataByNode.set(node, nodeToNodeData(node)) | |
| } | |
| const fullNodeData = nodeDataByNode.get(node)! | |
| const matchingWidget = fullNodeData.widgets?.find((vueWidget) => { | |
| if (vueWidget.slotMetadata?.linked) return false | |
| return vueWidget.widgetId === widgetId | |
| }) | |
| if (!matchingWidget) return [] | |
| matchingWidget.slotMetadata = undefined | |
| matchingWidget.nodeId = node.id | |
| ensureSelectedWidgetState(widgetId, widget) | |
| const fullNodeData = nodeToNodeData(node, widgetId) | |
| if (isWidgetInputLinked(node, widget.name)) return [] | |
| return [ | |
| { | |
| key: widgetId, | |
| persistedHeight: config?.height, | |
| description: config?.description, | |
| nodeData: { | |
| ...fullNodeData, | |
| widgets: [matchingWidget] | |
| }, | |
| nodeData: fullNodeData, | |
| widgetIds: [widgetId], | |
| action: { widget, node } | |
| } | |
| ] | |
| }) | |
| }) | |
| watchEffect(() => { | |
| for (const entry of resolvedInputs.value) { | |
| if (entry.status !== 'resolved') continue | |
| ensureSelectedWidgetState(entry.widgetId, entry.widget) | |
| } | |
| }) | |
| const mappedSelections = computed((): WidgetEntry[] => { | |
| return resolvedInputs.value.flatMap((entry) => { | |
| if (entry.status !== 'resolved') return [] | |
| const { widgetId, node, widget, config } = entry | |
| if (node.mode !== LGraphEventMode.ALWAYS) return [] | |
| if (isWidgetInputLinked(node, widget.name)) return [] | |
| return [ | |
| { | |
| key: widgetId, | |
| persistedHeight: config?.height, | |
| description: config?.description, | |
| nodeData: nodeToNodeData(node, widgetId), | |
| widgetIds: [widgetId], | |
| action: { widget, node } | |
| } | |
| ] | |
| }) | |
| }) |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/components/builder/AppModeWidgetList.vue` around lines 89 - 110, Make
mappedSelections a pure computed by removing ensureSelectedWidgetState from its
getter and register resolved widgets in a watch/watchEffect driven by
resolvedInputs instead. In the computed, check isWidgetInputLinked before
calling nodeToNodeData so filtered linked inputs do not build unused data;
preserve the existing selection mapping for unlinked ALWAYS-mode entries.
There was a problem hiding this comment.
@DrJKL, thanks for the update. The change in #15610 addresses the side effect in mappedSelections by moving widget registration out of computed derivation.
@DrJKL Thanks for confirming the fix. I couldn't resolve this review thread on the repository platform, so it remains open. Please retry or resolve it manually.
You are interacting with an AI system.
| vi.spyOn(app, 'rootGraph', 'get').mockReturnValue(graph) | ||
| vi.spyOn(app, 'isGraphReady', 'get').mockReturnValue(true) | ||
|
|
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Spies on app.rootGraph/app.isGraphReady are never restored between tests.
setupGraphWithStore() (and the two subgraph tests) call vi.spyOn(app, 'rootGraph', 'get')/vi.spyOn(app, 'isGraphReady', 'get') repeatedly across 7 it() blocks, but beforeEach only calls setActivePinia(...) — there's no vi.restoreAllMocks()/vi.resetAllMocks(). Each new vi.spyOn wraps the previous spy instead of replacing it cleanly, which is harmless today but is exactly the pattern the testing guidance calls out.
♻️ Suggested fix
beforeEach(() => {
setActivePinia(createTestingPinia({ stubActions: false }))
})
+
+ afterEach(() => {
+ vi.restoreAllMocks()
+ })Based on learnings, "Mocking: keep vi.mock() module mocks contained; reset with vi.resetAllMocks() in beforeEach" (docs/testing/vitest-patterns.md, required context for this test file).
Also applies to: 127-129, 208-210
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/composables/graph/useNodeErrorFlagSync.test.ts` around lines 32 - 34,
Restore Vitest mocks before each test in the setup for this suite, alongside
setActivePinia, so the rootGraph and isGraphReady getter spies created by
setupGraphWithStore and the subgraph tests do not accumulate across it blocks.
Use the project’s required reset/restore pattern consistently for all tests.
Source: Path instructions
There was a problem hiding this comment.
Verified obsolete against the current stack. Vitest is configured with restoreMocks: true in vite.config.mts:752, so these getter spies are restored even if a test assertion throws; repeated wrapping does not leak across tests.
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- vite.config.mts around Line 752 ---'
sed -n '735,765p' vite.config.mts
printf '%s\n' '--- useNodeErrorFlagSync.test.ts setup and spy locations ---'
rg -n -C 3 "restoreMocks|spyOn\(app, '(rootGraph|isGraphReady)', 'get'\)|beforeEach" \
src/composables/graph/useNodeErrorFlagSync.test.ts vite.config.mtsLength of output: 5332
@DrJKL, confirmed. vite.config.mts sets test.restoreMocks: true at Line 752. Vitest restores the getter spies after each test. The spies in useNodeErrorFlagSync.test.ts do not accumulate across test cases. This finding is obsolete.
✏️ Learnings added
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 14246
File: src/composables/graph/useNodeErrorFlagSync.test.ts:32-34
Timestamp: 2026-08-24T04:12:09.944Z
Learning: The Vitest configuration in `vite.config.mts` sets `test.restoreMocks: true`. Getter spies created with `vi.spyOn` in Vitest tests are restored after each test, so they do not accumulate across `it` blocks.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
@DrJKL I agree that this finding should be withdrawn, but I couldn't resolve this review thread on the repository platform, so it remains open. Please retry or resolve it manually.
You are interacting with an AI system.
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 49
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/extensions/vueNodes/components/NodeSlots.vue (1)
10-19: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winCollapse the per-slot lookups into one computed row list.
getActualInputIndexnow runs three times per input during render (:key,:index, and inside:connected), each a linearfindIndexovernodeData.inputs— O(N²) per node render on the canvas hot path. Building the rows once also removes the duplicatedrootGraphIdguards inisInputConnected/isOutputConnected.♻️ Sketch
const inputRows = computed(() => { const graphId = canvasStore.rootGraphId return filteredInputs.value.map((input, filteredIndex) => { const actualIndex = nodeData.inputs.indexOf(input) const index = actualIndex !== -1 ? actualIndex : filteredIndex return { input, index, connected: graphId ? linkStore.isInputSlotConnected(graphId, nodeData.id, index) : false } }) })- <InputSlot - v-for="(input, index) in filteredInputs" - :key="`input-${input.name}-${getActualInputIndex(input, index)}`" - :slot-data="input" - :node-type="nodeData?.type || ''" - :node-id="nodeData.id" - :has-error="inputHasError(input)" - :index="getActualInputIndex(input, index)" - :connected="isInputConnected(getActualInputIndex(input, index))" - /> + <InputSlot + v-for="row in inputRows" + :key="`input-${row.input.name}-${row.index}`" + :slot-data="row.input" + :node-type="nodeData.type" + :node-id="nodeData.id" + :has-error="inputHasError(row.input)" + :index="row.index" + :connected="row.connected" + />Also applies to: 119-125
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/renderer/extensions/vueNodes/components/NodeSlots.vue` around lines 10 - 19, In NodeSlots.vue, add computed inputRows and outputRows that resolve each slot’s actual index once and calculate connection state using the rootGraphId within the computed mapping. Update the InputSlot and OutputSlot v-for blocks to consume these row objects for keys, slot data, indices, and connected state, removing repeated getActualInputIndex calls and redundant rootGraphId guards from isInputConnected/isOutputConnected.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts`:
- Around line 1360-1365: Update the link-resolution logic near the Preview Image
node to stop reading the removed inputs[0].link mirror. Resolve the node’s
connected link through the graph topology API or graph.links, then use that
link’s identifier with getLink to obtain parentId while preserving the existing
failure messages.
In `@docs/architecture/entity-interactions.md`:
- Around line 106-108: Update the Legend in entity-interactions.md to define the
-.- edge style used by the derived linkIds and floatingLinkIds relationships,
including its meaning as a dotted, non-directional derived relationship. Keep
the existing owns, references, and extends legend entries unchanged.
In `@docs/architecture/link-topology-store.md`:
- Around line 18-21: Add language annotations to both new fenced code blocks:
use an appropriate tag such as ts or text for the LinkTopology shape in
docs/architecture/link-topology-store.md lines 18-21, and ts for the BadgeData
union in docs/architecture/node-badge-store.md lines 40-44, resolving
markdownlint MD040 without changing the documented content.
In `@docs/architecture/node-data-store.md`:
- Around line 28-43: Add the TypeScript language identifier to the NodeState
fenced code block in the architecture documentation, changing the opening fence
to use ts while leaving the schema content unchanged.
In `@docs/architecture/proto-ecs-stores.md`:
- Around line 388-413: Update the migration matrix and priority entries to
reflect the implemented state: add NodeDataStore-extracted data to the Node row,
remove stale input.link/output.links mirror work from the Link and Slot gaps,
and adjust the related priority descriptions accordingly. Use the existing
NodeDataStore and output-slot-connectivity documentation as the source of truth
while preserving the remaining unimplemented extraction work.
In `@src/components/builder/AppModeWidgetList.vue`:
- Around line 89-110: Make mappedSelections a pure computed by removing
ensureSelectedWidgetState from its getter and register resolved widgets in a
watch/watchEffect driven by resolvedInputs instead. In the computed, check
isWidgetInputLinked before calling nodeToNodeData so filtered linked inputs do
not build unused data; preserve the existing selection mapping for unlinked
ALWAYS-mode entries.
In `@src/composables/graph/useNodeErrorFlagSync.test.ts`:
- Around line 32-34: Restore Vitest mocks before each test in the setup for this
suite, alongside setActivePinia, so the rootGraph and isGraphReady getter spies
created by setupGraphWithStore and the subgraph tests do not accumulate across
it blocks. Use the project’s required reset/restore pattern consistently for all
tests.
In `@src/composables/graph/useVueNodeLifecycle.ts`:
- Around line 94-99: Update disposeVueNodeLayout to clear all node entries from
layoutStore after stopping synchronization and listeners, undoing the data
seeded by initializeVueNodeLayout. Ensure the shouldRenderVueNodes transition
handled by the whenever block leaves layoutStore empty when Vue rendering is
disabled, preserving the existing cleanup state resets.
In `@src/composables/node/useNodePricing.ts`:
- Around line 589-593: The cache-miss fallback in the node pricing evaluation
flow must use the previous label for the current signature rather than the
newest label from any cached signature. Update the state associated with
scheduleEvaluation or the surrounding caller to track and return the last label
per signature/read context, while preserving the empty-string fallback when no
matching prior label exists.
In `@src/core/graph/subgraph/promotionUtils.ts`:
- Around line 298-308: Replace the direct promotedState.label mutation in the
hostInput promotion block with the widget store’s dedicated label-update action,
adding that action if none exists. Pass hostInput.widgetId and sourceSlot.label
through the store API so state invariants, telemetry, and persistence hooks are
preserved.
In `@src/core/graph/widgets/dynamicWidgets.test.ts`:
- Around line 10-11: Remove the redundant module-level
setActivePinia(createTestingPinia({ stubActions: false })) call in
dynamicWidgets.test.ts, keeping the beforeEach setup as the sole initialization
so each test receives a fresh testing Pinia.
In `@src/core/graph/widgets/dynamicWidgets.ts`:
- Around line 269-276: Replace the deprecated indexed link lookup in the
topology loop with the graph’s store-consistent getLink() method, using
topology.id as the lookup key and preserving the existing missing-link continue
behavior.
- Around line 555-563: Move the syncNodeWidgetOrder(node) call out of the
toRemove iteration and invoke it once after the loop completes. Preserve the
existing widget removal and cleanup behavior, including skipping inputs without
a widget name.
In `@src/extensions/core/widgetInputs.test.ts`:
- Around line 19-37: Remove the explicit 30_000 ms timeout argument from the
synchronous test defined by “resets itself when the store reports a link the
graph cannot resolve,” leaving the test body and its assertions unchanged so
Vitest uses its default timeout.
In `@src/extensions/core/widgetValuePropagation.ts`:
- Around line 25-28: Update the early-return guard in the widget value
propagation function to account for both store links and extraLinks, allowing
propagation when extraLinks is non-empty even if linked is empty. Keep returning
early only when neither source contains endpoints, and preserve the existing
endpoint-merging behavior.
In `@src/lib/litegraph/src/__fixtures__/nodeHelpers.ts`:
- Around line 38-55: Update createTestWidgetNode to register an onTestFinished
cleanup alongside its WIDGET_NODE_TYPE registration, restoring the previous
LiteGraph.registered_node_types entry or removing the test type after the test
completes, matching createTestNode’s cleanup pattern. Keep node creation and
graph.add behavior unchanged.
In `@src/lib/litegraph/src/LGraph.inputSlotRealign.test.ts`:
- Around line 319-322: Update the parameter list for the parameterized test
“rekeys a serialized %s” to destructure each it.for tuple into its name and
usePurgedAlias values, ensuring both registered-link and purged-alias cases
execute with their intended boolean.
In `@src/lib/litegraph/src/LGraphCanvas.ts`:
- Line 5706: Update the clip-path shape selection near drawNodeShape to use
node.renderingShape instead of node.shape or a direct BOX fallback, keeping
clipping consistent with the shape resolved by the node body and its
class/default fallbacks.
In `@src/lib/litegraph/src/LGraphNode.test.ts`:
- Around line 878-899: Remove the redundant “defaults to a normal title” test
because it only checks constructor initialization. In the remaining “titleMode
in node state” test, avoid the private _state shape by asserting the NO_TITLE
value through the store-held state returned by getGraphNodesFor(...) or the
public title_mode accessor, while preserving coverage that TitlelessNode’s
static title_mode is propagated.
In `@src/lib/litegraph/src/LGraphNode.ts`:
- Around line 347-349: Make the _state accessors consistent by routing the id
setter, flags setter, and resizable setter through setTrackedState, ensuring
each emits node:property:changed like title, mode, color, bgcolor, and
showAdvanced. Update the affected setters and preserve their existing values and
behavior, including resizable changes triggered by pin() and configure().
- Around line 4023-4031: Optimize updateComputedDisabled to avoid repeated
inputs scans during rendering: update getSlotFromWidget or the surrounding
widget loop to return/reuse the matching input index and determine connectivity
directly from that result, rather than calling this.inputs.indexOf(slot) after
the lookup. Preserve the existing computedDisabled behavior for widgets without
slots, disabled widgets, and connected inputs.
- Around line 1149-1157: The output serialization mapping in LGraphNode
serialization currently masks a type mismatch with `@ts-expect-error`. Remove that
directive and reconcile the return type of outputAsSerialisable with the
ISserialisedNode outputs element type so the mapping type-checks without
suppression.
- Around line 1062-1070: Update the input restoration loop in configure() to
invoke onConnectionsChange only when the serialized input contains a link that
was successfully restored; skip the callback for bare inputs, matching the
output restoration behavior. Continue invoking onInputAdded for every input.
- Around line 1884-1911: Update removeInput so the replaceNodeInputs failure
path, identified when this.inputs still includes slotInfo, logs a warning before
returning. Keep the existing removal callback, floating-link adjustment, and
canvas-dirty behavior unchanged for successful removals.
In `@src/lib/litegraph/src/linkDeduplication.ts`:
- Around line 54-72: Remove the unused link lookup and its guard from
purgeOrphanedLinks; iterate over non-survivor ids and call graph._removeLink(id)
directly, preserving the survivor re-registration logic afterward.
In `@src/lib/litegraph/src/LLink.ts`:
- Around line 98-112: Update applyEndpointPatch to propagate failures from
useLinkStore().updateEndpoint instead of only logging result.error and returning
normally. Throw or otherwise surface the rejected patch through the existing
endpoint setter/configure call chain, while preserving direct Object.assign
behavior for unregistered links.
In `@src/lib/litegraph/src/node/slotLinks.ts`:
- Around line 156-158: Collapse the short single-statement if block in the
finalInputs validation by placing the condition and throw on one line,
preserving the existing duplicate-slot check and error message.
In `@src/lib/litegraph/src/node/slotUtils.test.ts`:
- Around line 32-43: Update the ordering assertion in the “serialises the links
leaving the slot, ascending by id” test to sort LinkId values with an explicit
numeric comparator. Keep the existing length assertion and verify
serialised.links against its numerically ascending copy.
In `@src/lib/litegraph/src/nodeBadgeDraw.ts`:
- Around line 76-86: The registerBadgeRowsProvider function permanently pins the
first provider and offers no cleanup path. Add an unregister/disposer mechanism
tied to the registered provider, or expose a reset API for HMR and tests, while
preserving rejection of conflicting active registrations.
- Around line 52-62: Update the badge construction loop to create the credits
icon only when row.kind is exactly 'credits', rather than treating every
non-core row as credits. Preserve core-row skipping and ensure other BadgeData
kinds are handled explicitly or rejected by the type system instead of silently
receiving the credits icon.
In `@src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts`:
- Around line 68-95: Update enableSubgraphNodeCreation to keep the event
listener and type-to-constructor registrations local to each helper instance.
Make the returned disposer remove its own listener and delete only registrations
whose current constructor still matches the locally stored constructor,
preventing helpers from affecting each other; add coverage that creates another
subgraph after disposal and verifies no registration occurs.
In `@src/lib/litegraph/src/subgraph/subgraphDeduplication.ts`:
- Around line 114-129: Parameterize findNextAvailableId with an identifier-space
label and use it in the exhaustion error instead of the hardcoded node-specific
message. Update each caller, including node and reroute ID allocation, to
provide the appropriate label while preserving the existing allocation behavior.
In `@src/lib/litegraph/src/subgraph/subgraphUtils.test.ts`:
- Line 3: Update the tests in subgraphUtils.test.ts to restore mocked globals
after every test, using an afterEach hook with vi.restoreAllMocks(). Ensure
console.error is restored even when assertions fail, and remove any reliance on
cleanup that only runs after successful assertions.
In `@src/platform/cloud/subscription/composables/useFreeTierQuota.ts`:
- Around line 28-31: Update hasInvalidNodes in useFreeTierQuota to derive the
root graph from useCanvasStore().currentGraph instead of the non-reactive
app.graph, preserving the existing graphCreditsBadges check and false fallback.
Ensure the composable accesses the reactive currentGraph source so
freeTierExecutionPermitted recalculates after workflow switches.
In `@src/renderer/extensions/minimap/data/MinimapDataSource.test.ts`:
- Around line 48-59: Update registerNodeState so useNodeDataStore().registerNode
receives the graphId parameter as its store partition key instead of the
hardcoded GRAPH_ID, while continuing to set the same graphId on the created node
state.
In `@src/renderer/extensions/vueNodes/components/LGraphNode.vue`:
- Around line 702-711: Update the widgetIds computed in LGraphNode.vue to derive
graph identity from the reactive canvasStore.rootGraphId instead of
app.rootGraph?.id. Preserve the existing empty-result guard and getNodeWidgetIds
lookup, ensuring hasRenderableWidgets and downstream computeds refresh when the
root graph is replaced.
In `@src/renderer/extensions/vueNodes/components/NodeHeader.test.ts`:
- Around line 22-32: Replace the local makeNodeData fixture with the shared
createNodeState fixture from litegraphTestUtils, adding the required import and
passing the existing overrides through it. Remove the hand-rolled NodeState
defaults so shared fields, including the ALWAYS mode, remain consistent.
In `@src/renderer/extensions/vueNodes/components/NodeWidgets.test.ts`:
- Around line 265-267: Replace the Tailwind class assertion in the NodeWidgets
test with an assertion on a semantic error signal exposed by the widget row,
such as data-has-error or aria-invalid. Update the relevant widget-row rendering
symbol to provide that signal if needed, while preserving the existing error
behavior.
In `@src/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.ts`:
- Around line 342-351: Update the test around processWidgets to avoid asserting
the literal Tailwind value ring ring-component-node-widget-advanced. Verify the
advanced/non-advanced borderStyle behavior by comparing results for showAdvanced
or reuse a shared source constant, and apply the same change to the duplicate
assertion near the other advanced-widget test.
In `@src/renderer/extensions/vueNodes/composables/useProcessedWidgets.ts`:
- Around line 411-414: Update the valueTooltip logic in useProcessedWidgets so
object-valued asset/combo widgets do not produce a tooltip from String(value),
particularly avoiding “[object Object]”. Only attach the tooltip when the value
is a meaningful primitive string representation longer than 10 characters, while
preserving the existing type and length checks.
In `@src/renderer/glsl/useGLSLUniforms.test.ts`:
- Around line 21-32: Update makeGlslNode to use a real Subgraph and LiteGraph
links from the shared test factories instead of overriding getInputLink with a
hand-rolled inputs-to-subgraph mapping. Remove the getInputLink mock so
extractUniformSources exercises the actual LGraphNode.getInputLink behavior,
while preserving the test’s intended input-link setup.
In `@src/services/litegraphService.ts`:
- Around line 467-485: Extract the duplicated serialized-output merge into a
module-level helper, such as mergeSerialisedOutputs, preserving the existing
zip, RESERVED_KEYS merge, extra-output handling, and outputAsSerialisable
fallback. Replace the inline blocks in src/services/litegraphService.ts:467-485
and src/services/litegraphService.ts:579-597 with calls to the shared helper.
In `@src/stores/widgetValueStore.graphReactivity.test.ts`:
- Around line 279-293: Strengthen the test “registers plain render metadata for
non-promoted widgets” by replacing the definedness and absent sourceExecutionId
checks with assertions for the expected non-promoted render metadata, including
hasLayoutSize: false and isDOMWidget: false. Ensure the assertions distinguish
plain registration from promoted widget registration rather than only checking
defaults.
In `@src/stores/widgetValueStore.ts`:
- Around line 146-151: Update getWidgetRenderState to validate widgetId with the
existing isWidgetId guard before calling parseWidgetId; return undefined for
non-conforming IDs, matching getWidget’s behavior, while preserving the current
graph-state lookup for valid IDs.
- Around line 61-69: Split lazy creation from reads in the widget-order store:
add an ensure helper for mutation paths and a non-mutating peek helper for
reads. Update appendNodeWidgetOrder and setNodeWidgetOrder to use
ensureNodeWidgetOrder, and getNodeWidgetIds and reconcileNodeWidgetOrder to use
peekNodeWidgetOrder so computed reads do not insert entries. Apply the same
ensure/peek separation to getWidgetRenderState, ensuring read access does not
create per-graph maps.
In `@src/stores/workspace/favoritedWidgetsStore.ts`:
- Around line 76-79: Track the deferred migration from (nodeLocatorId,
widgetName) keys to host-scoped WidgetId keys by opening an issue that documents
the favoritedWidgets persistence-format change, required one-time migration of
workflow.extra.favoritedWidgets, and removal of the
isShownOnParents/favoriteNode indirection for promoted widgets.
In `@src/systems/badgeSystem.pricing.test.ts`:
- Around line 13-22: The getNodeDisplayPrice mock currently reads
useLinkStore().isInputSlotConnected, allowing the badge computed to react
without touchPricingSources registering the dependency. Make getNodeDisplayPrice
pure by deriving its result from node data or a plain test-controlled
counter/override, then update the test setup to flip that value and assert
recomputation specifically through touchPricingSources.
In `@src/systems/badgeSystem.ts`:
- Around line 212-220: Update the Settings map entries for
Comfy.NodeBadge.NodeIdBadgeMode, Comfy.NodeBadge.NodeLifeCycleBadgeMode, and
Comfy.NodeBadge.NodeSourceBadgeMode to use NodeBadgeMode, then remove the
corresponding assertions from the badgeModes initialization. Ensure
settingStore.get infers and returns NodeBadgeMode directly for these keys.
- Around line 167-187: Update gatherSubgraphCredits to touch all dynamic pricing
dependencies for the single inner API leaf, not only
pricing.getNodeRevisionRef(leaf.id). Reuse the dependency-registration behavior
from touchPricingSources, passing the appropriate inner graph-id keys from
wrapper.subgraph for priced widget values and input connections, while
preserving the existing multi-leaf and display-price behavior.
---
Outside diff comments:
In `@src/renderer/extensions/vueNodes/components/NodeSlots.vue`:
- Around line 10-19: In NodeSlots.vue, add computed inputRows and outputRows
that resolve each slot’s actual index once and calculate connection state using
the rootGraphId within the computed mapping. Update the InputSlot and OutputSlot
v-for blocks to consume these row objects for keys, slot data, indices, and
connected state, removing repeated getActualInputIndex calls and redundant
rootGraphId guards from isInputConnected/isOutputConnected.
🪄 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: ASSERTIVE
Plan: Pro Plus
Run ID: 77516a24-b905-4d0c-b70f-f93cbf262d19
⛔ Files ignored due to path filters (14)
browser_tests/tests/domWidget.spec.ts-snapshots/focus-mode-on-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/execution.spec.ts-snapshots/execution-error-unconnected-slot-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/graphCanvasMenu.spec.ts-snapshots/canvas-with-visible-links-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-default-workflow-mobile-chrome-linux.pngis excluded by!**/*.pngbrowser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-graph-canvas-toolbar-mobile-chrome-linux.pngis excluded by!**/*.pngbrowser_tests/tests/nodeBadge.spec.ts-snapshots/node-badge-left-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/saveImageAndWebp.spec.ts-snapshots/save-image-and-webm-preview-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/selectionToolbox.spec.ts-snapshots/selection-toolbox-multiple-nodes-border-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/selectionToolbox.spec.ts-snapshots/selection-toolbox-multiple-selections-border-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/selectionToolbox.spec.ts-snapshots/selection-toolbox-single-node-no-border-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/viewport.spec.ts-snapshots/viewport-fits-when-saved-offscreen-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts-snapshots/vue-nodes-paned-with-touch-mobile-chrome-linux.pngis excluded by!**/*.pngbrowser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-dark-all-colors-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-light-all-colors-chromium-linux.pngis excluded by!**/*.png
📒 Files selected for processing (272)
browser_tests/assets/missing/missing_model_nested_promoted_widget.jsonbrowser_tests/assets/missing/missing_models_in_subgraph.jsonbrowser_tests/assets/nodes/duplicate_node_ids.jsonbrowser_tests/fixtures/helpers/NodeOperationsHelper.tsbrowser_tests/tests/appModeBuilder.spec.tsbrowser_tests/tests/nodeBadge.spec.tsbrowser_tests/tests/nodeDisplay.spec.tsbrowser_tests/tests/propertiesPanel/errorsTabCloudMissingModels.spec.tsbrowser_tests/tests/propertiesPanel/errorsTabModeAware.spec.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.tsbrowser_tests/tests/vueNodes/nodeStates/registration.spec.tsbrowser_tests/tests/vueNodes/widgets/legacy.spec.tsbrowser_tests/tests/vueNodes/widgets/widgetReactivity.spec.tsbrowser_tests/tests/workflowPersistence.spec.tsdocs/adr/0008-entity-component-system.mddocs/architecture/domain-glossary.mddocs/architecture/ecs-lifecycle-scenarios.mddocs/architecture/ecs-migration-plan.mddocs/architecture/ecs-target-architecture.mddocs/architecture/entity-interactions.mddocs/architecture/entity-problems.mddocs/architecture/link-topology-store.mddocs/architecture/node-badge-store.mddocs/architecture/node-data-store.mddocs/architecture/output-slot-connectivity.mddocs/architecture/proto-ecs-stores.mddocs/architecture/reroute-chain-store.mdsrc/components/builder/AppModeWidgetList.vuesrc/components/graph/GraphCanvas.vuesrc/components/graph/widgets/domWidgetZIndex.test.tssrc/components/rightSidePanel/errors/useErrorGroups.test.tssrc/components/rightSidePanel/errors/useErrorGroups.tssrc/components/rightSidePanel/parameters/SectionWidgets.vuesrc/components/rightSidePanel/parameters/TabSubgraphInputs.test.tssrc/components/rightSidePanel/parameters/TabSubgraphInputs.vuesrc/components/rightSidePanel/parameters/WidgetActions.test.tssrc/components/rightSidePanel/parameters/WidgetActions.vuesrc/components/rightSidePanel/parameters/WidgetItem.test.tssrc/components/rightSidePanel/parameters/WidgetItem.vuesrc/components/rightSidePanel/subgraph/SubgraphEditor.test.tssrc/components/rightSidePanel/subgraph/SubgraphEditor.vuesrc/composables/graph/useErrorClearingHooks.test.tssrc/composables/graph/useErrorClearingHooks.tssrc/composables/graph/useGraphNodeManager.test.tssrc/composables/graph/useGraphNodeManager.tssrc/composables/graph/useNodeErrorFlagSync.test.tssrc/composables/graph/useVueNodeLifecycle.test.tssrc/composables/graph/useVueNodeLifecycle.tssrc/composables/node/useNodeBadge.tssrc/composables/node/useNodePricing.test.tssrc/composables/node/useNodePricing.tssrc/composables/node/usePriceBadge.test.tssrc/composables/node/usePriceBadge.tssrc/composables/useUpstreamValue.test.tssrc/composables/useUpstreamValue.tssrc/core/graph/subgraph/migration/proxyWidgetMigration.test.tssrc/core/graph/subgraph/migration/proxyWidgetMigration.tssrc/core/graph/subgraph/promotedInputWidget.tssrc/core/graph/subgraph/promotionUtils.test.tssrc/core/graph/subgraph/promotionUtils.tssrc/core/graph/subgraph/resolveConcretePromotedWidget.test.tssrc/core/graph/subgraph/resolveSubgraphInputLink.tssrc/core/graph/widgets/dynamicWidgets.test.tssrc/core/graph/widgets/dynamicWidgets.tssrc/core/graph/widgets/matchTypeConfiguring.test.tssrc/extensions/core/groupNode.tssrc/extensions/core/load3d.tssrc/extensions/core/rerouteNode.tssrc/extensions/core/saveImageExtraOutput.test.tssrc/extensions/core/widgetInputs.test.tssrc/extensions/core/widgetInputs.tssrc/extensions/core/widgetValuePropagation.test.tssrc/extensions/core/widgetValuePropagation.tssrc/lib/litegraph/src/LGraph.inputSlotRealign.test.tssrc/lib/litegraph/src/LGraph.serialise.test.tssrc/lib/litegraph/src/LGraph.test.tssrc/lib/litegraph/src/LGraph.tssrc/lib/litegraph/src/LGraphBadge.tssrc/lib/litegraph/src/LGraphCanvas.clipboard.test.tssrc/lib/litegraph/src/LGraphCanvas.cloneZIndex.test.tssrc/lib/litegraph/src/LGraphCanvas.drawConnections.test.tssrc/lib/litegraph/src/LGraphCanvas.ghost.test.tssrc/lib/litegraph/src/LGraphCanvas.groupSelection.test.tssrc/lib/litegraph/src/LGraphCanvas.slotHitDetection.test.tssrc/lib/litegraph/src/LGraphCanvas.tssrc/lib/litegraph/src/LGraphNode.nodeState.test.tssrc/lib/litegraph/src/LGraphNode.test.tssrc/lib/litegraph/src/LGraphNode.tssrc/lib/litegraph/src/LGraphNodeProperties.test.tssrc/lib/litegraph/src/LGraphNodeProperties.tssrc/lib/litegraph/src/LLink.store.test.tssrc/lib/litegraph/src/LLink.test.tssrc/lib/litegraph/src/LLink.tssrc/lib/litegraph/src/LiteGraphGlobal.tssrc/lib/litegraph/src/Reroute.store.test.tssrc/lib/litegraph/src/Reroute.tssrc/lib/litegraph/src/__fixtures__/nodeHelpers.tssrc/lib/litegraph/src/canvas/FloatingRenderLink.test.tssrc/lib/litegraph/src/canvas/FloatingRenderLink.tssrc/lib/litegraph/src/canvas/LinkConnector.core.test.tssrc/lib/litegraph/src/canvas/LinkConnector.integration.test.tssrc/lib/litegraph/src/canvas/LinkConnector.test.tssrc/lib/litegraph/src/canvas/LinkConnector.tssrc/lib/litegraph/src/canvas/LinkConnectorSubgraphInputValidation.test.tssrc/lib/litegraph/src/canvas/ToInputFromIoNodeLink.tssrc/lib/litegraph/src/canvas/ToInputRenderLink.tssrc/lib/litegraph/src/infrastructure/LGraphEventMap.tssrc/lib/litegraph/src/interfaces.tssrc/lib/litegraph/src/linkDeduplication.tssrc/lib/litegraph/src/litegraph.tssrc/lib/litegraph/src/node/NodeInputSlot.test.tssrc/lib/litegraph/src/node/NodeInputSlot.tssrc/lib/litegraph/src/node/NodeOutputSlot.test.tssrc/lib/litegraph/src/node/NodeOutputSlot.tssrc/lib/litegraph/src/node/NodeSlot.test.tssrc/lib/litegraph/src/node/NodeSlot.tssrc/lib/litegraph/src/node/SlotBase.tssrc/lib/litegraph/src/node/slotEcosystemPatterns.test.tssrc/lib/litegraph/src/node/slotLinks.test.tssrc/lib/litegraph/src/node/slotLinks.tssrc/lib/litegraph/src/node/slotUtils.test.tssrc/lib/litegraph/src/node/slotUtils.tssrc/lib/litegraph/src/nodeBadgeDraw.test.tssrc/lib/litegraph/src/nodeBadgeDraw.tssrc/lib/litegraph/src/serialization.test.tssrc/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.tssrc/lib/litegraph/src/subgraph/ExecutableNodeDTO.tssrc/lib/litegraph/src/subgraph/SubgraphConversion.test.tssrc/lib/litegraph/src/subgraph/SubgraphIO.test.tssrc/lib/litegraph/src/subgraph/SubgraphInput.tssrc/lib/litegraph/src/subgraph/SubgraphInputNode.tssrc/lib/litegraph/src/subgraph/SubgraphNode.tssrc/lib/litegraph/src/subgraph/SubgraphOutput.tssrc/lib/litegraph/src/subgraph/SubgraphSerialization.test.tssrc/lib/litegraph/src/subgraph/SubgraphSlotConnections.test.tssrc/lib/litegraph/src/subgraph/SubgraphWidgetPromotion.test.tssrc/lib/litegraph/src/subgraph/__fixtures__/README.mdsrc/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.test.tssrc/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.tssrc/lib/litegraph/src/subgraph/subgraphDeduplication.test.tssrc/lib/litegraph/src/subgraph/subgraphDeduplication.tssrc/lib/litegraph/src/subgraph/subgraphUtils.test.tssrc/lib/litegraph/src/subgraph/subgraphUtils.tssrc/lib/litegraph/src/types/graphTriggers.tssrc/lib/litegraph/src/types/serialisation.tssrc/lib/litegraph/src/types/widgets.tssrc/lib/litegraph/src/utils/collections.test.tssrc/lib/litegraph/src/utils/collections.tssrc/lib/litegraph/src/utils/widget.tssrc/lib/litegraph/src/widgets/BaseWidget.test.tssrc/lib/litegraph/src/widgets/BaseWidget.tssrc/locales/ar/main.jsonsrc/locales/en/main.jsonsrc/locales/es/main.jsonsrc/locales/fa/main.jsonsrc/locales/fr/main.jsonsrc/locales/he/main.jsonsrc/locales/ja/main.jsonsrc/locales/ko/main.jsonsrc/locales/pt-BR/main.jsonsrc/locales/ru/main.jsonsrc/locales/tr/main.jsonsrc/locales/zh-TW/main.jsonsrc/locales/zh/main.jsonsrc/platform/cloud/subscription/composables/useFreeTierQuota.tssrc/platform/missingMedia/missingMediaStore.tssrc/platform/missingModel/missingModelScan.test.tssrc/platform/missingModel/missingModelScan.tssrc/platform/missingModel/missingModelStore.tssrc/platform/nodeReplacement/useNodeReplacement.test.tssrc/platform/nodeReplacement/useNodeReplacement.tssrc/platform/telemetry/nodeAdded/installNodeAddedTelemetry.test.tssrc/platform/telemetry/nodeAdded/installNodeAddedTelemetry.tssrc/platform/workflow/core/services/workflowService.insertWorkflow.test.tssrc/platform/workflow/core/services/workflowService.tssrc/renderer/core/canvas/canvasStore.test.tssrc/renderer/core/canvas/canvasStore.tssrc/renderer/core/canvas/links/linkConnectorAdapter.tssrc/renderer/core/layout/operations/layoutMutations.test.tssrc/renderer/core/layout/operations/layoutMutations.tssrc/renderer/core/layout/store/layoutStore.test.tssrc/renderer/core/layout/store/layoutStore.tssrc/renderer/core/layout/types.tssrc/renderer/extensions/linearMode/PartnerNodesList.vuesrc/renderer/extensions/minimap/composables/useMinimap.test.tssrc/renderer/extensions/minimap/composables/useMinimapGraph.test.tssrc/renderer/extensions/minimap/composables/useMinimapGraph.tssrc/renderer/extensions/minimap/data/AbstractMinimapDataSource.tssrc/renderer/extensions/minimap/data/LayoutStoreDataSource.tssrc/renderer/extensions/minimap/data/MinimapDataSource.test.tssrc/renderer/extensions/minimap/data/MinimapDataSourceFactory.tssrc/renderer/extensions/minimap/minimapCanvasRenderer.test.tssrc/renderer/extensions/vueNodes/components/LGraphNode.subgraph.test.tssrc/renderer/extensions/vueNodes/components/LGraphNode.test.tssrc/renderer/extensions/vueNodes/components/LGraphNode.vuesrc/renderer/extensions/vueNodes/components/LGraphNodePreview.test.tssrc/renderer/extensions/vueNodes/components/LGraphNodePreview.vuesrc/renderer/extensions/vueNodes/components/NodeContent.vuesrc/renderer/extensions/vueNodes/components/NodeHeader.test.tssrc/renderer/extensions/vueNodes/components/NodeHeader.vuesrc/renderer/extensions/vueNodes/components/NodeSlots.test.tssrc/renderer/extensions/vueNodes/components/NodeSlots.vuesrc/renderer/extensions/vueNodes/components/NodeWidgets.test.tssrc/renderer/extensions/vueNodes/components/NodeWidgets.vuesrc/renderer/extensions/vueNodes/components/WidgetGrid.vuesrc/renderer/extensions/vueNodes/composables/useNodeEventHandlers.test.tssrc/renderer/extensions/vueNodes/composables/useNodeEventHandlers.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.tssrc/renderer/extensions/vueNodes/composables/useNodeTooltips.test.tssrc/renderer/extensions/vueNodes/composables/useNodeTooltips.tssrc/renderer/extensions/vueNodes/composables/usePartitionedBadges.test.tssrc/renderer/extensions/vueNodes/composables/usePartitionedBadges.tssrc/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.tssrc/renderer/extensions/vueNodes/composables/useProcessedWidgets.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.autoPan.test.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.test.tssrc/renderer/extensions/vueNodes/layout/nodeSizeReflow.test.tssrc/renderer/extensions/vueNodes/types/widgetGrid.tssrc/renderer/extensions/vueNodes/utils/__tests__/nodeDataUtils.test.tssrc/renderer/extensions/vueNodes/utils/nodeDataUtils.tssrc/renderer/extensions/vueNodes/utils/nodeErrorState.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetButton.test.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetButton.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetDOM.test.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetDOM.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetLegacy.vuesrc/renderer/extensions/vueNodes/widgets/composables/useImageUploadWidget.test.tssrc/renderer/extensions/vueNodes/widgets/composables/useProgressTextWidget.tssrc/renderer/extensions/vueNodes/widgets/composables/useWidgetRenderer.test.tssrc/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.tssrc/renderer/glsl/glslPreviewUtils.tssrc/renderer/glsl/useGLSLUniforms.test.tssrc/renderer/glsl/useGLSLUniforms.tssrc/scripts/app.test.tssrc/scripts/app.tssrc/scripts/promotedWidgetControl.test.tssrc/scripts/promotedWidgetControl.tssrc/scripts/widgets.tssrc/services/litegraphService.tssrc/stores/appModeStore.test.tssrc/stores/linkStore.test.tssrc/stores/linkStore.tssrc/stores/nodeDataStore.test.tssrc/stores/nodeDataStore.tssrc/stores/rerouteStore.test.tssrc/stores/rerouteStore.tssrc/stores/widgetValueStore.graphReactivity.test.tssrc/stores/widgetValueStore.test.tssrc/stores/widgetValueStore.tssrc/stores/workspace/favoritedWidgetsStore.tssrc/systems/badgeSystem.pricing.test.tssrc/systems/badgeSystem.subgraph.test.tssrc/systems/badgeSystem.test.tssrc/systems/badgeSystem.tssrc/types/badgeData.tssrc/types/linkTopology.tssrc/types/nodeState.tssrc/types/rerouteChain.tssrc/types/simplifiedWidget.tssrc/types/widgetState.tssrc/utils/__tests__/litegraphTestUtils.tssrc/utils/graphTraversalUtil.test.tssrc/utils/graphTraversalUtil.tssrc/utils/linkFixer.test.tssrc/utils/linkFixer.tssrc/utils/litegraphUtil.test.tssrc/utils/litegraphUtil.tssrc/utils/searchAndReplace.test.tssrc/utils/widgetUtil.tstools/devtools/web/legacyWidget.js
💤 Files with no reviewable changes (27)
- src/lib/litegraph/src/LGraphNodeProperties.test.ts
- src/composables/node/usePriceBadge.test.ts
- src/composables/node/usePriceBadge.ts
- src/lib/litegraph/src/LGraphNodeProperties.ts
- src/lib/litegraph/src/LGraphBadge.ts
- src/composables/graph/useGraphNodeManager.ts
- src/composables/graph/useGraphNodeManager.test.ts
- browser_tests/tests/nodeBadge.spec.ts
- src/locales/ru/main.json
- src/lib/litegraph/src/canvas/ToInputRenderLink.ts
- src/locales/ar/main.json
- src/locales/ja/main.json
- src/locales/zh/main.json
- src/lib/litegraph/src/types/graphTriggers.ts
- src/lib/litegraph/src/node/SlotBase.ts
- src/locales/zh-TW/main.json
- src/locales/tr/main.json
- src/lib/litegraph/src/canvas/ToInputFromIoNodeLink.ts
- src/locales/es/main.json
- src/locales/fr/main.json
- src/locales/fa/main.json
- src/scripts/app.ts
- browser_tests/fixtures/helpers/NodeOperationsHelper.ts
- src/renderer/core/layout/types.ts
- src/locales/ko/main.json
- src/locales/pt-BR/main.json
- src/locales/he/main.json
🛑 Comments failed to post (1)
src/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.ts (1)
342-351: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
Avoid asserting raw Tailwind class strings.
'ring ring-component-node-widget-advanced'is hard-coded here and again at Line 468, so a purely cosmetic class rename breaks both tests without any behavior change. Prefer asserting the advanced/non-advanced distinction (e.g. compareborderStyleforshowAdvancedvs. a non-advanced widget, or expose the class via a shared constant that both source and test import).As per coding guidelines, "Do not write change-detector tests, style-dependent tests, redundant tests".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.ts` around lines 342 - 351, Update the test around processWidgets to avoid asserting the literal Tailwind value ring ring-component-node-widget-advanced. Verify the advanced/non-advanced borderStyle behavior by comparing results for showAdvanced or reuse a shared source constant, and apply the same change to the duplicate assertion near the other advanced-widget test.Source: Coding guidelines
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #14246 +/- ##
==========================================
+ Coverage 79.52% 82.39% +2.87%
==========================================
Files 2235 1920 -315
Lines 113630 109153 -4477
Branches 31062 30866 -196
==========================================
- Hits 90367 89940 -427
+ Misses 22775 18877 -3898
+ Partials 488 336 -152
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 412 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 13
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (8)
src/extensions/core/groupNode.ts (1)
926-931: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftResolve links from the graph that owns the group node.
convertToNodes()documents nested-subgraph support, butreconnectInputs()resolves the origin throughapp.rootGraph, andreconnectOutputs()queriesoutputLinks(app.rootGraph, ...). Link and node collections are graph-local. For a group inside aSubgraph, these lookups cannot resolve the subgraph topology, so unpacking can drop connections. Resolve both endpoints from the owning graph and explicitly map them into the root graph before reconnecting.Also applies to: 943-953
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/extensions/core/groupNode.ts` around lines 926 - 931, Update reconnectInputs() and reconnectOutputs() to use the graph owning the group node, rather than app.rootGraph, when resolving links, origins, and output links. Before reconnecting, explicitly map the resolved endpoints from that owning graph into the root graph so nested Subgraph topology is preserved during convertToNodes().src/extensions/core/widgetInputs.ts (1)
348-354: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winSkip links whose target slot no longer exists.
theirNodecan resolve whiletheirNode.inputs[link.target_slot]isundefinedafter input layout changes or legacy workflow restoration._isValidConnection()readsinput.widget, so this path can throw during_mergeWidgetConfig(). Add a guard before calling it.Proposed fix
const theirInput = theirNode.inputs[link.target_slot] + if (!theirInput) continue // Call is valid connection so it can merge the configs when validating this._isValidConnection(theirInput, hasConfig)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/extensions/core/widgetInputs.ts` around lines 348 - 354, In the link-processing loop within _mergeWidgetConfig, guard the theirNode.inputs[link.target_slot] lookup and skip the link when the target slot is missing, before calling _isValidConnection. Preserve processing for links with an existing target input.src/renderer/core/layout/store/layoutStore.ts (2)
239-242: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueSilent no-op on
nullassignment can hide a real caller.The setter ignores
nullinstead of emittingdeleteNode. The comment asserts that no caller assignsnull. The ref type still allowsnull, so a future caller gets a silent no-op with no signal. Narrow the ref type toRef<NodeLayout | null>for reads only, or log at debug level when anullwrite arrives.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/renderer/core/layout/store/layoutStore.ts` around lines 239 - 242, Update the layout ref setter in the layout store to avoid silently ignoring null assignments: either expose a read-only Ref<NodeLayout | null> type so callers cannot write null, or retain the setter and emit a debug log when newLayout is null. Preserve layoutMutations.deleteNode as the deletion path for valid node deletions.
1136-1158: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winClean up floating-link geometry when removing a floating link.
removeFloatingLinkremoves topology but does not removelinkSegmentLayoutsorlinkSegmentSpatialIndexentries. Add this cleanup toremoveFloatingLink. Make the cleanup unconditional when no whole-link layout exists.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/renderer/core/layout/store/layoutStore.ts` around lines 1136 - 1158, The node deletion path leaves floating-link geometry entries behind because removeFloatingLink does not clear linkSegmentLayouts or linkSegmentSpatialIndex. Update removeFloatingLink to remove the affected floating link’s segment layout and spatial-index entries, performing this cleanup unconditionally when no whole-link layout exists; leave whole-link layout handling unchanged.docs/architecture/reroute-chain-store.md (1)
111-118: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCorrect the reroute geometry scope statement.
Reroute.posno longer mirrors a class-owned position field.layoutStoreowns reroute position. State that reroute geometry is out of scope because it has already migrated, not because duplication remains.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/architecture/reroute-chain-store.md` around lines 111 - 118, Update the Scope section to state that reroute geometry is out of scope because reroute position has already migrated to layoutStore ownership; remove the inaccurate claim that Reroute.pos mirrors a class field and that pre-existing duplication remains.src/lib/litegraph/src/LGraphCanvas.ts (1)
2530-2572: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winReroute hit-testing on left-click duplicates the extracted
findRerouteAtPointhelper.
processMouseDown's right-click path resolves reroutes throughfindRerouteAtPoint(graph, x, y, this._visibleReroutes)._processPrimaryButtonre-implements the same "query layout store, then fall back" pattern inline instead of reusing that helper. Keep the two click paths on one hit-testing implementation. Otherwise, future changes tofindRerouteAtPoint's fallback behavior will not propagate to the left-click path, and the two paths can silently diverge on edge positions.Consider extracting the "resolve reroute by id from a layout hit" step into a small helper that both
findRerouteAtPointand this loop call, so the layout-store resolution logic stays in one place.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/litegraph/src/LGraphCanvas.ts` around lines 2530 - 2572, Update the reroute hit-testing in _processPrimaryButton to reuse findRerouteAtPoint instead of duplicating the layout-store query and visible-reroute fallback. If needed, extract the shared layout-hit ID resolution into a small helper used by both findRerouteAtPoint and the primary-button path, while preserving the existing click, drag, connector, and slot-hover behavior.src/lib/litegraph/src/Reroute.ts (1)
674-685: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winHandle duplicate reroute IDs before replacing the graph entry.
registerReroute()refuses to replace an existing chain but returns the unregistered chain.registerRerouteChain()then assigns that chain to the new reroute, while_addReroute()overwrites the graph map. Unregistering the new reroute cannot remove the old store registration, leaving an orphaned chain.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/litegraph/src/Reroute.ts` around lines 674 - 685, Update the reroute registration flow around registerReroute(), registerRerouteChain(), and _addReroute() so duplicate IDs are handled before the graph map is overwritten. Preserve the existing registered chain when an ID already exists, and ensure the new reroute is not assigned an unregistered chain or left able to orphan the old store registration.src/renderer/core/layout/operations/layoutMutations.ts (1)
236-285: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd existence guards to
createGroupanddeleteGroupfor consistency.
setGroupBoundsreturns early when the group layout is missing.createGroupanddeleteGroupalways apply an operation. AdeleteGroupcall for an unknown group still appends an entry to the operation log and notifies listeners withchange.type = 'delete', although the Yjs delete is a no-op. Node mutations (deleteNode) use the same guard pattern in this file.♻️ Proposed guard for `deleteGroup`
const deleteGroup = (rootGraphId: UUID, groupId: GroupId): void => { + if (!layoutStore.getGroupLayout(rootGraphId, groupId)) return + layoutStore.applyOperation({ type: 'deleteGroup', entity: 'group',🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/renderer/core/layout/operations/layoutMutations.ts` around lines 236 - 285, Update createGroup and deleteGroup to check whether the group already exists using layoutStore.getGroupLayout(rootGraphId, groupId) before applying operations, matching the guard pattern in setGroupBounds and deleteNode. Preserve createGroup’s existing behavior for valid groups and return early when the requested group state does not satisfy the intended existence condition.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@browser_tests/tests/copyPaste.spec.ts`:
- Around line 33-56: Update the test around the pinned node copy/paste flow to
capture the original node’s distinct ID and position before pasting, then
identify the newly pasted node by ID rather than relying on getNodeRefsByType
ordering. After confirming the node count, derive the expected graph coordinate
from the cursor position and assert the pasted node’s position matches it, while
retaining the original-node identity checks.
In `@src/lib/litegraph/src/LGraph.ts`:
- Around line 508-524: Update the subgraph-definition cleanup in remove() to
delete each released definition’s groups and reroutes through
useLayoutMutations(), using the root graph ID and the same LayoutSource.Canvas
setup as clear(). Ensure this runs before the definition becomes unreachable,
while preserving the existing topology and node-state cleanup.
In `@src/lib/litegraph/src/LGraphCanvas.ts`:
- Around line 8944-8950: Update applyNodePositions to build the corresponding
node-position updates and commit them through
layoutMutations.batchMoveNodes(updates) once, instead of calling node.setPos for
each node. Preserve the existing positions mapping and observable node
coordinates while batching the layout-store write.
In `@src/lib/litegraph/src/LGraphGroup.test.ts`:
- Around line 171-182: The mutation tests around the `test.for(mutations)` block
and the additional cases at lines 204–221 currently derive expected geometry
from `group.pos` and `group.size`, making the assertions self-referential.
Replace those fields with the independently known literal x, y, width, and
height values for each mutation case, matching the established legacy geometry
buffer test pattern.
In `@src/lib/litegraph/src/LGraphGroup.ts`:
- Around line 168-176: Remove the explicit syncBoundsFromStore() calls from both
the boundingRect getter and getBounding() method in LGraphGroup, returning
this._bounding directly. Preserve the Proxy-based synchronization performed when
callers access geometry properties.
In `@src/lib/litegraph/src/LGraphNode.ts`:
- Around line 650-659: Scope node layout refs, Y nodes, indexes, listeners, and
lifecycle operations by rootGraph.id rather than nodeId alone, updating
LGraphNode methods _positionUpdated and the related layout-operation site at
LGraphNode.ts lines 680-690 while preserving existing behavior. Add an isolation
test in LGraphNode.test.ts lines 794-864 using identical node IDs in two root
graphs and verify position and size updates remain isolated.
In `@src/platform/workflow/core/utils/workflowToClipboardItems.test.ts`:
- Around line 101-140: Add a cyclic-subgraph test alongside the existing nesting
test, using the subgraph helper to create A nesting B and B nesting A, then pass
the resulting workflow through workflowToClipboardItems and assert flattening
terminates with each subgraph ID included exactly once and no nested definitions
retained.
In `@src/platform/workflow/core/utils/workflowToClipboardItems.ts`:
- Around line 12-27: The workflow insertion path must preserve root-level
floating links: update workflowToClipboardItems and the corresponding
_deserializeItems processing so graph.floatingLinks are carried through and
inserted alongside parsed.links. Add a regression test covering a workflow with
root-level floating links, rather than only extending ClipboardItems.
In `@src/renderer/core/layout/store/layoutStore.ts`:
- Around line 1000-1003: Update the workflow close cleanup in
initializeFromLiteGraph to remove discarded root graph IDs from both
rerouteLayouts and rerouteSpatialIndex, while preserving reroute geometry during
subgraph navigation and retaining the existing link, segment, and slot layout
cleanup.
In `@src/renderer/core/layout/sync/useLayoutSync.test.ts`:
- Around line 111-146: Replace the `canvas as never` cast in the `startSync`
call with a typed partial mock created via `fromPartial` from
`@total-typescript/shoehorn`; use the same helper for the `liteNode` mock so
both objects are checked against their expected contracts while preserving the
existing position-setter assertion.
In `@src/renderer/core/layout/utils/mappers.ts`:
- Around line 56-96: Share the rectangle serialization and deserialization logic
between group and node layouts by extracting or reusing the existing helpers
used by layoutToYNode and yNodeRect. Update layoutToYGroup and setYGroupRect to
use the shared rect writer, and update yGroupToLayout to use the shared rect
reader so the StoredRect cast is centralized.
In `@src/renderer/extensions/minimap/data/LayoutStoreDataSource.ts`:
- Around line 75-77: Update getNodeCount() to count entries from viewedNodes()
that have a layout, rather than calling getNodes() and constructing full
MinimapNodeData objects; preserve the same layout-presence filtering used by
getNodes().
In `@src/renderer/extensions/vueNodes/layout/useNodeDrag.test.ts`:
- Line 114: Update the isLGraphNode stub used by the startDrag tests to
distinguish actual LGraphNode instances, preferably using the real LiteGraph
class or shared factory instead of a constant mock. Add a selected LGraphNode to
the relevant selectedItems case and assert it is excluded from
nonNodeStartPositions, ensuring the !isLGraphNode filter cannot be inverted or
omitted without failing.
---
Outside diff comments:
In `@docs/architecture/reroute-chain-store.md`:
- Around line 111-118: Update the Scope section to state that reroute geometry
is out of scope because reroute position has already migrated to layoutStore
ownership; remove the inaccurate claim that Reroute.pos mirrors a class field
and that pre-existing duplication remains.
In `@src/extensions/core/groupNode.ts`:
- Around line 926-931: Update reconnectInputs() and reconnectOutputs() to use
the graph owning the group node, rather than app.rootGraph, when resolving
links, origins, and output links. Before reconnecting, explicitly map the
resolved endpoints from that owning graph into the root graph so nested Subgraph
topology is preserved during convertToNodes().
In `@src/extensions/core/widgetInputs.ts`:
- Around line 348-354: In the link-processing loop within _mergeWidgetConfig,
guard the theirNode.inputs[link.target_slot] lookup and skip the link when the
target slot is missing, before calling _isValidConnection. Preserve processing
for links with an existing target input.
In `@src/lib/litegraph/src/LGraphCanvas.ts`:
- Around line 2530-2572: Update the reroute hit-testing in _processPrimaryButton
to reuse findRerouteAtPoint instead of duplicating the layout-store query and
visible-reroute fallback. If needed, extract the shared layout-hit ID resolution
into a small helper used by both findRerouteAtPoint and the primary-button path,
while preserving the existing click, drag, connector, and slot-hover behavior.
In `@src/lib/litegraph/src/Reroute.ts`:
- Around line 674-685: Update the reroute registration flow around
registerReroute(), registerRerouteChain(), and _addReroute() so duplicate IDs
are handled before the graph map is overwritten. Preserve the existing
registered chain when an ID already exists, and ensure the new reroute is not
assigned an unregistered chain or left able to orphan the old store
registration.
In `@src/renderer/core/layout/operations/layoutMutations.ts`:
- Around line 236-285: Update createGroup and deleteGroup to check whether the
group already exists using layoutStore.getGroupLayout(rootGraphId, groupId)
before applying operations, matching the guard pattern in setGroupBounds and
deleteNode. Preserve createGroup’s existing behavior for valid groups and return
early when the requested group state does not satisfy the intended existence
condition.
In `@src/renderer/core/layout/store/layoutStore.ts`:
- Around line 239-242: Update the layout ref setter in the layout store to avoid
silently ignoring null assignments: either expose a read-only Ref<NodeLayout |
null> type so callers cannot write null, or retain the setter and emit a debug
log when newLayout is null. Preserve layoutMutations.deleteNode as the deletion
path for valid node deletions.
- Around line 1136-1158: The node deletion path leaves floating-link geometry
entries behind because removeFloatingLink does not clear linkSegmentLayouts or
linkSegmentSpatialIndex. Update removeFloatingLink to remove the affected
floating link’s segment layout and spatial-index entries, performing this
cleanup unconditionally when no whole-link layout exists; leave whole-link
layout handling unchanged.
🪄 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: ASSERTIVE
Plan: Pro Plus
Run ID: 4a7d20ec-7efd-422c-9d8a-7a2840f3d714
⛔ Files ignored due to path filters (3)
browser_tests/tests/saveImageAndWebp.spec.ts-snapshots/save-image-and-webm-preview-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-dark-all-colors-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-light-all-colors-chromium-linux.pngis excluded by!**/*.png
📒 Files selected for processing (59)
browser_tests/fixtures/helpers/CanvasHelper.tsbrowser_tests/tests/copyPaste.spec.tsbrowser_tests/tests/vueNodes/interactions/node/move.spec.tsbrowser_tests/tests/vueNodes/rerouteGeometry.spec.tsdocs/architecture/ecs-migration-plan.mddocs/architecture/ecs-target-architecture.mddocs/architecture/proto-ecs-stores.mddocs/architecture/reroute-chain-store.mdsrc/composables/graph/useNodeArrangement.tssrc/composables/graph/useVueNodeLifecycle.tssrc/core/graph/widgets/dynamicWidgets.tssrc/extensions/core/groupNode.tssrc/extensions/core/widgetInputs.tssrc/lib/litegraph/src/LGraph.test.tssrc/lib/litegraph/src/LGraph.tssrc/lib/litegraph/src/LGraphCanvas.cloneZIndex.test.tssrc/lib/litegraph/src/LGraphCanvas.deprecated.test.tssrc/lib/litegraph/src/LGraphCanvas.groupSelection.test.tssrc/lib/litegraph/src/LGraphCanvas.tssrc/lib/litegraph/src/LGraphGroup.test.tssrc/lib/litegraph/src/LGraphGroup.tssrc/lib/litegraph/src/LGraphNode.test.tssrc/lib/litegraph/src/LGraphNode.tssrc/lib/litegraph/src/Reroute.store.test.tssrc/lib/litegraph/src/Reroute.tssrc/lib/litegraph/src/canvas/findRerouteAtPoint.tssrc/lib/litegraph/src/canvas/getCanvasContextMenuTarget.test.tssrc/lib/litegraph/src/canvas/getCanvasContextMenuTarget.tssrc/lib/litegraph/src/infrastructure/createGeometryView.test.tssrc/lib/litegraph/src/infrastructure/createGeometryView.tssrc/lib/litegraph/src/interfaces.tssrc/lib/litegraph/src/linkDeduplication.tssrc/lib/litegraph/src/subgraph/SubgraphIONodeBase.tssrc/lib/litegraph/src/subgraph/subgraphDeduplication.test.tssrc/lib/litegraph/src/subgraph/subgraphDeduplication.tssrc/platform/workflow/core/services/workflowService.insertWorkflow.test.tssrc/platform/workflow/core/services/workflowService.tssrc/platform/workflow/core/utils/workflowToClipboardItems.integration.test.tssrc/platform/workflow/core/utils/workflowToClipboardItems.test.tssrc/platform/workflow/core/utils/workflowToClipboardItems.tssrc/renderer/core/layout/operations/layoutMutations.tssrc/renderer/core/layout/store/layoutStore.test.tssrc/renderer/core/layout/store/layoutStore.tssrc/renderer/core/layout/sync/syncLayoutStoreFromGraph.test.tssrc/renderer/core/layout/sync/syncLayoutStoreFromGraph.tssrc/renderer/core/layout/sync/useLayoutSync.test.tssrc/renderer/core/layout/sync/useLayoutSync.tssrc/renderer/core/layout/types.tssrc/renderer/core/layout/utils/mappers.test.tssrc/renderer/core/layout/utils/mappers.tssrc/renderer/extensions/minimap/data/LayoutStoreDataSource.tssrc/renderer/extensions/minimap/data/MinimapDataSource.test.tssrc/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.tssrc/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.test.tssrc/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.tssrc/renderer/extensions/vueNodes/layout/useNodeDrag.test.tssrc/renderer/extensions/vueNodes/layout/useNodeDrag.tssrc/scripts/app.tssrc/utils/vintageClipboard.ts
💤 Files with no reviewable changes (3)
- src/renderer/core/layout/sync/syncLayoutStoreFromGraph.ts
- src/renderer/core/layout/sync/syncLayoutStoreFromGraph.test.ts
- src/composables/graph/useVueNodeLifecycle.ts
…canvas and in the registry (#16728) Backport of #16535 to `core/1.52`. Conflict resolution preserves the target branch's Vue-node badge and pricing implementation. The standalone `usePartitionedBadges.test.ts` conflict was dropped because that test was introduced by the later ECS migration (#14246), which is not present on `core/1.52`; the Comfy Cloud behavior is covered in `badgeRendererParity.test.ts` instead. Co-authored-by: Deep Mehta <42841935+deepme987@users.noreply.github.com> Co-authored-by: Deep Mehta <deep@comfy.org>
…17319) Fixes Comfy-Org#16642 - Renaming an input or output slot now refreshes the rendered label immediately (regressed when the ECS node state landed in Comfy-Org#14246). - Slot descriptors are exposed to the node shell through a reactive view, so any slot field edit propagates; no per-field handlers needed. - Regression test added (fails on main, passes here). <details><summary>Full context for agent readers</summary> **Root cause.** Before ECS, `LGraphCanvas` listened for `node:slot-label:changed` and redrew. The ECS merge removed that handler and instead reads slot data through `createNodeShellState`. The plain objects in `node.inputs` / `node.outputs` are not reactive, so label writes never invalidated the shell state and the Vue node kept the old label. **Fix.** `src/lib/litegraph/src/node/slotDescriptorView.ts` adds a generic `createSlotView<T>` Proxy (exported as `createInputSlotView` / `createOutputSlotView`, plus `resolveInputSlotView` for lookups). `createNodeShellState` in `src/core/graph/nodeShell/nodeShellState.ts` takes the two view factories and derives its slot arrays from them; `LGraphNode.ts` passes them through. Any write to a slot descriptor (label, name, type) now triggers the shell to recompute. **Tests.** `src/core/graph/nodeShell/slotLabelReactivity.regression.test.ts` (5 cases: input rename, output rename, rename after link, rename of a widget-backed input, rename via `renameSlot`). Written TDD: red on `main`, green on this branch. The test lives under `src/core/graph/nodeShell/` to satisfy the layer-boundary lint. `pnpm vitest run` on the three touched test files: 18/18. `pnpm typecheck` clean, `oxlint`/`eslint` clean. **Disclosure.** Knip (pre-push hook) flagged an unused `resolveOutputSlotView` export that I had added for symmetry; I removed it rather than leave dead code. Add it back if a caller appears. **Backport.** Labelled `needs-backport`, `core/1.53`, `cloud/1.53` per program policy (every ECS fix goes to 1.53 before promotion). <!-- authored-by:agent supreme-operator w3-520-followup --> </details> --------- Co-authored-by: Amp <amp@ampcode.com>
Fixes #16642 - Renaming an input or output slot now refreshes the rendered label immediately (regressed when the ECS node state landed in #14246). - Slot descriptors are exposed to the node shell through a reactive view, so any slot field edit propagates; no per-field handlers needed. - Regression test added (fails on main, passes here). <details><summary>Full context for agent readers</summary> **Root cause.** Before ECS, `LGraphCanvas` listened for `node:slot-label:changed` and redrew. The ECS merge removed that handler and instead reads slot data through `createNodeShellState`. The plain objects in `node.inputs` / `node.outputs` are not reactive, so label writes never invalidated the shell state and the Vue node kept the old label. **Fix.** `src/lib/litegraph/src/node/slotDescriptorView.ts` adds a generic `createSlotView<T>` Proxy (exported as `createInputSlotView` / `createOutputSlotView`, plus `resolveInputSlotView` for lookups). `createNodeShellState` in `src/core/graph/nodeShell/nodeShellState.ts` takes the two view factories and derives its slot arrays from them; `LGraphNode.ts` passes them through. Any write to a slot descriptor (label, name, type) now triggers the shell to recompute. **Tests.** `src/core/graph/nodeShell/slotLabelReactivity.regression.test.ts` (5 cases: input rename, output rename, rename after link, rename of a widget-backed input, rename via `renameSlot`). Written TDD: red on `main`, green on this branch. The test lives under `src/core/graph/nodeShell/` to satisfy the layer-boundary lint. `pnpm vitest run` on the three touched test files: 18/18. `pnpm typecheck` clean, `oxlint`/`eslint` clean. **Disclosure.** Knip (pre-push hook) flagged an unused `resolveOutputSlotView` export that I had added for symmetry; I removed it rather than leave dead code. Add it back if a caller appears. **Backport.** Labelled `needs-backport`, `core/1.53`, `cloud/1.53` per program policy (every ECS fix goes to 1.53 before promotion). <!-- authored-by:agent supreme-operator w3-520-followup --> </details> --------- Co-authored-by: Amp <amp@ampcode.com> (cherry picked from commit 928cd4a)
Fixes #16642 - Renaming an input or output slot now refreshes the rendered label immediately (regressed when the ECS node state landed in #14246). - Slot descriptors are exposed to the node shell through a reactive view, so any slot field edit propagates; no per-field handlers needed. - Regression test added (fails on main, passes here). <details><summary>Full context for agent readers</summary> **Root cause.** Before ECS, `LGraphCanvas` listened for `node:slot-label:changed` and redrew. The ECS merge removed that handler and instead reads slot data through `createNodeShellState`. The plain objects in `node.inputs` / `node.outputs` are not reactive, so label writes never invalidated the shell state and the Vue node kept the old label. **Fix.** `src/lib/litegraph/src/node/slotDescriptorView.ts` adds a generic `createSlotView<T>` Proxy (exported as `createInputSlotView` / `createOutputSlotView`, plus `resolveInputSlotView` for lookups). `createNodeShellState` in `src/core/graph/nodeShell/nodeShellState.ts` takes the two view factories and derives its slot arrays from them; `LGraphNode.ts` passes them through. Any write to a slot descriptor (label, name, type) now triggers the shell to recompute. **Tests.** `src/core/graph/nodeShell/slotLabelReactivity.regression.test.ts` (5 cases: input rename, output rename, rename after link, rename of a widget-backed input, rename via `renameSlot`). Written TDD: red on `main`, green on this branch. The test lives under `src/core/graph/nodeShell/` to satisfy the layer-boundary lint. `pnpm vitest run` on the three touched test files: 18/18. `pnpm typecheck` clean, `oxlint`/`eslint` clean. **Disclosure.** Knip (pre-push hook) flagged an unused `resolveOutputSlotView` export that I had added for symmetry; I removed it rather than leave dead code. Add it back if a caller appears. **Backport.** Labelled `needs-backport`, `core/1.53`, `cloud/1.53` per program policy (every ECS fix goes to 1.53 before promotion). <!-- authored-by:agent supreme-operator w3-520-followup --> </details> --------- Co-authored-by: Amp <amp@ampcode.com> (cherry picked from commit 928cd4a)
Adds e2e coverage for four ECS migration behaviours, in both the Vue and legacy renderers: - **Node source badge Settings transitions** (`nodeSourceBadgeMode.spec.ts`). Drives the real Settings control through Show all, Hide built-in, None, Show all again, with no reload. Core `PreviewImage` and custom `DevToolsErrorRaiseNode` are expected to differ under Hide built-in. Vue asserts on visible badges; legacy observes actual `drawBadges`/`fillText` calls and waits for a completed frame. - **API pricing badge toggle** (`apiPricingBadge.spec.ts`). - **Link disconnect/reconnect at emulated DPR 1.5** (`links/deviceScaleFactor.spec.ts`). Exact endpoints and output-link count. - **Marquee selection at emulated DPR 1.5** (`selection/deviceScaleFactor.spec.ts`). Exact two-node selection. Both scaling tests use Playwright's emulated `deviceScaleFactor`, not physical display scaling or browser zoom. Physical display validation stays manual. Supporting fixtures: `LegacyNodeBadgeHelper` (legacy badge probe), `SettingDialog.selectSetting`. [QA plan](https://app.notion.com/p/comfy-org/3c56d73d365081629481ea0f1d09fc65) · [Migration](Comfy-Org#14246) <details><summary>Rebase note, 2026-09-25</summary> The branch had drifted 634 commits behind `main` and was red on `typecheck-aux`, `repo-checks`, `fallow` and `lint`. Rebased clean (no conflicts, diff unchanged at 551 lines across 7 files) and fixed the fallout in `e8ae9041a0`: - `Settings` moved out of `@/schemas/apiSchema`. The unresolved import was the single cause of the typecheck, knip and fallow failures. - `SettingDialog` already imports `comfyExpect as expect`; the added `@playwright/test` `expect` was a duplicate identifier. - `vueNodes.waitForNodes()` no longer takes a count. - `comfy(prefer-initial-settings)` landed after this branch was cut. Startup settings moved to `test.use({ initialSettings })`, and the settings-only `afterEach` teardown was removed: `comfyPageFixture` reseeds settings before each test, so the restores were dead code. That supersedes three earlier commits on this branch that added those restores in response to review. Dropping them also removes describe-scope mutable state shared across the renderer loop. Earlier body text referenced pre-rebase commit SHAs and out-of-scope claims (body zoom, API serialization, locale layout, download/re-import, Browse Templates undo, missing-model dialogs). None of that is in this PR; removed so it does not read as a spec. </details> --------- Co-authored-by: Amp <amp@ampcode.com>
…S migration QA plan (Comfy-Org#17462) - Longer titles and labels verified. - Clipping controls reject truncated text. - Human legibility check remains. <details><summary>Full context for agent readers</summary> Coverage includes Vue node movement and widget edits through renderer toggles and save/reload, repeated serialized renderer round trips, and text rendering at 50% and 200% zoom. At [the current test head](Comfy-Org@5e335f4), zoom cases use the longer title `KSampler Advanced Controls` and widget label `guidance scale`. Assertions check exact zoom and text, positive bounds, complete natural text layout inside clipping ancestors, and rendered ink. At 200%, deliberately halving each text container's width makes the clipping assertion reject both perturbations; the restored text passes. The parent independently repeated the two zoom cases successfully against the intended checkout and a private backend, then inspected both screenshots. The other two renderer-transition cases were not repeated in this pass, so the older 4/4 result is not claimed as current-head verification. Static checks and commit/push hooks passed. Hosted CI and review remain separate. The first parent attempt reached a user selector because the reused frontend port belonged to another checkout and backend. A newly bound server from the intended checkout resolved that harness mismatch; no product assertion was weakened. Source-plan case 54 remains partial: exact text presence and clipping are automated, but subjective legibility and physical-display appearance still require human assessment. [QA plan](https://app.notion.com/p/comfy-org/3c56d73d365081629481ea0f1d09fc65) · [Migration PR](Comfy-Org#14246) Glossary: Vue is the DOM-rendered Nodes 2.0 interface; CI means hosted automated checks. </details> --------- Co-authored-by: Amp <amp@ampcode.com>
…omfy-Org#20701) ## Summary Regression test for Comfy-Org#20648 / FE-3347. It covers this case: after `LGraph.clear()`, a new node that reuses a cleared node's id must not pick up that node's `widgetValueStore` row, and the old `graphId:nodeId:widget` row must be gone. The test lives in `LGraph.test.ts`, in the "Graph Clearing and Callbacks" group, next to the existing `clear()` store-cleanup test. **This test passes on current `main`.** The bug was reported on 1.52.7, and it does not reproduce from 1.53.1 onward. Commit a8abe57 (Comfy-Org#14246) changed `clear()` so it gives the root graph a fresh UUID instead of resetting it to `zeroUuid`, which used to skip the purge. `main` also discards each cleared node's widget rows on its own, through `clearNodeOwnedStoreState` and `detachNodeFromStores(..., 'discard-values')`. The test overlaps the existing graph-wide `clear()` purge test as a guard. Its value is recording the reported scenario with real nodes. I chose a unit test over Playwright because `Comfy.ClearWorkflow` comes down to `app.clean() → rootGraph.clear()`, and the leak happens entirely inside `LGraph` and `widgetValueStore`. Fixes Comfy-Org#20648 (already fixed on `main` by Comfy-Org#14246; this PR adds the regression test) ## Verification - `pnpm exec vitest run src/lib/litegraph/src/LGraph.test.ts`: 127/127 pass. - Mutation check, with `LGraph.ts` edited temporarily and then reverted: restoring 1.52.7 behavior (no purges, root reset to `zeroUuid`) makes the new test **fail**. - oxfmt is clean. Test-only change, so no browser or tmux QA. --------- Co-authored-by: Glary-Bot <glary-bot@users.noreply.github.com>
…FE-3459) (Comfy-Org#21114) *PR Created by the Glary-Bot Agent* --- ## Summary Fixes [FE-3459](https://linear.app/comfyorg/issue/FE-3459): in Nodes 2.0, the widgets on VHS **Load Video (Upload)** overlap each other. In `WidgetLegacy.vue` `draw()`, Comfy-Org#15453 ("test: cover direct widget array mutations", which landed on main through the ECS migration Comfy-Org#14246) changed the order of the two canvas width sources. `getBoundingClientRect().width` now came first and `parentElement.clientWidth` became the fallback. - `getBoundingClientRect()` includes the graph canvas zoom transform. A legacy widget redrawn while the graph is zoomed out was therefore sized at the scaled width. That width was used for `computeSize`/height, `widget.width` and the canvas backing width, so the widget heights came out wrong. - A transform change doesn't trigger `ResizeObserver`, so the wrong size stayed after zooming back to 100%. The result was overlapping widgets. This PR puts the two lines back in their original order. Layout `clientWidth` (not affected by the transform) comes first, and the bounding rect is only the fallback for the zero-width case. The parent is still `w-full`, so `clientWidth` and the rect agree at 1× zoom. ## Changes - `WidgetLegacy.vue`: `parentElement.clientWidth || getBoundingClientRect().width` - `WidgetLegacy.test.ts`: new regression test. It mocks a layout width of 200 and a zoomed rect width of 100, then checks that `widget.width` is 200 and the canvas backing width is 400. I confirmed the test fails without the fix (`expected 100 to be 200`). ## Verification - `pnpm vitest run src/renderer/extensions/vueNodes/widgets/components/`: 497/497 pass - `pnpm typecheck`, oxlint, eslint, oxfmt: clean - Browser check (done in the FE-3459 investigation, not repeated here): production builds served by ComfyUI with the real VideoHelperSuite extension showed the overlap. Swapping only these two lines fixed it, both on the commit that introduced the overlap and on current `main`. I didn't take a separate Playwright screenshot for this PR, because the repro needs the VHS custom node plus an uploaded video in a backend. Linear: FE-3459 Co-authored-by: Glary-Bot <glary-bot@users.noreply.github.com>
…or) (Comfy-Org#20747) *PR Created by the Glary-Bot Agent* --- ## Summary Fixes the prod error `DataCloneError: Proxy object could not be cloned` on `cloud-frontend-prod`. Chrome reports it as `#<Object> could not be cloned`, Safari as `The object can not be cloned`. Datadog RUM shows 116 errors across 70 sessions in 30 days, still happening on cloud/v1.56.3. Workflows fail to open from templates, file open or drop, startup restore, and shared links. This is the third round of the same bug: code keeps moving from a JSON copy to `structuredClone` on data that is not actually plain. This PR removes the crash site, fixes both sources of proxies, and adds a regression test for each earlier occurrence. ## Root cause A strict `structuredClone` ran on `graph.serialize()` output, and that output can still contain JS proxies: - `createNewWorkflow` (`workflowStore.ts`) cloned `rootGraph.serialize()` on every load. - `serialize()` copies `extra` only one level deep and runs extension `onSerialize` hooks on the output object. ## Timeline | When | Change | Effect | |---|---|---| | Jul 2025 | [litegraph.js#1158](Comfy-Org/litegraph.js#1158) / [Comfy-Org#4696](Comfy-Org#4696) propose `structuredClone` for `LiteGraph.cloneObject()` | Review blocked it: *"you cannot simply drop this in… It will break custom nodes."* Still open; `cloneObject` is still a JSON copy. | | Feb 2026 | Comfy-Org#8898 (`3d88d0a6ab`) | First in-tree proxy fix: widget values are JSON-copied in `LGraphNode.serialize`. | | Mar 2026 | Comfy-Org#9338 (`68b16e3a3f`) | App Builder writes `extra.linearData = { inputs: [...data.inputs] }`. The shallow spread leaks reactive tuples into the graph. | | Aug 19 2026 | Comfy-Org#11631 (`fb030dcdb8`), first in **cloud/v1.52.4** | `createNewWorkflow` switches from a JSON copy to `structuredClone`. **This creates the crash site.** | | Aug 24 2026 | ECS migration Comfy-Org#14246 (`a8abe573c0`), first in **cloud/v1.53.4** | `NodeState` is now registered with `reactive()`, so `node.properties` is a deep reactive proxy. | | Sep 20 2026 | Comfy-Org#18165 ("1.52.7 fine, 1.53.6 broken") | CRT Nodes "Fancy Timer" does `onSerialize(o) { o.properties = this.properties }` → `DataCloneError`. | | Sep 22 2026 | Comfy-Org#18252 (`8ff5db2f1e`, Sentry FRONTEND-51) | Fixes extension-only fields. `properties` is a canonical field, so Comfy-Org#18165 still crashed at `createNewWorkflow`. | ## Changes The history alternates red and green: each failing test commit comes before its fix. **Crash site (`workflowStore.ts`).** `createNewWorkflow` no longer deep-copies. `ensureWorkflowId` doesn't mutate its argument and the result is only passed to `JSON.stringify`, so the stored bytes are unchanged and nothing is left to clone (`e9f23ce`). **Source 1: App Builder (`appModeStore.ts`).** `linearData` is written as new typed tuples, and each config gets a JSON copy. A missing config is omitted rather than written as `null`, so the value matches the `zLinearInput` schema. End-to-end reorder, save and reopen is already covered by `browser_tests/tests/builderReorder.spec.ts:125-147`. The unit tests cover proxy depth and the omitted config. **Source 2: serialize hooks (`extensionPersistence.ts → runExtensionSerializeHook`).** This only runs when a hook exists; nodes and graphs without hooks are untouched. After the hook runs, each canonical field is checked with `structuredClone`, whether the hook replaced it or edited it in place: - **A cloneable value is kept exactly as the hook left it.** That matches main: `Date`, `Map`, typed arrays and class instances keep their in-memory types, and `toJSON` still runs at save time. - **A value that can't be cloned is JSON-detached.** In practice that means a live reactive proxy or a geometry view. Live geometry views (`pos`/`size`, proxies over typed arrays) become `[x, y]`. Real typed arrays keep main's `{"0":…}` JSON. - **If JSON detachment also fails** (a cycle, BigInt, or a throwing getter or `toJSON`), the value is kept and a warning is logged, so the save fails loudly as it did on main instead of writing a workflow without that field. **Regression guards.** Each new test fails on base and passes here. - `extensionPersistence.test.ts` covers: - Comfy-Org#18165, both the whole-field and the nested in-place variants, for node and graph hooks; - later live edits not leaking into a serialized node; - geometry views, flat, nested and in place; - Comfy-Org#8898 reactive widget values; - cloneable replaced values staying intact, including `toJSON`; - an untouched field keeping full fidelity; - a typed array keeping its saved shape next to a proxy; - an undetachable value kept so the save fails. - `LiteGraphGlobal.cloneObject.test.ts` pins `cloneObject`'s proxy tolerance, so repeating Comfy-Org#1158 now fails a test. - `browser_tests/tests/legacyDoNotReplicate/legacyLiveSerializedProperties.spec.ts` (from Comfy-Org#21504) opens a workflow containing a devtools node that reproduces the Fancy Timer hook. Before the fix the load fails with `Failed to parse workflow: DataCloneError` and no tab opens. ## For reviewers - **JSON vs `structuredClone` policy:** JSON is used only for values `structuredClone` rejects, which in practice means live proxies. Everything else is left as the hook wrote it, so saved JSON and in-memory types match main. - **Custom-node risk (Comfy-Org#1158):** this PR moves away from it. Hook-provided values are still honoured; only live proxies are replaced with copies. - **Performance** (1,000 nodes, mean of 20 `graph.serialize()` calls in Vitest, two runs each): | Case | main | this branch | |---|---|---| | No hooks | 14–15 ms | 15 ms (unchanged) | | Graph `onSerialize` | 12–14 ms | 17 ms | | Graph hook + a hook on every node | 19.5 ms | 34–35 ms | - The cost is the per-field `structuredClone` check. For a graph hook, that clones `nodes` and `definitions` once per serialize. - Skipping those fields is not safe, because a hook can push a live proxy into an existing container. - No code in this repo registers `onSerialize`, so only custom-node packs that install hooks pay this. - On main, the hooked-node case was not usable either: it produced the proxy output that crashed on load. - **Known limits:** - A raw (non-proxy) object a hook assigns still aliases live state, as on main. - Other strict clones still exist (`structuredClone(extra)` in `LGraph.configure`, `workflowToClipboardItems`, `subgraphStore.getBlueprint`). Both proxy sources are now fixed before data reaches them. - **Commit history:** red/green is intentional. Squash-merge, or keep the history as is; please don't squash red into green. ## Verification - **Unit tests** under `src/lib/litegraph`, `src/platform/workflow`, `src/stores` and `src/scripts`: 314 files, 5463 passed. Pre-commit (oxfmt, oxlint, `typecheck:app`) passed on every commit. - **E2E:** the `legacyDoNotReplicate` folder and `builderReorder.spec.ts` passed (47 tests) with `scripts/test-browser-offline.sh --project=chromium` against a dist built from this head. The new Fancy Timer spec fails against a dist built with the fix reverted. - **Live dev app (Playwright):** select and reorder in builder mode, then run `structuredClone(rootGraph.serialize())` and `createNewTemporary(…)`. Both threw `DataCloneError` before the fix and succeed after. --------- Co-authored-by: Glary-Bot <glary-bot@users.noreply.github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org>
Summary
Still-draft feature branch for migrating entity state from LiteGraph objects and runtime mirrors into dedicated stores with derived, reactive views.
This consolidates the reviewed ECS migration slices, strengthens their coverage, incorporates the layout-state follow-up, and documents the current migration status and remaining work.
Changes
Reviewed PRs merged into this feature branch:
Review Focus
Status
Still draft. The branch is rebased onto
main; CI is running against the rebased history.