feat(dashboard): show endpoint parent/child hierarchy as a tree - #900
Merged
Conversation
Collaborator
Author
The node endpoint list was a flat numeric sort with no indication that some endpoints (e.g. ClosurePanel endpoints under a Bridged Node) are children of another endpoint. Derive parent/child relationships from each endpoint's Descriptor PartsList (29/3) and render children indented directly under their parent instead of interleaved by number. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
lboue
force-pushed
the
feature/endpoint-hierarchy-tree
branch
from
July 19, 2026 20:23
91783c3 to
fdafba7
Compare
lboue
marked this pull request as ready for review
July 19, 2026 20:24
Contributor
There was a problem hiding this comment.
Pull request overview
Adds endpoint hierarchy rendering to the dashboard node view by deriving a parent/child tree from each endpoint’s Descriptor cluster PartsList (29/3), and updates the UI to render endpoints in parent-first order with indentation to reflect depth.
Changes:
- Added
getEndpointTree()utility to compute a parent/child endpoint ordering from DescriptorPartsList. - Updated
matter-node-viewto render endpoints in tree order with depth-based indentation. - Added unit tests for the new endpoint tree utility and documented the feature in the changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/dashboard/test/EndpointsUtilTest.ts | Adds unit tests validating endpoint tree ordering and nesting behavior. |
| packages/dashboard/src/util/endpoints.ts | Introduces getEndpointTree() to compute endpoint hierarchy from PartsList. |
| packages/dashboard/src/pages/matter-node-view.ts | Uses getEndpointTree() to render an indented, parent-first endpoint list. |
| CHANGELOG.md | Documents the new dashboard endpoint tree feature. |
Malformed Descriptor PartsList data (self-references or cycles between endpoints) could previously make endpoints vanish from the list (every endpoint ends up in hasParent, so roots is empty) or recurse forever. Add a visited guard and a fallback pass so every endpoint is always emitted exactly once.
…archy-tree # Conflicts: # CHANGELOG.md
…non-array Replace the array .includes() in the transitive-reduction step with a per-endpoint Set, lowering the worst case from O(n^3) to O(n^2) on large Full-Family bridges. Guard a non-array PartsList (Array.isArray) so malformed device data can't throw and blank the node view. Add tests for the Tree-pattern (direct-child-only) convention, an out-of-set parent surfacing children as roots, and a diamond graph. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Type of change
Description
The node endpoint list in the dashboard was a flat list sorted only by endpoint number, with no visual indication that some endpoints are children of another (e.g.
ClosurePanelendpoints bridged under aClosure/Bridged Nodeendpoint, or sensor endpoints under an aggregator).This adds
getEndpointTree()(packages/dashboard/src/util/endpoints.ts), which derives parent/child relationships from each endpoint's Descriptor clusterPartsListattribute (29/3). Since an ancestor'sPartsListalso includes indirect descendants, the function keeps only the closest parent for each endpoint (transitive reduction) so the result is a proper tree, not a flat superset.matter-node-view.tsrenders endpoints in parent-first tree order (a parent immediately followed by its children) instead of pure numeric order, with children indented under their parent (--md-list-item-leading-spacescaled by depth) to make the hierarchy visually clear.Backing evidence
N/A — this is a feature (new capability), not a fix for a defect. No log file applies.
Checklist
npm testpassesnpm run format-verifyandnpm run lintpass🤖 Generated with Claude Code