frontend: install command uses the node id from the mint form (node-26#4) #107

Merged
logan merged 1 commits from feat/mint-panel-nodeid into main 2026-09-06 20:15:11 -04:00
Owner

Follow-on to #106. The copy command hard-coded --node-id node-XXX even after the operator typed an identifier.

Now: the label entered at mint time is captured (mintedLabel) and interpolated into --node-id, sanitized to install.sh's [A-Za-z0-9_-] rule (spaces→dashes, other chars dropped). Placeholder relabeled Node ID, e.g. node-003. The edit node-XXX hint only shows when the sanitized value is empty.

Enrollment tokens are still fleet-wide server-side — this only pre-fills the command; the real node_id is set by --node-id on the Pi.

Not typechecked (no node/npm in the authoring env); next build in deploy.yml gates it. Please npm run typecheck in drb-frontend/ before merge.

🤖 Generated with Claude Code

Follow-on to #106. The copy command hard-coded `--node-id node-XXX` even after the operator typed an identifier. Now: the label entered at mint time is captured (`mintedLabel`) and interpolated into `--node-id`, sanitized to install.sh's `[A-Za-z0-9_-]` rule (spaces→dashes, other chars dropped). Placeholder relabeled `Node ID, e.g. node-003`. The `edit node-XXX` hint only shows when the sanitized value is empty. Enrollment tokens are still fleet-wide server-side — this only pre-fills the command; the real node_id is set by `--node-id` on the Pi. Not typechecked (no node/npm in the authoring env); `next build` in `deploy.yml` gates it. Please `npm run typecheck` in `drb-frontend/` before merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
logan added 1 commit 2026-09-06 20:13:25 -04:00
The mint panel's copy command hard-coded --node-id node-XXX. Now the label
just entered (the operator types the node id there — placeholder relabeled
"Node ID, e.g. node-003") is captured on mint and interpolated into the
command: spaces → dashes, non [A-Za-z0-9_-] stripped (install.sh's rule),
falling back to node-XXX only if that yields nothing. The "edit node-XXX"
hint now only shows in the fallback case.

Not typechecked (no node/npm here); one useState<string|null>, one derived
string, a JSX conditional. `next build` in deploy.yml gates it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
logan merged commit b430cf32f2 into main 2026-09-06 20:15:11 -04:00
logan deleted branch feat/mint-panel-nodeid 2026-09-06 20:15:13 -04:00
Sign in to join this conversation.