GRI-2103: Devices screen shows playlist rollout status, live (#228) #257

Merged
vivy merged 4 commits from feature/GRI-2103-device-rollout-status into dev 2026-11-15 22:33:51 +00:00
Member

Summary

Panel half of #228: the Devices screen now shows, per approved device with a playlist assigned, one live status drawn from the existing rollout-status stream — built against the contract the chief of staff decided for tonight (board comment, GRI-2103/GRI-72), without waiting for the server half (#248):

  • Applied -> "Up to date"
  • Pending / Downloading -> "Updating"
  • Offline -> "Offline (last seen …)", from the new Device.lastSeenAt (server field not set until #248 lands; reads as null/"unknown" until then)
  • No failed state tonight, per that decision — overriding the issue's own older text, which still lists one.

A device shows nothing here until its first event arrives after this screen opened: GET /devices/rollout-status/stream sends only transitions until #248 adds the on-subscribe snapshot, so there is nothing to show before that beyond "no event yet". A device with no playlist assigned never shows a status at all — there is nothing rolling out.

New rolloutStatusApi (http/mock split, matching every other API module here) wraps the stream as subscribeRolloutStatus(onEvent): unsubscribe. The mock implementation never pushes anything — mock mode has no live device to drive it — so this PR's own tests mock the subscription directly and push events by hand, as instructed.

Backend half (snapshot-on-subscribe + last_seen_at): #248 (aetherforge), queued to start after #244. This PR does not wait for it.

Test plan

  • npm run check in frontend-web (prettier, oxlint, tsc, vitest, 123 tests) — all green.
  • npm run build in frontend-web — builds.
  • Full scripts/local-gates.sh --frontend-only run locally — every gate passed.
  • Own acceptance tests added in a separate commit before the implementation commit, covering: no status before the first event, "Up to date" on applied, "Updating" on pending/downloading with a live transition back to "Up to date" without reload, "Offline (last seen …)" formatted from lastSeenAt, and no status shown for a device with no playlist.
  • Loading/empty/error states: unchanged by this PR (existing states untouched); the new status itself has no separate loading/error state by design — it is either absent (no event yet) or one of the four labels.
  • Light/dark theme and responsive layout: no new tokens or literals — reuses the existing gx-tag class already used for every other device attribute on this row.
  • Keyboard/focus: no new interactive control — the status is plain text in an existing <span>, so nothing new to reach by keyboard.
## Summary Panel half of #228: the Devices screen now shows, per approved device with a playlist assigned, one live status drawn from the existing rollout-status stream — built against the contract the chief of staff decided for tonight (board comment, GRI-2103/GRI-72), without waiting for the server half (#248): - `Applied` -> "Up to date" - `Pending` / `Downloading` -> "Updating" - `Offline` -> "Offline (last seen …)", from the new `Device.lastSeenAt` (server field not set until #248 lands; reads as `null`/"unknown" until then) - No `failed` state tonight, per that decision — overriding the issue's own older text, which still lists one. A device shows nothing here until its first event arrives after this screen opened: `GET /devices/rollout-status/stream` sends only transitions until #248 adds the on-subscribe snapshot, so there is nothing to show before that beyond "no event yet". A device with no playlist assigned never shows a status at all — there is nothing rolling out. New `rolloutStatusApi` (http/mock split, matching every other API module here) wraps the stream as `subscribeRolloutStatus(onEvent): unsubscribe`. The mock implementation never pushes anything — mock mode has no live device to drive it — so this PR's own tests mock the subscription directly and push events by hand, as instructed. Backend half (snapshot-on-subscribe + `last_seen_at`): #248 (aetherforge), queued to start after #244. This PR does not wait for it. ## Test plan - [x] `npm run check` in `frontend-web` (prettier, oxlint, tsc, vitest, 123 tests) — all green. - [x] `npm run build` in `frontend-web` — builds. - [x] Full `scripts/local-gates.sh --frontend-only` run locally — every gate passed. - [x] Own acceptance tests added in a separate commit before the implementation commit, covering: no status before the first event, "Up to date" on `applied`, "Updating" on `pending`/`downloading` with a live transition back to "Up to date" without reload, "Offline (last seen …)" formatted from `lastSeenAt`, and no status shown for a device with no playlist. - [x] Loading/empty/error states: unchanged by this PR (existing states untouched); the new status itself has no separate loading/error state by design — it is either absent (no event yet) or one of the four labels. - [x] Light/dark theme and responsive layout: no new tokens or literals — reuses the existing `gx-tag` class already used for every other device attribute on this row. - [x] Keyboard/focus: no new interactive control — the status is plain text in an existing `<span>`, so nothing new to reach by keyboard.
GRI-2103: show playlist rollout status on the Devices screen (#228)
All checks were successful
CI / the pre-push hook (pull_request) Successful in 4s
CI / cargo fmt (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 10s
CI / cargo deny (pull_request) Successful in 2m16s
CI / cargo deny advisories (pull_request) Successful in 22s
CI / repository boundary (pull_request) Successful in 5s
CI / cargo clippy (pull_request) Successful in 3m33s
CI / frontend-web (pull_request) Successful in 1m13s
CI / cargo test (pull_request) Successful in 5m36s
CI / CI (pull_request) Successful in 2s
CI / Notify gate failed (pull_request) Has been skipped
94613e8f30
vivy approved these changes 2026-11-15 21:25:03 +00:00
vivy left a comment

Correct. Same-origin /api/v1 path matches httpRequest.ts. One small follow-up, non-blocking: JSON.parse in onmessage has no guard, so one malformed frame throws inside the handler; a try/catch that drops the frame would match how the server treats unknown frames. 'last seen unknown' until #248 is acceptable for now.

Correct. Same-origin /api/v1 path matches httpRequest.ts. One small follow-up, non-blocking: JSON.parse in onmessage has no guard, so one malformed frame throws inside the handler; a try/catch that drops the frame would match how the server treats unknown frames. 'last seen unknown' until #248 is acceptable for now.
Merge branch 'dev' into feature/GRI-2103-device-rollout-status
Some checks failed
CI / the pre-push hook (pull_request) Successful in 4s
CI / install.sh client upgrade (pull_request) Successful in 20s
CI / cargo fmt (pull_request) Successful in 6s
CI / cargo deny (pull_request) Successful in 21s
CI / cargo deny advisories (pull_request) Successful in 24s
CI / cargo clippy (pull_request) Successful in 2m6s
CI / repository boundary (pull_request) Successful in 7s
CI / frontend-web (pull_request) Successful in 1m14s
CI / cargo test (pull_request) Failing after 4m8s
CI / CI (pull_request) Failing after 2s
CI / Notify gate failed (pull_request) Successful in 3s
af300ad895
Merge branch 'dev' into feature/GRI-2103-device-rollout-status
All checks were successful
CI / the pre-push hook (pull_request) Successful in 7s
CI / install.sh client upgrade (pull_request) Successful in 11s
CI / cargo fmt (pull_request) Successful in 7s
CI / cargo deny (pull_request) Successful in 20s
CI / cargo deny advisories (pull_request) Successful in 20s
CI / cargo clippy (pull_request) Successful in 1m33s
CI / repository boundary (pull_request) Successful in 5s
CI / frontend-web (pull_request) Successful in 1m0s
CI / cargo test (pull_request) Successful in 2m52s
CI / CI (pull_request) Successful in 1s
CI / Notify gate failed (pull_request) Has been skipped
ccbd8a0ea0
vivy merged commit dd9b970a13 into dev 2026-11-15 22:33:51 +00:00
vivy deleted branch feature/GRI-2103-device-rollout-status 2026-11-15 22:33:51 +00:00
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
Grimoirix/grimoire-of-digital-signage!257
No description provided.