Restore a valid selection after reconnecting the last Switch input and remove
the redundant loading check after the early return.
Add Chrome regressions for workflow loading, routing, reconnection, legacy
Switch names, and image, mask, SEGS, conditioning, and regional-prompt combine
nodes. Wait for imported nodes to replace the previous graph, and check
non-default selections and fresh outputs after editing.
Keep the different-size mask batch test as a documented pre-existing failure;
its backend implementation is outside this change.
The Switch/Combine onConnectionsChange handlers detect workflow loading
with `new Error().stack.includes('loadGraphData')`. V8 keeps only 10
stack frames, so on deep load paths (tab reload, workflow re-open)
`loadGraphData` falls out of the trace, the guard fails, and the
handler runs its interactive-edit logic during configure: addInput
per connected link, removeInput/removeOutput, and the slot-0 connect()
that throws `t.findInputSlot is not a function` (#1223, #1244).
Also check `app.configuringGraph`, which the frontend sets for the
whole of graph configure, independent of stack depth.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Move readLinkedNumber, getDrawColor, computeCanvasSize to common.js
- Import shared functions in mask-rect-area.js and mask-rect-area-advanced.js
- Remove duplicate implementations from both MaskRectArea modules
- Clean up unused debug parameter in syncLinkedInputsToProperties
## Overview
This PR improves both MaskRectArea and MaskRectAreaAdvanced nodes by allowing them to accept values from connected INT nodes, while preserving backward compatibility with existing workflows.
It also fixes several UI and preview issues that prevented the canvas from updating correctly when values were driven by links.
Fixes#1126
## Key changes
### 1. Typed INT inputs support (backend)
- Both MaskRectArea and MaskRectAreaAdvanced now declare proper INT inputs in INPUT_TYPES.
- This allows parameters such as x, y, width, height, and blur_radius to be driven directly by other nodes.
- Existing workflows that relied on node properties remain supported via fallback logic using extra_pnginfo.
### 2. Live preview correctly updates when inputs are linked (frontend)
- The canvas preview now updates immediately when values come from linked INT nodes.
- This is achieved by synchronizing linked input values into node.properties during canvas rendering, avoiding reliance on widget callbacks or execution timing.
- This directly resolves the behavior reported in issue #1126.
### 3. Node height and layout fix (frontend)
- The node height calculation was corrected to use the actual widget layout (last_y) instead of input/output counts.
- Nodes can now both grow and shrink correctly when resized or when widget content changes.
- This removes excessive empty space below the widgets and canvas.
### 4. Widget duplication prevention
- Frontend logic now detects when widgets are already created by Python and avoids recreating them in JavaScript.
- This prevents duplicated widgets and keeps the node UI consistent.
### 5. Comment cleanup
- Remaining comments in Spanish were translated to English for consistency and maintainability.
## Backward compatibility
- Existing workflows continue to work without modification.
- Default behavior and mask output remain unchanged unless inputs are explicitly linked.
## Motivation
These changes make the nodes composable with the rest of the graph (especially math and control nodes), improve the reliability of the preview, and fix UI inconsistencies without introducing breaking changes.
InversedSwitch(Any) not increasing number of outputs after connecting first output (in )
# 953 #946
In the latest ComfyUI_frontend version, output is not appended as expected
* Prefer widget.callback over stack trace check
Update to LiteGraph included a rename of a local function. This value was being checked to prevent unwanted value sets.
This has been replaced with widget callback(), which for combo boxes is always called when a value is clicked, regardless of any change.
* nit
* Fix error caused by bug in litegraph
Known issue w/widget.callback and setter/getter.
* Fixed base path for img.src to allow ImpactPack to work when ComfyUI isn't at /
* Update impact-image-util.js
---------
Co-authored-by: Daniel Lewis <daniel.lewis@plailabs.com>