feat(ui): Fleet Pair / Revoke spire UI (#9/#12) #25

Merged
padreug merged 1 commit from feat/fleet-pair-ui into main 2026-06-18 17:29:34 +00:00
Owner

Operator-facing Fleet UI for the pairing/revoke endpoints (now both on main via #21 + #23).

What it adds (Machines tab)

  • Pairing chip per machine row: paired (green, paired-at tooltip) / not paired.
  • Pair action (qr_code_2) → dialog:
    • inputs: relay(s) for the spire's events (one per line — same relay the spire publishes to / its VITE_RELAY_URL) + optional token lifetime (hours) (duration_hours; blank = non-expiring).
    • POST /machines/{id}/pair → renders the returned seed_url as a <lnbits-qrcode> + copy button, shows the bunker-minted spire npub. Re-pair relabels + issues a fresh seed.
    • row immediately reflects the bunker-minted identity (machine_npub ← spire_pubkey_hex, paired_at).
  • Revoke action (link_off, shown only when paired) → confirm → POST /machines/{id}/revoke → updates the row, reports revoked_count (≥1 = access cut / 0 = spire never connected).

Reviewer notes

  • Manual smoke required — Quasar-UMD frontend, no unit coverage, superuser-gated page. Verify: spirekeeper page → Machines → Pair a machine (paste a relay) → QR + seed URL render + copy works → Revoke → chip flips. JS syntax-checked, conforms to .prettierrc, no self-closing-tag violations; 210 backend tests unaffected.
  • Relays are operator-supplied — no clean auto-source from the dashboard, so the dialog asks (hinted as the spire's VITE_RELAY_URL). Could auto-prefill later if we expose the instance's nostrrelay.
  • Same runtime constraint as #21/#23: requires lnbits ≥ #55.
  • CI red is the known upstream-lnbits-template mismatch (#24), not this change.

🤖 Generated with Claude Code

Operator-facing Fleet UI for the pairing/revoke endpoints (now both on `main` via #21 + #23). ## What it adds (Machines tab) - **Pairing chip** per machine row: `paired` (green, paired-at tooltip) / `not paired`. - **Pair** action (`qr_code_2`) → dialog: - inputs: **relay(s)** for the spire's events (one per line — same relay the spire publishes to / its `VITE_RELAY_URL`) + optional **token lifetime (hours)** (`duration_hours`; blank = non-expiring). - → `POST /machines/{id}/pair` → renders the returned `seed_url` as a **`<lnbits-qrcode>`** + copy button, shows the bunker-minted spire npub. Re-pair relabels + issues a fresh seed. - row immediately reflects the bunker-minted identity (`machine_npub ← spire_pubkey_hex`, `paired_at`). - **Revoke** action (`link_off`, shown only when paired) → confirm → `POST /machines/{id}/revoke` → updates the row, reports `revoked_count` (`≥1` = access cut / `0` = spire never connected). ## Reviewer notes - **Manual smoke required** — Quasar-UMD frontend, no unit coverage, superuser-gated page. Verify: spirekeeper page → Machines → **Pair** a machine (paste a relay) → QR + seed URL render + copy works → **Revoke** → chip flips. JS syntax-checked, conforms to `.prettierrc`, no self-closing-tag violations; 210 backend tests unaffected. - **Relays are operator-supplied** — no clean auto-source from the dashboard, so the dialog asks (hinted as the spire's `VITE_RELAY_URL`). Could auto-prefill later if we expose the instance's nostrrelay. - Same runtime constraint as #21/#23: requires **lnbits ≥ #55**. - CI red is the known upstream-lnbits-template mismatch (#24), not this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(ui): Fleet Pair / Revoke spire UI (#9/#12)
Some checks failed
ci.yml / feat(ui): Fleet Pair / Revoke spire UI (#9/#12) (pull_request) Failing after 0s
d826e68413
Operator-facing front for POST /machines/{id}/pair + /revoke (#21/#23):
  - Pairing chip per machine row (paired / not-paired + paired-at tooltip).
  - 'Pair' (qr_code_2) opens a dialog -> relays + optional duration_hours
    -> POST /pair -> renders the seed_url as <lnbits-qrcode> + copy, shows
    the bunker-minted spire npub. Re-pair relabels.
  - 'Revoke' (link_off, shown when paired) -> confirm -> POST /revoke ->
    updates the row, reports revoked_count (>=1 cut / 0 never-bound).
  - Row reflects the bunker-minted identity immediately (machine_npub <-
    spire_pubkey_hex, paired_at).

Quasar-UMD conventions: explicit close tags, ${ } delimiters, :style.
JS syntax-checked, conforms to .prettierrc; 210 backend tests unaffected.
Needs a manual browser smoke (superuser-gated page).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
padreug deleted branch feat/fleet-pair-ui 2026-06-18 17:29:34 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/spirekeeper!25
No description provided.