Files
shootthesound c5c38c56e2 Fix red-on-restart "not in list": stable widgets_values length
Root cause: widgets_values length mismatch between save and load.

The collapsible-header buttons had serialize=false set, so save emitted
a compact widgets_values of length 46 (the data widgets). At load, JS
re-adds the 4 buttons back to node.widgets, making it length 50.
ComfyUI loads positionally — the compact array's value at index 2
(image1_strength = 1.0) lands on the BUTTON1 widget (no harm), and
everything from index 3 onwards shifts by one position. Booleans land
on FLOAT widgets, numbers land in the imageN_ignore_area combo, and
ComfyUI's combo validation fires "not in list".

Fix:
1. Remove serialize=false from header buttons. They serialize as null
   now. Save count = node.widgets count = 50, so positional load assigns
   every value to the correct widget.
2. onConfigure migrates old compact-format saves: walks node.widgets,
   inserts null at each header button position, consumes one value from
   the compact array for every other widget. Result is a length-50
   aligned array with values on the right slots.

The defensive null-strip from the previous fix is rolled into the
migration path (compact = info.widgets_values.filter(v => v !== null)).
2026-05-07 11:44:28 +01:00
..