spec: Fleet-tab device dialog — identity, status summary, actions; edit name·kind·location (#2050, from #2046) #2058

Open
opened 2026-10-23 17:58:06 +00:00 by matou-build-agent · 0 comments

Parent

  • Design pass #2050 (unattended, from app report #2046 — Ben's direction
    2026-10-16/-19; ADR 0267, the operator's words stay data).
  • Design contract: DDR 0295 (docs/adr/0295-design-fleet-device-dialog.md,
    amends DDR 0202), flow docs/ux/flows/p9-device-dialog.mermaid, wireframes
    docs/ux/wireframes/p9-device-dialog/, research
    docs/research/2026-10-19-fleet-device-dialog.md.
  • Resolves the design half of #1432 (edit name/kind/location).

This spec is the child spec for the Fleet-tab device dialog feature. It is
no-triage (the contract, not an agent task) + landing-pr; the build tickets
cut from the slice map carry the work and are blocked by #2050.

Problem Statement

When an operator clicks a device on the Fleet tab, they want to see what the
device is and do something with it — in one place. Today the click opens the P9
telemetry drill-in in place, the facts and actions a device carries are scattered
across the Fleet row, the P9 surface and provisioning, and a device's own facts
(name, kind, location) cannot be edited at all after it joins (#1432).

Solution

A device click opens a device dialog (the house OcDialog, the device-add
dialog's shape — ADR 0237) as the first stop, carrying the device's identity,
a status summary, and its management actions. It is the entry, not a
replacement: Full detail opens the existing observing P9-S1 drill-in in place
(DDR 0202, kept). The dialog owns one act of its own — editing the device's name,
kind and location; everything else routes to its existing owner. Remove states
its consequence and hands off to provisioning's gated remove review.

User Stories

  1. As an operator, I want clicking a device on Fleet to open a dialog with its
    identity, status and actions, so that I don't have to hunt across surfaces.
  2. As an operator, I want the dialog to show the device's name, kind, location
    and role, so that I can confirm which device I'm looking at.
  3. As an operator, I want a status summary (health chip + CPU/MEM/DISK glance +
    sample/heartbeat age), so that I can see how it's doing at a glance.
  4. As an operator, I want Full detail to open the full observing surface, so
    that the deep telemetry record is one click away and unchanged.
  5. As an operator, I want to edit a device's name, kind and location from the
    dialog, so that a device named wrongly at mint or physically moved can be
    fixed (#1432).
  6. As an operator, I want a refused edit to keep the dialog open with the reason,
    so that I never lose my input to a silent failure.
  7. As an operator, I want Change this device and Set up this device to open
    provisioning, so that role/service changes stay in their standing surface.
  8. As an operator, I want to open/download this device's logs from the dialog.
  9. As an operator looking at a silent device, I want its readings shown as a
    dated last-known record and a door to monitoring's silence judgement, so that
    I'm never misled that an old number is live.
  10. As an operator looking at a not-set-up device, I want an honest "no telemetry
    yet" and a prominent Set up, so that empty reads as designed, not broken.
  11. As an operator, I want Remove device to state exactly what removal destroys
    and then hand me to provisioning's review, so that I never destroy data or an
    identity by a single click.
  12. As an operator on the gateway's dialog, I want Remove and the role change
    hidden, so that I can't try to move the front door by a click (DDR 0293).
  13. As an operator, I want the dialog to close back to the resting Fleet list,
    leaving nothing changed.

Acceptance criteria

P9-D1 — dialog default (a reporting device)

  • Given a reporting, set-up device, when its name is clicked on Fleet, then a
    dialog opens (URL stays /fleet) showing name, kind, location, role, the
    health chip, the CPU/MEM/DISK glance with the sample age, and the heartbeat age.
  • Given the dialog is open, when Full detail is chosen, then the existing
    P9-S1 observing drill-in opens in place (the device-detail-<id> intent),
    unchanged.
  • Given the dialog is open, when the × / scrim / Esc is used, then the dialog
    closes and nothing is changed (close-dialog).
  • Given a device whose disk reads ≥80%, then the summary names it (bad wears
    the warning tier, named in copy — the kit compiles no red, DDR 0202) and points
    to Full detail; the dialog offers no fix of its own.

P9-D1s — a silent / last-known device

  • Given a silent device, when its dialog opens, then the readings render as a
    dated last-known record (muted, "last known ·
  • Given a silent device, then the heartbeat and health chip are stated
    separately, and a door opens monitoring's silence classification (P5-S1x) —
    the dialog never re-judges the silence.

P9-D3 — a device not set up yet

  • Given a connected-not-set-up device, when its dialog opens, then the
    readings show — (never 0%), the absence is named, and the prominent act is
    Set up this device (→ P4-S1).
  • Given a not-set-up device, then Edit facts is available so name/kind/
    location can be fixed before set-up; location reads — until given.

P9-D4 — edit name · kind · location (#1432)

  • Given the dialog, when Edit facts is chosen, then an edit state opens with
    the name field, a kind picker (server / machine) and the location field
    pre-filled from the device.
  • Given an edit, when Save is pressed with valid values, then PATCH /api/v1/fleet/nodes/{id} is called and Overview, Fleet and the dialog all show
    the new value on the next read (one source, DDR 0155 §3); the dialog returns to
    its summary.
  • Given an edit, when Cancel is pressed, then nothing is written and the
    dialog returns to its summary.

P9-D5 — remove confirm (the one one-way door)

  • Given the dialog on a non-gateway device, when Remove device… is chosen,
    then a confirm state states the consequence (services come off, the node is
    dropped and its identity revoked — it must be set up again; data wiped if the
    box is reachable, else "removed here, not erased there").
  • Given the remove confirm, when the operator confirms, then the dialog hands
    off to provisioning's existing remove review (the ⚠ LOSES gate, the
    remove-device-<id> intent → FleetSurface.openRemove); the dialog itself
    calls no destructive seam.
  • Given the remove confirm, when Cancel is pressed, then nothing is removed.
  • Given the gateway device's dialog, then no Remove affordance and no role
    change is shown (DDR 0293).

P9-D6 — an action refused

  • Given an edit, when Save is refused by the seam (empty name, unknown
    kind, a name in use), then the dialog stays open with the edit intact, states
    the reason in plain language, marks the offending field, and writes nothing.

Actions that route out

  • Given the dialog, Change this device opens provisioning P4-S1
    (change-device-<id>); Open/Download logs open the node log scope
    (open-logs/download-logs); a service in the summary drills to monitoring
    P5-S3 (service-detail-<svc>).

Implementation Decisions

  • A new frame-owned shell/DeviceDialog.vue over OcDialog (ADR 0237's
    device-add dialog pattern), opened as the frame's dialog navigator state. The
    Fleet route that today opens the in-place drill-in instead opens the dialog;
    the dialog's Full detail fires the former device-detail-<id> intent.
  • The Fleet row's device-name data-action changes from device-detail-<id> to
    device-dialog-<id>.
  • One new seam: PATCH /api/v1/fleet/nodes/{id} with optional
    name / kind / location; HttpFleetClient.updateNode. The ledger + fleet
    store update; the fleet read reflects it on the next poll (DDR 0155 §3). A
    refusal (empty name / unknown kind / name in use) is rejected before any write.
  • Display adds no read — the dialog is handed the FleetRow from the
    existing GET /api/v1/fleet aggregate (name/kind/location/role/chip/telemetry).
  • Remove reuses the existing POST /api/v1/provision/devices/{id}/remove via the
    existing remove-device-<id> → FleetSurface.openRemove route; the dialog adds
    only the consequence screen and the routed entry, no new backend.
  • The gateway's dialog omits Remove and the role change (DDR 0293 refusal also
    holds server-side).

Testing Decisions

  • Test external behaviour at two existing seams (fewest, highest):
    1. Dashboard unit over the injected FleetSource / fleet client (as
      DeviceDetailSurface's tests do) — the dialog's states (D1/D1s/D3), the
      edit happy path + cancel, the refusal rendering (D6), and the remove
      consequence routing (D5 fires the intent, calls no destructive seam).
    2. Go control-API handler test over the in-memory fleet store/ledger (as
      the other provision.go/fleet.go handlers do) — PATCH /fleet/nodes/{id}
      write-through and its refusals.
  • Prior art: DeviceDetailSurface unit tests; the provision.go handler tests;
    the device-add dialog's OcDialog interaction tests.
  • A good test asserts the observable contract (the wireframe data-* IDs, the
    seam call, the rendered reason), not implementation detail.

Out of Scope

  • No new telemetry read; no history, per-process breakdown, threshold editing or
    temperature grading (DDR 0202 fence).
  • The dialog does not re-implement change or remove — both stay provisioning's
    gated flows.
  • No member-facing tier (operators only, DDR 0172).
  • Firing the destructive remove from the dialog (it only enters provisioning's
    gated review).

Further Notes

  • needs_human_decision: the remove entry point (the trust-surface call) and
    the landing-pr merge of the design PR — both ride #2050 / the build tickets.
  • /design-verify against the merged branch is the closing check that the
    wireframe data-field/data-action literals match the built components.
<!-- origin: app-report #2046 --> ## Parent - Design pass **#2050** (unattended, from app report **#2046** — Ben's direction 2026-10-16/-19; ADR 0267, the operator's words stay data). - Design contract: **DDR 0295** (`docs/adr/0295-design-fleet-device-dialog.md`, amends DDR 0202), flow `docs/ux/flows/p9-device-dialog.mermaid`, wireframes `docs/ux/wireframes/p9-device-dialog/`, research `docs/research/2026-10-19-fleet-device-dialog.md`. - Resolves the design half of **#1432** (edit name/kind/location). This spec is the child spec for the Fleet-tab device dialog feature. It is `no-triage` (the contract, not an agent task) + `landing-pr`; the build tickets cut from the slice map carry the work and are blocked by #2050. ## Problem Statement When an operator clicks a device on the Fleet tab, they want to see what the device is and do something with it — in one place. Today the click opens the P9 telemetry drill-in in place, the facts and actions a device carries are scattered across the Fleet row, the P9 surface and provisioning, and a device's own facts (name, kind, location) cannot be edited at all after it joins (#1432). ## Solution A device click opens a **device dialog** (the house `OcDialog`, the device-add dialog's shape — ADR 0237) as the first stop, carrying the device's **identity**, a **status summary**, and its **management actions**. It is the entry, not a replacement: *Full detail* opens the existing observing P9-S1 drill-in in place (DDR 0202, kept). The dialog owns one act of its own — editing the device's name, kind and location; everything else routes to its existing owner. Remove states its consequence and hands off to provisioning's gated remove review. ## User Stories 1. As an operator, I want clicking a device on Fleet to open a dialog with its identity, status and actions, so that I don't have to hunt across surfaces. 2. As an operator, I want the dialog to show the device's name, kind, location and role, so that I can confirm which device I'm looking at. 3. As an operator, I want a status summary (health chip + CPU/MEM/DISK glance + sample/heartbeat age), so that I can see how it's doing at a glance. 4. As an operator, I want *Full detail* to open the full observing surface, so that the deep telemetry record is one click away and unchanged. 5. As an operator, I want to edit a device's name, kind and location from the dialog, so that a device named wrongly at mint or physically moved can be fixed (#1432). 6. As an operator, I want a refused edit to keep the dialog open with the reason, so that I never lose my input to a silent failure. 7. As an operator, I want *Change this device* and *Set up this device* to open provisioning, so that role/service changes stay in their standing surface. 8. As an operator, I want to open/download this device's logs from the dialog. 9. As an operator looking at a silent device, I want its readings shown as a dated last-known record and a door to monitoring's silence judgement, so that I'm never misled that an old number is live. 10. As an operator looking at a not-set-up device, I want an honest "no telemetry yet" and a prominent *Set up*, so that empty reads as designed, not broken. 11. As an operator, I want *Remove device* to state exactly what removal destroys and then hand me to provisioning's review, so that I never destroy data or an identity by a single click. 12. As an operator on the gateway's dialog, I want Remove and the role change hidden, so that I can't try to move the front door by a click (DDR 0293). 13. As an operator, I want the dialog to close back to the resting Fleet list, leaving nothing changed. ## Acceptance criteria ### P9-D1 — dialog default (a reporting device) - [ ] Given a reporting, set-up device, when its name is clicked on Fleet, then a dialog opens (URL stays `/fleet`) showing name, kind, location, role, the health chip, the CPU/MEM/DISK glance with the sample age, and the heartbeat age. - [ ] Given the dialog is open, when *Full detail* is chosen, then the existing P9-S1 observing drill-in opens in place (the `device-detail-<id>` intent), unchanged. - [ ] Given the dialog is open, when the × / scrim / Esc is used, then the dialog closes and nothing is changed (`close-dialog`). - [ ] Given a device whose disk reads ≥80%, then the summary names it (bad wears the warning tier, named in copy — the kit compiles no red, DDR 0202) and points to Full detail; the dialog offers no fix of its own. ### P9-D1s — a silent / last-known device - [ ] Given a silent device, when its dialog opens, then the readings render as a dated last-known record (muted, "last known · <time>, before the silence"), never as live, with no stale-green. - [ ] Given a silent device, then the heartbeat and health chip are stated separately, and a door opens monitoring's silence classification (P5-S1x) — the dialog never re-judges the silence. ### P9-D3 — a device not set up yet - [ ] Given a connected-not-set-up device, when its dialog opens, then the readings show `—` (never 0%), the absence is named, and the prominent act is *Set up this device* (→ P4-S1). - [ ] Given a not-set-up device, then *Edit facts* is available so name/kind/ location can be fixed before set-up; location reads `—` until given. ### P9-D4 — edit name · kind · location (#1432) - [ ] Given the dialog, when *Edit facts* is chosen, then an edit state opens with the name field, a kind picker (server / machine) and the location field pre-filled from the device. - [ ] Given an edit, when *Save* is pressed with valid values, then `PATCH /api/v1/fleet/nodes/{id}` is called and Overview, Fleet and the dialog all show the new value on the next read (one source, DDR 0155 §3); the dialog returns to its summary. - [ ] Given an edit, when *Cancel* is pressed, then nothing is written and the dialog returns to its summary. ### P9-D5 — remove confirm (the one one-way door) - [ ] Given the dialog on a non-gateway device, when *Remove device…* is chosen, then a confirm state states the consequence (services come off, the node is dropped and its identity revoked — it must be set up again; data wiped if the box is reachable, else "removed here, not erased there"). - [ ] Given the remove confirm, when the operator confirms, then the dialog hands off to provisioning's existing remove review (the ⚠ LOSES gate, the `remove-device-<id>` intent → `FleetSurface.openRemove`); the dialog itself calls no destructive seam. - [ ] Given the remove confirm, when *Cancel* is pressed, then nothing is removed. - [ ] Given the gateway device's dialog, then no Remove affordance and no role change is shown (DDR 0293). ### P9-D6 — an action refused - [ ] Given an edit, when *Save* is refused by the seam (empty name, unknown kind, a name in use), then the dialog stays open with the edit intact, states the reason in plain language, marks the offending field, and writes nothing. ### Actions that route out - [ ] Given the dialog, *Change this device* opens provisioning P4-S1 (`change-device-<id>`); *Open/Download logs* open the node log scope (`open-logs`/`download-logs`); a service in the summary drills to monitoring P5-S3 (`service-detail-<svc>`). ## Implementation Decisions - A new frame-owned `shell/DeviceDialog.vue` over `OcDialog` (ADR 0237's device-add dialog pattern), opened as the frame's dialog navigator state. The Fleet route that today opens the in-place drill-in instead opens the dialog; the dialog's *Full detail* fires the former `device-detail-<id>` intent. - The Fleet row's device-name `data-action` changes from `device-detail-<id>` to `device-dialog-<id>`. - **One new seam:** `PATCH /api/v1/fleet/nodes/{id}` with optional `name` / `kind` / `location`; `HttpFleetClient.updateNode`. The ledger + fleet store update; the fleet read reflects it on the next poll (DDR 0155 §3). A refusal (empty name / unknown kind / name in use) is rejected before any write. - **Display adds no read** — the dialog is handed the `FleetRow` from the existing `GET /api/v1/fleet` aggregate (name/kind/location/role/chip/telemetry). - Remove reuses the existing `POST /api/v1/provision/devices/{id}/remove` via the existing `remove-device-<id>` → `FleetSurface.openRemove` route; the dialog adds only the consequence screen and the routed entry, no new backend. - The gateway's dialog omits Remove and the role change (DDR 0293 refusal also holds server-side). ## Testing Decisions - Test external behaviour at two existing seams (fewest, highest): 1. **Dashboard unit** over the injected `FleetSource` / fleet client (as `DeviceDetailSurface`'s tests do) — the dialog's states (D1/D1s/D3), the edit happy path + cancel, the refusal rendering (D6), and the remove consequence routing (D5 fires the intent, calls no destructive seam). 2. **Go control-API handler test** over the in-memory fleet store/ledger (as the other `provision.go`/`fleet.go` handlers do) — `PATCH /fleet/nodes/{id}` write-through and its refusals. - Prior art: `DeviceDetailSurface` unit tests; the `provision.go` handler tests; the device-add dialog's `OcDialog` interaction tests. - A good test asserts the observable contract (the wireframe `data-*` IDs, the seam call, the rendered reason), not implementation detail. ## Out of Scope - No new telemetry read; no history, per-process breakdown, threshold editing or temperature grading (DDR 0202 fence). - The dialog does not re-implement change or remove — both stay provisioning's gated flows. - No member-facing tier (operators only, DDR 0172). - Firing the destructive remove from the dialog (it only enters provisioning's gated review). ## Further Notes - `needs_human_decision`: the **remove entry point** (the trust-surface call) and the **landing-pr merge** of the design PR — both ride #2050 / the build tickets. - `/design-verify` against the merged branch is the closing check that the wireframe `data-field`/`data-action` literals match the built components.
Sign in to join this conversation.
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
Matou/idss#2058
No description provided.