Repository navigation
fix: carry a placeholder's live title and colours onto its replacement node - #15734
Conversation
…t node replaceWithMapping read the load-time snapshot (last_serialization) instead of the live node, so a rename applied to a missing-node placeholder was lost when the pack was installed and the node replaced. Read serialize() instead — its placeholder branch replays the file's structural fields verbatim while overlaying the live title, flags and decorations. The replacement also inherited no colour at all: colour, bgcolor, boxcolor and shape were serialized but never applied, so a recoloured placeholder came back default-coloured.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ✅ 2013 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-08-26T20:17:55.770Z",
"gitSha": "886b3bae8fb898b8d7e6ab3d675a8412dc34ad29",
"branch": "matt/be-8850-node-replacement-serialize",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2061.9310000000155,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.020000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 565.388,
"heapDeltaBytes": 10589540,
"heapUsedBytes": 81909824,
"domNodes": -279,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 12.436,
"eventListeners": -157,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2051.398000000063,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.278,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 506.838,
"heapDeltaBytes": 10679788,
"heapUsedBytes": 81925680,
"domNodes": -281,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 8.265000000000002,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2220.4169999999976,
"styleRecalcs": 80,
"styleRecalcDurationMs": 38.589,
"layouts": 12,
"layoutDurationMs": 3.5220000000000002,
"taskDurationMs": 1153.9379999999999,
"heapDeltaBytes": 4793664,
"heapUsedBytes": 76596380,
"domNodes": -284,
"jsHeapTotalBytes": 6807552,
"scriptDurationMs": 137.87800000000001,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2122.41599999993,
"styleRecalcs": 81,
"styleRecalcDurationMs": 38.076,
"layouts": 12,
"layoutDurationMs": 3.3739999999999997,
"taskDurationMs": 1156.2169999999999,
"heapDeltaBytes": 3894404,
"heapUsedBytes": 75666312,
"domNodes": -283,
"jsHeapTotalBytes": 7331840,
"scriptDurationMs": 143.90200000000002,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1734.6820000000207,
"styleRecalcs": 30,
"styleRecalcDurationMs": 13.257000000000001,
"layouts": 6,
"layoutDurationMs": 0.5569999999999998,
"taskDurationMs": 349.5929999999999,
"heapDeltaBytes": 4169036,
"heapUsedBytes": 75529296,
"domNodes": 73,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 10.713000000000001,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1707.0240000000467,
"styleRecalcs": 31,
"styleRecalcDurationMs": 15.835000000000003,
"layouts": 6,
"layoutDurationMs": 0.6990000000000001,
"taskDurationMs": 347.951,
"heapDeltaBytes": 4605000,
"heapUsedBytes": 76319004,
"domNodes": 75,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 11.5,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 944.0569999999866,
"styleRecalcs": 12,
"styleRecalcDurationMs": 6.329999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 668.626,
"heapDeltaBytes": 6434296,
"heapUsedBytes": 78738100,
"domNodes": 16,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 141.64700000000002,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 922.3210000000108,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.159,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 669.104,
"heapDeltaBytes": 7356492,
"heapUsedBytes": 78874400,
"domNodes": 12,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 136.417,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2042.4750000000245,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.021999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 541.306,
"heapDeltaBytes": -1362348,
"heapUsedBytes": 77025648,
"domNodes": -267,
"jsHeapTotalBytes": -1355776,
"scriptDurationMs": 37.026999999999994,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2038.56200000007,
"styleRecalcs": 3,
"styleRecalcDurationMs": 2.593999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 540.824,
"heapDeltaBytes": -1689652,
"heapUsedBytes": 77394144,
"domNodes": -272,
"jsHeapTotalBytes": -1880064,
"scriptDurationMs": 37.64000000000001,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 3154.5409999999947,
"styleRecalcs": 63,
"styleRecalcDurationMs": 9.809999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2348.7609999999995,
"heapDeltaBytes": 1120080,
"heapUsedBytes": 66480216,
"domNodes": -276,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 847.624,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666696,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 3158.499000000006,
"styleRecalcs": 62,
"styleRecalcDurationMs": 8.992,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2328.317,
"heapDeltaBytes": 21208172,
"heapUsedBytes": 86551316,
"domNodes": -278,
"jsHeapTotalBytes": 3633152,
"scriptDurationMs": 834.116,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 4209.903999999995,
"styleRecalcs": 66,
"styleRecalcDurationMs": 12.24,
"layouts": 60,
"layoutDurationMs": 8.097999999999999,
"taskDurationMs": 2360.5349999999994,
"heapDeltaBytes": 23716120,
"heapUsedBytes": 91464788,
"domNodes": 24,
"jsHeapTotalBytes": 2883584,
"scriptDurationMs": 810.8409999999999,
"eventListeners": 12,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 4248.235000000022,
"styleRecalcs": 66,
"styleRecalcDurationMs": 12.350999999999997,
"layouts": 60,
"layoutDurationMs": 7.9590000000000005,
"taskDurationMs": 2330.996,
"heapDeltaBytes": 23405988,
"heapUsedBytes": 91132624,
"domNodes": 24,
"jsHeapTotalBytes": 2359296,
"scriptDurationMs": 806.6,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "legacy-node-drag",
"durationMs": 4675.385000000006,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.817000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3423.5350000000003,
"heapDeltaBytes": 24352808,
"heapUsedBytes": 91187964,
"domNodes": 0,
"jsHeapTotalBytes": 679936,
"scriptDurationMs": 943.4879999999999,
"eventListeners": 192,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 4693.182999999976,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.889999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3390.4879999999994,
"heapDeltaBytes": 23430484,
"heapUsedBytes": 90772788,
"domNodes": 0,
"jsHeapTotalBytes": 679936,
"scriptDurationMs": 936.6450000000001,
"eventListeners": 192,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "minimap-idle",
"durationMs": 2003.2790000000205,
"styleRecalcs": 3,
"styleRecalcDurationMs": 2.3859999999999992,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 524.2560000000001,
"heapDeltaBytes": 12050388,
"heapUsedBytes": 77193512,
"domNodes": -271,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 41.733,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2051.845000000071,
"styleRecalcs": 3,
"styleRecalcDurationMs": 2.7569999999999992,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 564.9390000000001,
"heapDeltaBytes": -3558760,
"heapUsedBytes": 77398968,
"domNodes": -273,
"jsHeapTotalBytes": -1093632,
"scriptDurationMs": 40.982,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 760.9239999999886,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.171000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 545.48,
"heapDeltaBytes": -7697472,
"heapUsedBytes": 65120540,
"domNodes": 20,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 147.292,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 694.2629999999781,
"styleRecalcs": 46,
"styleRecalcDurationMs": 8.994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 493.49299999999994,
"heapDeltaBytes": -7362712,
"heapUsedBytes": 64492488,
"domNodes": 18,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 134.804,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2051.2520000000336,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.257,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 477.23699999999997,
"heapDeltaBytes": -10896564,
"heapUsedBytes": 61537620,
"domNodes": -295,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 7.442000000000001,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2057.007999999996,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.602000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 479.56699999999995,
"heapDeltaBytes": -14711908,
"heapUsedBytes": 57030344,
"domNodes": -296,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.292999999999999,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1863.3480000000304,
"styleRecalcs": 78,
"styleRecalcDurationMs": 35.518,
"layouts": 16,
"layoutDurationMs": 4.507,
"taskDurationMs": 1080.643,
"heapDeltaBytes": 5936084,
"heapUsedBytes": 78797440,
"domNodes": -297,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 105.472,
"eventListeners": -233,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1839.4920000000639,
"styleRecalcs": 77,
"styleRecalcDurationMs": 35.065,
"layouts": 16,
"layoutDurationMs": 4.412,
"taskDurationMs": 1057.4589999999998,
"heapDeltaBytes": -4898632,
"heapUsedBytes": 67838636,
"domNodes": -296,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 105.015,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1350.9619999999813,
"styleRecalcs": 20,
"styleRecalcDurationMs": 30.333999999999993,
"layouts": 15,
"layoutDurationMs": 13.502000000000002,
"taskDurationMs": 895.799,
"heapDeltaBytes": 21681400,
"heapUsedBytes": 104074372,
"domNodes": 13671,
"jsHeapTotalBytes": 11010048,
"scriptDurationMs": 28.525999999999996,
"eventListeners": 2383,
"totalBlockingTimeMs": 121,
"frameDurationMs": 16.666666666666696,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 12196.177000000034,
"styleRecalcs": 244,
"styleRecalcDurationMs": 37.214999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8198.451000000001,
"heapDeltaBytes": -10098348,
"heapUsedBytes": 68850600,
"domNodes": -275,
"jsHeapTotalBytes": 1265664,
"scriptDurationMs": 2809.142,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 12322.367999999984,
"styleRecalcs": 245,
"styleRecalcDurationMs": 38.659,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8369.901,
"heapDeltaBytes": -9406660,
"heapUsedBytes": 69133376,
"domNodes": -274,
"jsHeapTotalBytes": 2052096,
"scriptDurationMs": 2865.2329999999997,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 18371.329,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17488.687,
"heapDeltaBytes": -48704256,
"heapUsedBytes": 176961820,
"domNodes": -6548,
"jsHeapTotalBytes": -864256,
"scriptDurationMs": 348.582,
"eventListeners": -7477,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18032.0210000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17301.661000000004,
"heapDeltaBytes": -29300604,
"heapUsedBytes": 177628008,
"domNodes": -6548,
"jsHeapTotalBytes": 724992,
"scriptDurationMs": 357.803,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 22445.816000000035,
"styleRecalcs": 182,
"styleRecalcDurationMs": 21.49599999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22087.96,
"heapDeltaBytes": -18134504,
"heapUsedBytes": 187435868,
"domNodes": -6548,
"jsHeapTotalBytes": 1753088,
"scriptDurationMs": 975.8370000000001,
"eventListeners": -7469,
"totalBlockingTimeMs": 195,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 21923.992,
"styleRecalcs": 172,
"styleRecalcDurationMs": 18.96199999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21586.564,
"heapDeltaBytes": -20952192,
"heapUsedBytes": 187175092,
"domNodes": -6548,
"jsHeapTotalBytes": -2002944,
"scriptDurationMs": 910.4449999999999,
"eventListeners": -7469,
"totalBlockingTimeMs": 31,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 487.4170000000504,
"styleRecalcs": 23,
"styleRecalcDurationMs": 29.814999999999998,
"layouts": 4,
"layoutDurationMs": 1.3669999999999998,
"taskDurationMs": 158.29700000000003,
"heapDeltaBytes": 6228136,
"heapUsedBytes": 74828816,
"domNodes": 154,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 10.688,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "workflow-execution",
"durationMs": 132.07199999999375,
"styleRecalcs": 9,
"styleRecalcDurationMs": 17.265,
"layouts": 3,
"layoutDurationMs": 1.434,
"taskDurationMs": 101.462,
"heapDeltaBytes": 3816424,
"heapUsedBytes": 72282760,
"domNodes": 111,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 4.928,
"eventListeners": 49,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## matt/be-8848-placeholder-decorations #15734 +/- ##
=====================================================================
Coverage 79.47% 79.48%
=====================================================================
Files 1947 1947
Lines 118503 118508 +5
Branches 34001 33998 -3
=====================================================================
+ Hits 94181 94193 +12
+ Misses 23823 23815 -8
- Partials 499 500 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @mattmillerai.
Found 4 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 2 |
| 🟢 Low | 2 |
Panel: 8/8 reviewers contributed findings.
Take a single serialize() snapshot before onRemoved() and the _nodes / _nodes_by_id overwrite, and pass it to both the default mapping and the widget/property transfer so the two cannot read divergent state. Also make the test's placeholder serialize() mock mirror production: drop the recorded decorations before overlaying the live ones, filter with Boolean, and apply the class-default title guard.
…ions' into matt/be-8850-node-replacement-serialize # Conflicts: # src/platform/nodeReplacement/useNodeReplacement.test.ts # src/platform/nodeReplacement/useNodeReplacement.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
56a9f2d
into
matt/be-8848-placeholder-decorations
STACKED — merging lands on
matt/be-8848-placeholder-decorations(owned by mattmillerai, #15719), NOTmain. #15719 is itself stacked on #15713. Review and land those first; this PR is behaviour-neutral without #15719 (it is the change that makesserialize()return live values on a placeholder).ELI-5
When a workflow references a node pack you don't have installed, ComfyUI draws a placeholder in its place. You can rename that placeholder and give it a colour, same as any node. Later you install the pack, hit "replace", and the real node appears — but it came back with the title from the file and no colour at all, quietly throwing away the rename and the colour you'd applied. This makes the replacement inherit what's actually on screen.
Summary
The node-replacement flow read a placeholder's load-time snapshot instead of the live node, and dropped its colours entirely; both are now taken from
serialize()and applied to the replacement.Changes
replaceWithMappingand the default-mapping call insrc/platform/nodeReplacement/useNodeReplacement.tsnow readnode.serialize()rather thannode.last_serialization ?? node.serialize(). The?? node.serialize()arm was dead code — the placeholder collection filter requiresn.last_serializationto exist — so every replacement replayed the file's title, and a rename made after load was silently lost. Separately,replaceWithMappingapplied onlytitlefrom the serialized data;color,bgcolor,boxcolorandshapewere serialized but never copied, so a recoloured placeholder became a default-coloured replacement node. Those four are now applied alongsidetitle.type/inputs/outputs/properties/widgets_values) are unaffected: only bareLGraphNodeinstances carrylast_serialization(verified — all three placeholder-creation sites usenew LGraphNode(...)), and that branch ofserialize()replays those fields verbatim fromlast_serialization, overlaying onlymode/pos/flags/ decorations (and livesizewhen expanded). The mapping and widget-transfer logic therefore sees identical input.Review Focus
last_serializationshort-circuit. Its safety rests on the claim above: everything reachingreplaceWithMappingis a bareLGraphNodewithlast_serializationset, soserialize()takes the placeholder branch. If a subclassed node could ever carrylast_serialization,serialize()would deriveinputs/outputsfrom the live (registered) definition instead of replaying the file's, and the mapping would be built against the wrong shape. The three creation sites areLGraph.configure,LGraph's subgraph-unpack path, and the API-format loader insrc/scripts/app.ts— allnew LGraphNode(...).boxcoloris never assigned anywhere outside serialization, andbgcoloris assigned only by the Note node and by the explicit user colour pickers. Missing-node styling rides on thehas_errorsflag, whichreplaceWithMappingalready clears. So a colour present on a placeholder is a colour the user put there.last_serializationexist undersrc/. This PR changes 2 (both in the node-replacement flow). The other 12 are left alone deliberately: 4 are reads that only want.typeor the existence check used as the placeholder discriminator (missingNodeScan.ts,useErrorClearingHooks.ts, and the two in the collection filter here), and 8 are the write/definition side (LGraph.ts,src/scripts/app.ts,LGraphNode.ts).createPlaceholderNode'sserializestub previously returned a frozen object literal that ignored thelast_serializationthe tests mutate after construction. Once the call site stops readinglast_serialization, that stub is wrong — every widget-transfer test would have failed for the wrong reason. It now derives fromnode.last_serializationplus the node's live fields, mirroring the real placeholder branch. No existing test's assertions changed.transferWidgetValuein this same file. No functional overlap with these lines; needs a trivial rebase if it lands first.Provenance
pnpm vitest run src/platform/nodeReplacement src/lib/litegraph/test: 122 passed, 0 failed.pnpm test:unit: 16552 passed, 13 failed — 12 of them inscripts/cicd/check-binary-size.test.ts, reproduced identically with this change stashed (pre-existing, environment-dependent), plus one 5s-timeout flake in afirstRunTourtest that passed on re-run. Red-check on the new test: reverting theserialize()read alone fails it on the title, and dropping the four decoration lines alone fails it on the colour — so it discriminates both halves.pnpm typecheck,pnpm lint,pnpm format,pnpm knip: clean.fromAnymock helper rather than a realLGraphNodeinstance; the file mocks the whole litegraph module, so a real instance is not constructible there. Verification is the unit suite plus a source sweep — there is no in-app repro in this run for the full missing-node → install-pack → replace journey, so the user-visible outcome is asserted at the composable boundary rather than on screen. The originating tracker issue and its investigation notes are internal and were not readable from this environment; the change was implemented from the specification handed to this run and cross-checked against the code itself.