shell: device-log-scope-and-pills — HD logs scoped by device id; pills show real state (#28) #123

Closed
opened 2026-07-26 19:41:18 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #22 (shell). Follow-up filed by the 2026-07-26 review sweep (code-review Standards/Spec + design-verify Design axes over 6596977..9e946b7). Two honesty defects on the device-detail (HD) screen:

  1. Log scope wrong key — "logs scoped to this device" emits scope: {device: seat.community.name} — a community name, not a device id — which would filter out every entry; the test enshrines the wrong key.
  2. Service pills hard-coded — HD service pills hard-code oc-pill--ok, so a degraded service still shows healthy.

Acceptance criteria

  • Given device detail, when I open its logs, then the scope carries the device's id and the filtered entries are that device's — test asserts the key against seam data, not the fixture's own emission.
  • Given a degraded/faulted service on a device, then its pill renders that state (never hard-coded ok).

Blocked by

None.

Task manifest

task: shell:device-log-scope-and-pills
implements_flow: shell
implements_edge: "HD → logs (device scope); HD service pill state"
wireframe: docs/ux/wireframes/shell/shell-hd-device-home.html
interface: "scope-key fix + real pill state on the shell device-detail screen"
seam: "component tests: scope key = device id; pill renders seam-provided state"
acceptance: "#28's HD clauses hold (see Acceptance criteria above)"
depends_on: []
out_of_scope: [log viewer itself, chrome slots (ruling pending elsewhere)]
needs_human_decision: []
## Parent Feature spec: #22 (shell). Follow-up filed by the 2026-07-26 review sweep (code-review Standards/Spec + design-verify Design axes over `6596977..9e946b7`). Two honesty defects on the device-detail (HD) screen: 1. **Log scope wrong key** — "logs scoped to this device" emits `scope: {device: seat.community.name}` — a community name, not a device id — which would filter out every entry; the test enshrines the wrong key. 2. **Service pills hard-coded** — HD service pills hard-code `oc-pill--ok`, so a degraded service still shows healthy. ## Acceptance criteria - [ ] Given device detail, when I open its logs, then the scope carries the device's id and the filtered entries are that device's — test asserts the key against seam data, not the fixture's own emission. - [ ] Given a degraded/faulted service on a device, then its pill renders that state (never hard-coded ok). ## Blocked by None. ## Task manifest ```yaml task: shell:device-log-scope-and-pills implements_flow: shell implements_edge: "HD → logs (device scope); HD service pill state" wireframe: docs/ux/wireframes/shell/shell-hd-device-home.html interface: "scope-key fix + real pill state on the shell device-detail screen" seam: "component tests: scope key = device id; pill renders seam-provided state" acceptance: "#28's HD clauses hold (see Acceptance criteria above)" depends_on: [] out_of_scope: [log viewer itself, chrome slots (ruling pending elsewhere)] needs_human_decision: [] ```
Author
Owner

Done in 5969b92 (on origin/main).

1. Log scope key — the HD Logs drill-in emitted scope: {device: seat.community.name} (a community name, not a node id); since A5 keys entries on LogEntry.device, that filtered out every entry. DeviceSeat now carries its own id (the node id the operation log keys on) and the drill-in scopes by seat.id. The test asserts the scope key against the seam data (seat.id, distinct from the community name), not the fixture's own emission.

2. Service pills — pills hard-coded oc-pill--ok. New serviceRowTone(state) in app/src/lib/seat.ts maps the seam-provided state to a tone (healthy/ok→ok, degraded→warn, faulted/failed/down→bad, unknown→muted); DeviceHomeScreen.vue renders that class with data-status set to the real state, so a degraded service never reads healthy.

Evidence: app/tests/unit/deviceHome.test.ts (scope-key + pill-state assertions), restingRoot.test.ts; full app suite green (192 tests), vue-tsc build clean. Both acceptance clauses hold.

Done in `5969b92` (on `origin/main`). **1. Log scope key** — the HD Logs drill-in emitted `scope: {device: seat.community.name}` (a community name, not a node id); since A5 keys entries on `LogEntry.device`, that filtered out every entry. `DeviceSeat` now carries its own `id` (the node id the operation log keys on) and the drill-in scopes by `seat.id`. The test asserts the scope key against the seam data (`seat.id`, distinct from the community name), not the fixture's own emission. **2. Service pills** — pills hard-coded `oc-pill--ok`. New `serviceRowTone(state)` in `app/src/lib/seat.ts` maps the seam-provided state to a tone (healthy/ok→ok, degraded→warn, faulted/failed/down→bad, unknown→muted); `DeviceHomeScreen.vue` renders that class with `data-status` set to the real state, so a degraded service never reads healthy. Evidence: `app/tests/unit/deviceHome.test.ts` (scope-key + pill-state assertions), `restingRoot.test.ts`; full app suite green (192 tests), `vue-tsc` build clean. Both acceptance clauses hold.
ben closed this issue 2026-07-26 19:53:36 +00:00
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#123
No description provided.