Devices: show an Online label, for every device, apart from the playlist status #326

Closed
opened 2026-11-18 10:54:54 +00:00 by vivy · 2 comments
Owner

Product owner, 2026-11-18 (GRI-2051): "I can see that the scryglass client is offline under devices. But can you also add the online label?"

Today (dev 56dd99c)

DevicesScreen.tsx has one tag that mixes two things: the connection and the playlist rollout (describeRolloutStatus).

  • offline -> "Offline (last seen ...)".
  • A connected device shows "Up to date" or "Updating", never "Online".
  • The tag is shown only when the device has a playlist (rolloutLabel = assignment ? ... : null). A device with no playlist shows no connection state at all, online or offline.

Change

Two separate tags on each device card:

  1. Connection — on every device, with or without a playlist:
    • Online (green tag), or
    • Offline · last seen YYYY-MM-DD HH:MM (neutral/grey tag, not red: red is for dangerous actions, #230).
    • A device that never connected: Never connected.
  2. Playlist — only when the device has a playlist and is online: Up to date / Updating. When offline, no playlist tag (the connection tag already says it).

The state is live: it changes when the device connects or disconnects, with no page reload. It is right on first load too (the snapshot from #248).

Server

If the rollout-status snapshot/stream does not report devices without a playlist, add the connection state for every visible device (for example connected: bool in DeviceView, plus a connect/disconnect event on the stream). Campus scoping stays as it is.

Done when

  • A connected device with no playlist shows Online.
  • A connected device with a playlist shows Online and Up to date.
  • Unplugging the network of a device changes its tag to Offline · last seen ... without a reload; plugging it back changes it to Online.
  • Tests for the three cases above.
Product owner, 2026-11-18 (GRI-2051): *"I can see that the scryglass client is offline under devices. But can you also add the online label?"* ## Today (dev 56dd99c) `DevicesScreen.tsx` has one tag that mixes two things: the connection and the playlist rollout (`describeRolloutStatus`). - `offline` -> "Offline (last seen ...)". - A connected device shows "Up to date" or "Updating", never "Online". - The tag is shown only when the device has a playlist (`rolloutLabel = assignment ? ... : null`). A device with no playlist shows no connection state at all, online or offline. ## Change Two separate tags on each device card: 1. **Connection** — on **every** device, with or without a playlist: - **Online** (green tag), or - **Offline · last seen YYYY-MM-DD HH:MM** (neutral/grey tag, not red: red is for dangerous actions, #230). - A device that never connected: **Never connected**. 2. **Playlist** — only when the device has a playlist and is online: **Up to date** / **Updating**. When offline, no playlist tag (the connection tag already says it). The state is live: it changes when the device connects or disconnects, with no page reload. It is right on first load too (the snapshot from #248). ## Server If the rollout-status snapshot/stream does not report devices without a playlist, add the connection state for every visible device (for example `connected: bool` in `DeviceView`, plus a connect/disconnect event on the stream). Campus scoping stays as it is. ## Done when - A connected device with no playlist shows **Online**. - A connected device with a playlist shows **Online** and **Up to date**. - Unplugging the network of a device changes its tag to **Offline · last seen ...** without a reload; plugging it back changes it to **Online**. - Tests for the three cases above.
Member

Implemented in PR #327: splits the device tag into a Connection tag (Online / Offline · last seen ... / Never connected) on every approved device, and a Playlist tag (Up to date / Updating) shown only once the device is online and has a playlist.

The #248 snapshot already reports every visible device regardless of playlist assignment, so no server change was needed — this is frontend-only. Added tests for all three required cases plus the live transition (connect → disconnect → reconnect, no reload). Local frontend gates (prettier, oxlint, tsc, vitest, build) all pass; waiting on CI now.

Implemented in PR #327: splits the device tag into a Connection tag (Online / Offline · last seen ... / Never connected) on every approved device, and a Playlist tag (Up to date / Updating) shown only once the device is online and has a playlist. The #248 snapshot already reports every visible device regardless of playlist assignment, so no server change was needed — this is frontend-only. Added tests for all three required cases plus the live transition (connect → disconnect → reconnect, no reload). Local frontend gates (prettier, oxlint, tsc, vitest, build) all pass; waiting on CI now.
Author
Owner

Merged in #327 (dev 5b0dd77). Deploy to the Scryglass server follows with #320 and #322.

Merged in #327 (dev 5b0dd77). Deploy to the Scryglass server follows with #320 and #322.
vivy closed this issue 2026-11-18 11:42:15 +00:00
Sign in to join this conversation.
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#326
No description provided.