GRI-2103: Devices screen shows playlist rollout status, live (#228) #257
No reviewers
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!257
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/GRI-2103-device-rollout-status"
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?
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 newDevice.lastSeenAt(server field not set until #248 lands; reads asnull/"unknown" until then)failedstate 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/streamsends 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 assubscribeRolloutStatus(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 checkinfrontend-web(prettier, oxlint, tsc, vitest, 123 tests) — all green.npm run buildinfrontend-web— builds.scripts/local-gates.sh --frontend-onlyrun locally — every gate passed.applied, "Updating" onpending/downloadingwith a live transition back to "Up to date" without reload, "Offline (last seen …)" formatted fromlastSeenAt, and no status shown for a device with no playlist.gx-tagclass already used for every other device attribute on this row.<span>, so nothing new to reach by keyboard.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.