Skip to content

Fix the subflow's 'changed' state when its content is modified - #6023

Merged
knolleary merged 2 commits into
node-red:mainfrom
GogoVega:fix-5951-subflow-changes
Oct 21, 2026
Merged

knolleary merged 2 commits into
node-red:mainfrom
GogoVega:fix-5951-subflow-changes

Conversation

@GogoVega

Copy link
Copy Markdown
Contributor

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

Fixes an outstanding issue from #5951 - ensuring the changed badge refreshes when a node inside a subflow is added/removed.

Remaining issues:

  • The history (undo/redo) does not correctly restore the changed badge state. e.g.
    • Delete a node inside a subflow then undo -> works
    • Add a node inside a subflow then undo -> not working
  • Moving a in/out/status node does not trigger a changed state change for the subflow.

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • I have run npm run test to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

@knolleary

Copy link
Copy Markdown
Member

Another issue:

  1. adding a node to a subflow -> subflow marked changed, all instance nodes marked changed, all flows containing instances marked changed - GOOD
  2. moving an existing node (any type) -> subflow marked changed, no instances or containing flows update - BAD

I'm going to merge this as-is, then I'll raise a separate issue to capture all of the minor inconsistencies we've identified - rather than try to tackle each one individually as there could be common fixes to them.

@knolleary
knolleary merged commit 98f6490 into node-red:main Oct 21, 2026
3 checks passed
@GogoVega

Copy link
Copy Markdown
Contributor Author

From my point of view, point 2 is correct; a move isn’t really a change that requires modifying the instances. I asked you about that via DM. If you believe this behavior is incorrect, then yes, open an issue, and we’ll fix it soon.

@GogoVega
GogoVega deleted the fix-5951-subflow-changes branch October 21, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants