Repository navigation
fix: disconnect orphaned DynamicGroup host inputs #20708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a433e69
fix: disconnect orphaned DynamicGroup host inputs
jaeone94 cda28cd
test: cover orphaned wires on multiple subgraph hosts
jaeone94 78082cd
test: assert orphaned row outcomes without hook counts
jaeone94 ca52cfe
Merge branch 'main' into jaeone94/fix-dynamic-group-orphan-outer-link
jaeone94 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 Low — Without the
origin_id === SUBGRAPH_INPUT_IDguard, deleting a row now also cuts links from ordinary upstream nodes into the orphaned host slot, on every host instance thathosts()returns. The new test shows this is intended. One side effect is easy to miss, though: if the upstream node is a legacyPrimitiveNode, losing its last link firesonLastDisconnect(), which drops its widgets and stored value, and only undo brings them back. Confirm that this is acceptable and that the cuts across instances land in a single undo step. Otherwise, skip or warn on sources that hold user-entered values. Raised by 2 of 6 reviewers (claude-opus-5-5-xhigh adversarial, claude-opus-5-5-xhigh edge-case).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The disconnection uses the existing LiteGraph input-disconnect lifecycle, including PrimitiveNode cleanup when its last consumer is removed. Keeping that orphaned wire would retain a connection to a deleted row. cda28cd extends the regression to two hosts sharing the subgraph definition and verifies that both orphaned wires are removed within the existing single beforeChange/afterChange boundary, while another row’s wire/value and shared surviving consumers are retained. All44 targeted tests pass. This test does not claim a separate end-to-end Undo/Redo proof.