Add inline NodeLabel editing to Node detail view#681
Conversation
|
Thanks. I will check next week when back from vacation. |
|
4d12e1b fixes the formatting issue. (imports were out of order) |
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #369 by making the Matter Node Label editable directly from the initial Node detail view in the dashboard, reducing the need to navigate deep into endpoint/cluster attribute views.
Changes:
- Add a pencil icon next to the node label in the Node detail header to open label editing.
- Introduce a dedicated
node-label-dialogcomponent that writes the BasicInformation/NodeLabel attribute via the WS client. - Add a
showNodeLabelDialoghelper to lazy-load and attach the dialog to the dashboard app root.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/dashboard/src/pages/components/node-details.ts | Adds an inline edit affordance (pencil icon) for Node Label in the node header. |
| packages/dashboard/src/components/dialogs/node-label-dialog/show-node-label-dialog.ts | Adds a helper to lazy-load and render the node-label dialog. |
| packages/dashboard/src/components/dialogs/node-label-dialog/node-label-dialog.ts | Implements the dialog UI and saves Node Label by writing the BasicInformation attribute. |
- add accessible label and title to edit node button - statically import showAlertDialog in node-label-dialog
|
I've dealt with Copilot's comments.
Do you want me to rebase this against main and push again? |
|
@rspier strange that it passes. try to do a fresh "npm i" in the local checkout ... maybe some deps are outdated leading to the issue? |
|
I will merge and do some adjustments locally, thanks! |
) * feat(dashboard): Thread role badges + shared NodeLabel write logic Network graph (Thread): - Mark Thread RoutingRole (attr 0/53/1) on commissioned nodes with a corner role-rank badge overlaid on the device icon: crown=Leader, two-arrows=Router, dot=End Device/REED, sleep=Sleepy End Device. Device identity is preserved rather than replaced. - Mark the primary Backbone Border Router with a star badge on BR nodes. The central crown remains the mesh-Leader marker (MeshCoP bitmap). Leader and primary-BBR are orthogonal roles and render independently; a BR that is both shows both. Note the two leader encodings differ: MeshCoP bitmap role 3 vs ThreadNetworkDiagnostics RoutingRole 6. - Add theme-aware colors for router/end-device/primary-BBR in light and dark. NodeLabel editing (follow-up to #681): - Extract shared constants and writeNodeLabel() into util/node-label.ts; both the node-label dialog and the BasicInformation cluster panel use it. The helper trims, matching what MatterNode.nodeLabel reads back. - Drop the redundant attribute fallback that re-introduced the null-padded value the nodeLabel getter intentionally rejects. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(dashboard): address PR review comments - basic-information: sync the text field to the trimmed value after a successful save so the UI no longer shows the pre-trimmed string. - device-icons: document the new optional `badge` param on createIconDataUrl. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(dashboard): type-only import for MatterClient/MatterNode in node-label-dialog Used only in type positions; value import pulled them into the bundle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fixes #369.