Fleet device dialog: Remove device… entry → provisioning's gated remove (#2062) #2172

Closed
matou-build-agent wants to merge 0 commits from agent/issue-2062 into main

closes #2062

What this builds

Slice 4/4 of the Fleet device dialog (#2050 design; DDR 0295 / 0293): the
dialog's Remove device… entry — the one destructive act the dialog only
enters (ADR 0174 one-way door; Ben's 2026-10-29 ruling on #2062: adopt as
designed
).

  • A Remove device… link appears in the summary for every non-gateway
    device. The gateway's dialog shows no Remove and no role change — the
    front door moves only through takeover (DDR 0293).
  • Choosing it enters the P9-D5 consequence confirm (data-mode="remove-confirm")
    which states the consequence: services off, the node dropped + its
    identity revoked → re-enrol from scratch, and the reachability line (disk
    wiped if reachable, else "removed here, not erased there", #1114).
  • The confirm's primary act Review removal in provisioning… fires the
    existing remove-device-<id> intent (new removeDeviceRoute), which
    FleetSurface routes — via the unchanged setupTargetFromIntent — to
    provisioning's existing ⚠ LOSES remove review in place (the same state
    FleetSurface.openRemove sets). The dialog calls no destructive seam of
    its own
    (ADR 0100, no half-removal). Cancel removes nothing.

Acceptance criteria

  • Non-gateway device → Remove device… opens a confirm stating the
    consequence (services off, node dropped + identity revoked → re-enrol; data
    wiped if reachable, else removed-not-erased).
  • Confirm → hands off to provisioning's remove review
    (remove-device-<id> → FleetSurface.openRemove), calling no destructive
    seam itself.
  • Confirm → Cancel removes nothing.
  • Gateway device → no Remove and no role-change affordance (DDR 0293).

Tests

  • dashboard/tests/unit/fleetDeviceDialog.test.ts (+6) — the entry, the
    gateway omission, enter-confirm-fires-nothing, confirm → remove-device-<id>
    intent, Cancel, and a FleetSurface mount proving the confirm opens the remove
    review in place.
  • dashboard/tests/e2e/preview-harness/fleetDeviceRemove.spec.ts — the harness
    drive the screenshots below come from.
  • Full dashboard unit suite green (2317); vue-tsc + eslint clean.

Unproven by the seam: the real teardown (RemoveNode + RevokeGrant + VM
teardown) — provisioning's own live leg exercises it, not this routed entry.

Screenshots

From the control-panel preview harness (scenario=steady, tūī brand), after
the fix:

  • after-dialog-summary-with-remove.png — the device dialog summary with the
    Remove device… entry.
  • after-remove-confirm.png — the P9-D5 consequence confirm.
  • after-handoff-to-provisioning-remove.png — confirming opens provisioning's
    ⚠ Review impact (Remove & deploy) in place.
  • after-gateway-dialog-no-remove.png — the gateway (karaka) dialog carries no
    Remove.

Lands by human-approved merge (landing-pr, ADR 0267) — never pushed to main.

🤖 Generated with Claude Code

closes #2062 ## What this builds Slice **4/4** of the Fleet device dialog (#2050 design; DDR 0295 / 0293): the dialog's **Remove device…** entry — the one destructive act the dialog only *enters* (ADR 0174 one-way door; **Ben's 2026-10-29 ruling on #2062: adopt as designed**). - A **Remove device…** link appears in the summary for every **non-gateway** device. The **gateway's dialog shows no Remove and no role change** — the front door moves only through takeover (DDR 0293). - Choosing it enters the **P9-D5 consequence confirm** (`data-mode="remove-confirm"`) which **states the consequence**: services off, the node dropped + its identity revoked → re-enrol from scratch, and the reachability line (disk wiped if reachable, else "removed here, not erased there", #1114). - The confirm's primary act **Review removal in provisioning…** fires the existing `remove-device-<id>` intent (new `removeDeviceRoute`), which FleetSurface routes — via the unchanged `setupTargetFromIntent` — to provisioning's existing **⚠ LOSES remove review in place** (the same state `FleetSurface.openRemove` sets). **The dialog calls no destructive seam of its own** (ADR 0100, no half-removal). **Cancel** removes nothing. ## Acceptance criteria - [x] Non-gateway device → *Remove device…* opens a confirm stating the consequence (services off, node dropped + identity revoked → re-enrol; data wiped if reachable, else removed-not-erased). - [x] Confirm → hands off to provisioning's remove review (`remove-device-<id>` → `FleetSurface.openRemove`), calling no destructive seam itself. - [x] Confirm → *Cancel* removes nothing. - [x] Gateway device → no Remove and no role-change affordance (DDR 0293). ## Tests - `dashboard/tests/unit/fleetDeviceDialog.test.ts` (+6) — the entry, the gateway omission, enter-confirm-fires-nothing, confirm → `remove-device-<id>` intent, Cancel, and a FleetSurface mount proving the confirm opens the remove review in place. - `dashboard/tests/e2e/preview-harness/fleetDeviceRemove.spec.ts` — the harness drive the screenshots below come from. - Full dashboard unit suite green (2317); `vue-tsc` + eslint clean. **Unproven by the seam:** the real teardown (`RemoveNode` + `RevokeGrant` + VM teardown) — provisioning's own live leg exercises it, not this routed entry. ## Screenshots From the control-panel preview harness (`scenario=steady`, tūī brand), after the fix: - `after-dialog-summary-with-remove.png` — the device dialog summary with the **Remove device…** entry. - `after-remove-confirm.png` — the P9-D5 consequence confirm. - `after-handoff-to-provisioning-remove.png` — confirming opens provisioning's **⚠ Review impact** (Remove & deploy) in place. - `after-gateway-dialog-no-remove.png` — the gateway (karaka) dialog carries no Remove. Lands by human-approved merge (`landing-pr`, ADR 0267) — never pushed to `main`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The device dialog gains the one DESTRUCTIVE act it only ENTERS (P9-D5, DDR
0295 / 0293, ADR 0174 one-way door; Ben's 2026-10-29 ruling on #2062: adopt
as designed). The dialog fires no destructive seam of its own — it routes
into provisioning's existing ⚠ LOSES remove review.

