Repository navigation
feat: boxes in the Screens list — status and remote care (MAD-811) - #73
Merged
Merged
Conversation
- A paired display that is a Syncphony box sends its bridge's /v1/info up
its room socket ("box.status"): version, name, temperature and
throttling, uptime, the last nightly update. The server keeps the
latest per display in memory and tracks whether each display is
connected; GET /rooms/{id}/displays now has `online` and `box`.
- displays.updated tells the room when a screen comes, goes, or its box
reports something the list shows.
- POST .../displays/{id}/reload and .../restart, for whoever may manage
the screen (owner, pairer, admin). The command goes out on that
display's own topic only; /tv passes it to boxd (/v1/reload,
/v1/reboot) or reloads itself. Restart is box-only.
- The big screen dialog shows "Syncphony Box 1.3 · online · 52 °C",
warnings (running hot / throttled, update failed, box software older
than MinBoxVersion 0.2.0), Reload and a tap-twice Restart box, and
links to the new docs/box.md.
- ADR 0016 records the socket report, remote care and the minimum box
version. OpenAPI spec updated and regenerated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Boxes show up as boxes in the room's Screens list, and the room owner can look after one from their phone (ADR 0016, stage 4).
/v1/infoup its room socket asbox.status: version, name, temperature and throttling, uptime, last nightly update. The server keeps the latest per display in memory (no migration), rate-limited to one report per 5 s and capped at 8 KiB. It also tracks whether each display is connected.GET /rooms/{id}/displaysgainsonlineandbox(BoxStatus).displays.updatedon the room topic when a screen connects or goes away, or its box reports a change the list shows. An open Screens list refetches, and polls every 30 s while open.POST /rooms/{roomId}/displays/{displayId}/reloadand.../restartuse the existing manage permission (owner, pairer, admin). The command goes out on the display's own topic (display:<id>), so only that display gets it./tvhands it to boxd (/v1/reload,/v1/reboot), and a plain screen, or a box whose boxd doesn't answer, reloads the page itself. Restart is box-only (not_a_box); both need the display connected (display_offline).docs/box.md("Make a dedicated box for this TV").MinBoxVersion = "0.2.0"inserver/internal/httpapi/boxes.go, recorded in ADR 0016. A dev build's version never warns.Box side: madeofpendletonwool/syncphony-box (
feat/releases-and-updates). It addsuptimeSecondsandupdateto/v1/info. Older boxes still work; they just report fewer fields.Test plan
go test -race ./internal/httpapi/ ./internal/realtime/, fullgo test ./..., golangci-lintnot_a_box; an offline screen getsdisplay_offline; version comparison and report rate limits🤖 Generated with Claude Code