Skip to content

Add badges to the Explorer sidebar - #5951

Merged
knolleary merged 4 commits into
node-red:mainfrom
GogoVega:explorer-sidebar-badges
Oct 16, 2026
Merged

knolleary merged 4 commits into
node-red:mainfrom
GogoVega:explorer-sidebar-badges

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

Ref: https://discourse.nodered.org/t/add-the-error-badge-to-the-flow-tab/101775

Add badges to the Explorer sidebar

Capture d’écran 2026-09-14 à 10 07 59

The error badge update is based on events:

  • nodes:validate
  • flows:validate
  • subflows:validate

This PR therefore depends on #5950 to work properly.

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

knolleary commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

If you have a node with a long name and multiple badges shown, the badges are wrapping causing the line height to change

image

@knolleary

Copy link
Copy Markdown
Member

I've fixed the wrapping of badges, but found another issue.

From a clean workspace, move a node. The change marker (blue dot) is shown correctly on the node, on the flow tab, and against the flow entry in the explorer. However the node in the explorer doesn't show the marker

@GogoVega

Copy link
Copy Markdown
Contributor Author

I've fixed the wrapping of badges

Thanks 😘

However the node in the explorer doesn't show the marker

Ah, darn. That’s because the nodes:change event isn’t being triggered by the move.

@knolleary

Copy link
Copy Markdown
Member

Also subflow instances appear to have all badges shown when the workspace is clean

image

I have a local fix for the previous issue - only reliable way I can see is to add a nodes:move event that is emitted by the node proxy object when node.moved is changed.

Also looking at the subflow badge issue - I think the logic needs to be slightly different if type is subflow:*

@GogoVega

Copy link
Copy Markdown
Contributor Author

I think the logic needs to be slightly different if type is subflow:*

I don't think it's a node like any other. The logic is the same.

only reliable way I can see is to add a nodes:move event

That's perfect for me.

@knolleary

Copy link
Copy Markdown
Member

Going to merge this PR with two outstanding fixes needed:

  1. moving a node doesn't update the badge. I have the fix locally and will push to its own PR
  2. modifying subflow internals doesn't get reflected properly. @GogoVega is looking into it.

@knolleary
knolleary merged commit 57498c3 into node-red:main Oct 16, 2026
3 checks passed
@GogoVega
GogoVega deleted the explorer-sidebar-badges branch October 16, 2026 15:04
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