Decisions:
- DeviceDialog.vue gains a `mode` toggle (summary | remove-confirm). The
  summary shows a **Remove device…** link for every NON-gateway device; the
  gateway's dialog shows no Remove and no role change (DDR 0293).
- Choosing it enters the P9-D5 consequence confirm (`data-mode="remove-confirm"`)
  stating services off, node dropped + identity revoked → re-enrol, and the
  reachability line (wiped if reachable, else removed-not-erased, #1114).
- The confirm's primary act fires the EXISTING `remove-device-<id>` intent
  (new `removeDeviceRoute` in fleet.ts, owner provisioning); FleetSurface's
  unchanged `setupTargetFromIntent` opens provisioning's remove review in
  place — the same state `FleetSurface.openRemove` sets. Cancel removes
  nothing. The dialog calls NO destructive seam (ADR 0100).
- New i18n `deviceDialog.removeEntry` + `deviceDialog.remove.*` across all
  five shell locales (en/fr/pt/es/nl).

Seam + evidence:
- dashboard/tests/unit/fleetDeviceDialog.test.ts (+6): the entry, the
  gateway omission, enter-confirm-fires-nothing, confirm → remove-device-<id>
  intent, Cancel, + a FleetSurface mount proving the confirm opens the remove
  review in place.
- dashboard/tests/e2e/preview-harness/fleetDeviceRemove.spec.ts: the harness
  drive (summary → confirm → ⚠ LOSES review + the gateway-no-remove shot).
- Full dashboard unit suite green (2317), vue-tsc + eslint clean.

Unproven by the seam: the real teardown (RemoveNode + RevokeGrant + VM
teardown) — provisioning's own live leg exercises it, not this entry.

Lands by human-approved PR (landing-pr, ADR 0267) — never pushed to main.

Files: dashboard/src/components/shell/DeviceDialog.vue,
dashboard/src/lib/fleet.ts, dashboard/src/i18n/shell/{en,fr,pt,es,nl}.ts,
dashboard/tests/unit/fleetDeviceDialog.test.ts,
dashboard/tests/e2e/preview-harness/fleetDeviceRemove.spec.ts, STATUS.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Factory-Account: d631bd58e1e9
Author
Member

📷 Evidence for #2062 — taken after the fix unless the name says otherwise.

after-dialog-summary-with-remove.png
after-dialog-summary-with-remove.png

after-remove-confirm.png
after-remove-confirm.png

after-handoff-to-provisioning-remove.png
after-handoff-to-provisioning-remove.png

after-gateway-dialog-no-remove.png
after-gateway-dialog-no-remove.png

:camera: **Evidence for #2062** — taken after the fix unless the name says otherwise. **after-dialog-summary-with-remove.png** ![after-dialog-summary-with-remove.png](https://git.matou.nz/attachments/cf588c97-601e-4e1a-ade1-4f34fc67234f) **after-remove-confirm.png** ![after-remove-confirm.png](https://git.matou.nz/attachments/376286f6-1596-4fff-a0b6-d5706ee47177) **after-handoff-to-provisioning-remove.png** ![after-handoff-to-provisioning-remove.png](https://git.matou.nz/attachments/d40b5af6-7b44-499c-87fe-5e55408093a8) **after-gateway-dialog-no-remove.png** ![after-gateway-dialog-no-remove.png](https://git.matou.nz/attachments/6aa85b01-daa7-4aef-a01e-0cd086cadf1a)
Author
Member
close-report gates passed for #2062 — every claim verified; this PR is cleared for merge.
<!-- close-report: gates-passed --> close-report gates passed for #2062 — every claim verified; this PR is cleared for merge.
ben referenced this pull request from a commit 2026-11-16 17:31:44 +00:00
Owner

Merged — merge commit b6d840a8. Merged to main by hand at Ben's request (main now at 1776d784), stacked with #2170, #2171, #2172, #2173 and #1897. Forgejo did not auto-detect the pushed merge and manually-merged is disabled on this repo, so this PR is closed by hand — the code IS on main. #2172's remove confirm folded in as a third dialog mode (summary | edit | remove-confirm). One semantic clash fixed in a follow-up commit 1776d784: #2170 offered Change this device on the gateway, which #2172's test and the P9-D1 wireframe forbid (DDR 0293) — it is now hidden on the gateway. Verified on the merged stack: dashboard 2339/2339, app 2394/2394, both vue-tsc clean, touched Go + broker packages green.

**Merged** — merge commit b6d840a8. Merged to `main` by hand at Ben's request (main now at 1776d784), stacked with #2170, #2171, #2172, #2173 and #1897. Forgejo did not auto-detect the pushed merge and `manually-merged` is disabled on this repo, so this PR is closed by hand — the code IS on main. #2172's remove confirm folded in as a third dialog mode (summary | edit | remove-confirm). One semantic clash fixed in a follow-up commit 1776d784: #2170 offered *Change this device* on the gateway, which #2172's test and the P9-D1 wireframe forbid (DDR 0293) — it is now hidden on the gateway. Verified on the merged stack: dashboard 2339/2339, app 2394/2394, both `vue-tsc` clean, touched Go + broker packages green.
ben closed this pull request 2026-11-16 17:33:18 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
Matou/idss!2172
No description provided.