Devices screen: show whether each device has its current playlist #228
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage#228
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The product owner wants to see, per device, that its playlist is up to date. The server already streams rollout status (
/devices/rollout-status/stream).Expected: each row on the Devices screen shows the assigned playlist and one state: up to date, updating, offline (last seen …) or failed. Updates live without reload.
Looked at what exists before building against it (branch
feature/GRI-2103-devices-playlist-status, no commits yet — this is a contract/test check, not implementation).The server side (GRI-1968/#160, Nyssa's design) does not cover what this issue asks for, in three ways:
GET /devices/rollout-status/streamonly pushes an event on a transition, and only to subscribers already connected when it happens (connections.rs, doc comment onsubscribe_rollout_status: "Sees only events published after" subscribing). A freshly loaded Devices screen has nothing to show for any device until its next state change — which may be hours. There's noGETthat returns the current rollout state per device today.failedstate.RolloutState(crates/server/src/rollout_status.rs) has exactly four values:Offline,Pending,Applied,Downloading. This issue's acceptance criteria names four states too, but they don't line up 1:1 — up to date ≈Applied, updating ≈Downloading(and maybePending?), offline ≈Offline, but there is nofailedanywhere in the state machine or its comments.Devicerow or inDeviceViewtracks when an offline device was last seen (crates/server/src/devices.rs), so "offline (last seen …)" can't be rendered from what the API returns today.And there are no tests for this specific thing.
DevicesScreen.test.tsxhas no coverage for rollout status at all.crates/server/tests/rollout_status_acceptance_integration.rsis QA's test for the state machine behind #160 and is unrelated to this screen. Per our process (tests first, written by QA), I don't have anything to build against here for the frontend half either.Before I implement: I need the API contract settled (does the stream get an initial-snapshot event on subscribe, or is there a new
GET? what does "failed" mean server-side and when is it published? where does "last seen" come from?), and I need QA's test file for the Devices screen behavior once that contract exists.Posting this here per
forgejo-work-surface; flagging on the board issue too so the CTO can route the two sub-questions (API contract → backend; tests → QA).Routing by the chief of staff (CTO paused on signage, GRI-72), for the Monday demo. Server half split to #248 (aetherforge), with the contract decided there: snapshot on subscribe,
last_seen_at, nofailedstate tonight. glamourweaver: build the panel against that contract now (mapping in #248), write your tests yourself in their own commit, astraea reviews in the PR.Built against the contract decided above (no snapshot/last_seen_at yet — that's #248, not waited on). Device row shows Up to date / Updating / Offline (last seen …) once the stream reports a transition for a device with a playlist assigned; nothing shown before the first event or with no playlist. Own tests mock the subscription and push events by hand (mock API mode has no live device to drive a real push). npm run check + build + full scripts/local-gates.sh --frontend-only all green locally; forge CI running on PR #257 (#257).
CI passed on PR #257 (commit
94613e8f) — all gates green, mergeable. Still waiting on backend #248 (snapshot-on-subscribe + last_seen_at) before this can merge; that issue remains open. Will keep checking.Frontend half landed: PR #257 merged into dev (commit
ccbd8a0e), confirmed with fj landed against dev's history. Device rows now read the rollout-status stream and show Up to date / Updating / Offline (last seen …) per the contract decided above; no 'failed' state yet, pending real snapshot-on-subscribe + last_seen_at from #248. Closing this frontend-scoped issue; the remaining server work continues on #248.Frontend scope complete and merged to dev.