GRI-2214: show an Online label for every device, apart from the playlist status #327

Merged
vivy merged 2 commits from fix/GRI-2214-devices-online-label into dev 2026-11-18 11:42:05 +00:00
Member

Forge issue: #326

Summary

  • Splits the device card's one mixed tag into two independent tags on every approved device: Connection (Online / Offline · last seen ... / Never connected) and Playlist (Up to date / Updating, shown only once there is a playlist and the device is online).
  • Connection state is derived from the existing rollout-status stream: any non-offline status means connected, offline (or no event yet) means not — the server's #248 snapshot already reports every visible device, with or without a playlist, so no server change was needed.
  • A live disconnect (a status transition to offline for a device we'd already seen online this session) stamps a client-side "now" as the last-seen time, since the stream carries no timestamp per event; the initial offline snapshot still uses the device's own lastSeenAt from the server.
  • Added a local .gx-tag--online style (green) for the connection tag; offline reuses the existing neutral .gx-tag — red is reserved for dangerous actions (#230).

Test plan

  • DevicesScreen.test.tsx: updated the existing offline-format assertion to the new "Offline · last seen ..." text, and added a GRI-2214/#326 describe block covering: Never connected (no playlist, no event), Online (no playlist), Online + Up to date (with playlist), and the live Online → Offline · last seen → Online transition with no playlist tag while offline.
  • scripts/local-gates.sh --frontend-only — prettier, oxlint, tsc, vitest (211 tests, including the new ones), and the build all pass.
Forge issue: https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/issues/326 ## Summary - Splits the device card's one mixed tag into two independent tags on every approved device: **Connection** (Online / Offline · last seen ... / Never connected) and **Playlist** (Up to date / Updating, shown only once there is a playlist and the device is online). - Connection state is derived from the existing rollout-status stream: any non-`offline` status means connected, `offline` (or no event yet) means not — the server's #248 snapshot already reports every visible device, with or without a playlist, so no server change was needed. - A live disconnect (a status transition to `offline` for a device we'd already seen online this session) stamps a client-side "now" as the last-seen time, since the stream carries no timestamp per event; the initial `offline` snapshot still uses the device's own `lastSeenAt` from the server. - Added a local `.gx-tag--online` style (green) for the connection tag; offline reuses the existing neutral `.gx-tag` — red is reserved for dangerous actions (#230). ## Test plan - [x] `DevicesScreen.test.tsx`: updated the existing offline-format assertion to the new "Offline · last seen ..." text, and added a `GRI-2214/#326` describe block covering: Never connected (no playlist, no event), Online (no playlist), Online + Up to date (with playlist), and the live Online → Offline · last seen → Online transition with no playlist tag while offline. - [x] `scripts/local-gates.sh --frontend-only` — prettier, oxlint, tsc, vitest (211 tests, including the new ones), and the build all pass.
GRI-2214: show an Online/Offline connection label for every device
Some checks failed
CI / cargo fmt (pull_request) Successful in 5s
CI / the pre-push hook (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 13s
CI / cargo deny (pull_request) Successful in 45s
CI / cargo deny advisories (pull_request) Successful in 45s
CI / repository boundary (pull_request) Successful in 4s
CI / cargo clippy (pull_request) Successful in 1m25s
CI / frontend-web (pull_request) Successful in 1m13s
CI / cargo test (pull_request) Successful in 4m32s
CI / CI (pull_request) Has been cancelled
CI / Notify gate failed (pull_request) Has been cancelled
afd9ce28c8
Split the device card's one mixed tag into two: a connection tag
(Online, Offline · last seen ..., or Never connected) on every device,
and a playlist tag (Up to date / Updating) only once there is a
playlist and the device is online. The connection state updates live
from the existing rollout-status stream, with no reload.
Merge remote-tracking branch 'origin/dev' into fix/GRI-2214-devices-online-label
All checks were successful
CI / the pre-push hook (pull_request) Successful in 8s
CI / cargo fmt (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 16s
CI / cargo deny (pull_request) Successful in 25s
CI / cargo clippy (pull_request) Successful in 1m24s
CI / cargo deny advisories (pull_request) Successful in 22s
CI / repository boundary (pull_request) Successful in 4s
CI / frontend-web (pull_request) Successful in 1m14s
CI / cargo test (pull_request) Successful in 4m23s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
f4fcb1b19f
vivy approved these changes 2026-11-18 11:21:42 +00:00
vivy left a comment

Reviewed: connection tag on every device (Online / Offline · last seen / Never connected), playlist tag only when assigned and online, grey offline, live transitions tested. Merged dev in (f4fcb1b, clean auto-merge of index.css after #321). Merge on green.

Reviewed: connection tag on every device (Online / Offline · last seen / Never connected), playlist tag only when assigned and online, grey offline, live transitions tested. Merged dev in (f4fcb1b, clean auto-merge of index.css after #321). Merge on green.
Author
Member

CI is green on f4fcb1b1 — all gates (clippy, deny, fmt, cargo test, frontend-web, repo boundary, pre-push hook) passed. CTO review is already APPROVED with "Merge on green". Ready to merge into dev.

CI is green on f4fcb1b1 — all gates (clippy, deny, fmt, cargo test, frontend-web, repo boundary, pre-push hook) passed. CTO review is already APPROVED with "Merge on green". Ready to merge into dev.
vivy merged commit 5b0dd7749f into dev 2026-11-18 11:42:05 +00:00
vivy deleted branch fix/GRI-2214-devices-online-label 2026-11-18 11:42:06 +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!327
No description provided.