frontend: mint panel shows the full one-shot install command (node-26#4) #106

Merged
logan merged 1 commits from feat/mint-panel-install-command into main 2026-09-06 19:31:34 -04:00
Owner

Pairs with node-26 PR #5 (feat/one-shot-install).

After a node enrollment token is minted, EnrollmentTokensPanel now renders the paste-ready one-liner:

curl -fsSL https://git.vpn.cusano.net/logan/node-26/raw/tag/v1/install.sh \
  | sudo bash -s -- --token <minted> --node-id node-XXX \
      --c2-url <derived> --mqtt-broker <derived>

with a Copy button, alongside the bare token (kept, and now also copyable).

Derivations (flagged — verify):

  • c2-url from process.env.NEXT_PUBLIC_C2_URL — same var lib/c2api.ts:4 reads. Fallback https://api.example.net.
  • mqtt-broker = mqtt. + api hostname with a leading api. stripped. DNS assumption; panel copy tells the operator to check it.
  • node-id left as node-XXX — the panel collects no node id.

Not typechecked — no node/npm in the authoring environment. It is plain React (two useState booleans, one computed string, standard JSX), reviewed by eye; next build in deploy.yml will catch a real type error before it ships. Please run npm run typecheck in drb-frontend/ before merge.

The raw/tag/v1/install.sh URL resolves once v1 is re-cut at node-26 PR #5's merge commit.

🤖 Generated with Claude Code

Pairs with node-26 PR #5 (`feat/one-shot-install`). After a node enrollment token is minted, `EnrollmentTokensPanel` now renders the paste-ready one-liner: ``` curl -fsSL https://git.vpn.cusano.net/logan/node-26/raw/tag/v1/install.sh \ | sudo bash -s -- --token <minted> --node-id node-XXX \ --c2-url <derived> --mqtt-broker <derived> ``` with a Copy button, alongside the bare token (kept, and now also copyable). **Derivations (flagged — verify):** - `c2-url` from `process.env.NEXT_PUBLIC_C2_URL` — same var `lib/c2api.ts:4` reads. Fallback `https://api.example.net`. - `mqtt-broker` = `mqtt.` + api hostname with a leading `api.` stripped. DNS assumption; panel copy tells the operator to check it. - `node-id` left as `node-XXX` — the panel collects no node id. **Not typechecked** — no node/npm in the authoring environment. It is plain React (two `useState` booleans, one computed string, standard JSX), reviewed by eye; `next build` in `deploy.yml` will catch a real type error before it ships. Please run `npm run typecheck` in `drb-frontend/` before merge. The `raw/tag/v1/install.sh` URL resolves once `v1` is re-cut at node-26 PR #5's merge commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
logan added 1 commit 2026-09-06 19:15:57 -04:00
After a node enrollment token is minted, the panel now renders the
paste-ready `curl -fsSL .../install.sh | sudo bash -s -- --token <minted>
--node-id node-XXX --c2-url <derived> --mqtt-broker <derived>` line with a
Copy button, alongside the bare token (also kept, also now copyable).

- c2-url from NEXT_PUBLIC_C2_URL (same var lib/c2api.ts reads), fallback
  https://api.example.net
- mqtt-broker derived as mqtt.<api-host minus leading api.> — a DNS
  assumption; the panel text tells the operator to check it
- node id is a node-XXX placeholder; the panel collects none

Pairs with node-26's install.sh (feat/one-shot-install). The raw/tag/v1/
URL resolves once v1 is re-cut at that PR's merge.

NOT typechecked here (no node/npm in this environment); plain React, two
useState booleans + one computed string, reviewed by eye. `next build` in
the deploy workflow will catch a real type error before it ships.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
logan merged commit de03f5bcaf into main 2026-09-06 19:31:34 -04:00
logan deleted branch feat/mint-panel-install-command 2026-09-06 19:31:36 -04:00
Sign in to join this conversation.