Skip to content

feat(terminal): master/detail node console — shell (part of #215)#220

Merged
Assar63 merged 1 commit into
masterfrom
feat/terminal-node-console
Jun 16, 2026
Merged

feat(terminal): master/detail node console — shell (part of #215)#220
Assar63 merged 1 commit into
masterfrom
feat/terminal-node-console

Conversation

@Assar63

@Assar63 Assar63 commented Jun 16, 2026

Copy link
Copy Markdown
Owner

The terminal shell you approved (#215) — a real working node console, replacing the flat menu+log screen. Ships with live values thanks to #213.

Layout

 zwave-terminal   Dongle: * /dev/ttyACM0   7 nodes
 ! WARN [zwave-protocol 0x11]: ...                     <- DaemonError banner (when set)
-------------------------------------------------------
 Nodes               | Node 5 - Kitchen light
 #   name        sec | class 04/10/01  sec S2
 5   Kitchen     S2  | CC 0x25 0x70 0x9F ...
 8   Hallway     S0  | values:
 9   Sensor      S2  |   binary_switch  On      (3s)
                     |   battery        92%     (1h)
-------------------------------------------------------
 12:30:01 node 5 SwitchBinary report: on              <- activity log
-------------------------------------------------------
 up/dn select | [c]ontrol [g]et [f]ail [L]ifeline | [a]dd [x]remove | [p]olicy [e]scenes [h]vac [l]ist [n]et [i]nfo [r]efresh (s:0) [q]uit

What

  • nodes.{hpp,cpp} — UI-thread node model: GetNodes + per-node GetNodeMetadata name; GetNodeValues for the selected node. Selection preserved by node id across refreshes.
  • render.cpp — pane layout (status / list / detail / log / hint bar), width-fitted and clamped to terminal size; selected row reverse-highlighted; value age rendered 3s/5m/2h/4d. The detail pane is the Node info window #45 node-info view.
  • main.cpp — arrow-key selection, a ~2s poll of the selected node's values, [a]/[x] add/remove (1/2 kept as aliases), [r] refresh. The per-CC Get/Control/Policy/Scenes/HVAC actions stay in their runActionMenu submenus.

Security label in the list/detail is derived from the CC list (S2 if 0x9F, S0 if 0x98) — a cheap proxy until NodeSecurityStatus is tracked.

Notes

  • Builds on both presets (utils on); 471/471 ctest unaffected (the TUI has no ctest harness — gate is compile + tidy + manual); clang-format + clang-tidy clean.
  • Mirrors handlers.hpp's <algorithm>-before-sdbus include guard for GCC 15's -Wtemplate-body (Message.h uses std::copy_n).

Remaining #215

  • contextual actions on the selection (skip the node-id prompt for [c]/[g]/[f]/[L]);
  • auto-refresh on NodeListChanged / NodeValueChanged signals (today: [r] / add-remove for the list, ~2s poll for values);
  • the DSK confirm modal (DSKPendingConfirmation/ConfirmDSK, S2 phase 9: inclusion bootstrap wiring #187).

Realises #45 (node info window) as the detail pane.

🤖 Generated with Claude Code

Replace the flat menu+log screen with a real master/detail node console:

  - status bar (dongle + node count + DaemonError banner) on top;
  - a selectable node list (left) — id, name (from node-metadata), security
    label (from the CC list);
  - a detail pane (right) for the selected node — identity + device class +
    CC list + last-known values with age (from the value cache #213), i.e.
    the #45 node-info view;
  - the activity log (bottom) and a scope-grouped key-hint bar.

New nodes.{hpp,cpp} holds the UI-thread model (GetNodes + GetNodeMetadata
names; GetNodeValues for the selected node). main.cpp's loop gains arrow-key
selection, a ~2s poll of the selected node's values, and [a]dd / [x]remove /
[r]efresh keys (1/2 kept as aliases). render.cpp lays out the panes (width-
fitted, clamps to terminal size). The per-CC Get/Control/Policy/Scenes/HVAC
actions stay in their runActionMenu submenus, unchanged.

Builds on both presets (utils on); 471/471 ctest unaffected; clang-format +
clang-tidy clean. Mirrors handlers.hpp's <algorithm>-before-sdbus include
guard for GCC 15's -Wtemplate-body.

Remaining #215: contextual actions on the selection (skip the node-id
prompt), auto-refresh on NodeListChanged/NodeValueChanged signals, and the
DSK confirm modal (#187).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Assar63 Assar63 merged commit 99037fb into master Jun 16, 2026
3 checks passed
@Assar63 Assar63 deleted the feat/terminal-node-console branch June 16, 2026 20:09
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.

1 participant