A new Admin: a page per playing game with its timeline, and system pages (#161) #162
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/admin-one-game-page"
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?
Closes #161.
Why
The Admin page had grown into a stack of cards, chips and gauges, and it did not answer the question it is opened for: the game on the TV skips or freezes, why? The redesign was settled on a canvas of mockups over three rounds, then filed as one ticket.
What changes
The pages
/admin/game/{id},/admin/system,/admin/sites,/admin/log,/admin/settings./adminopens the game being watched, or the Overview when none is.The server
backend/app/lanes.py): playlist waits, downloads, the buffer every 2 s, releases and errors, for up to 6 hours.GET /api/channels/{game_id}/lanes?window=&bins=serves it in bins with its counts.POST /api/channels/{game_id}/swapworks without a ready standby: the link is dropped and cooled, not rejected, and the channel recovers, with filler meanwhile.POST /api/channels/{game_id}/playplays any link of the game. A standby goes in as it is. Any other link is read and verified first, and one that does not play changes nothing (409 with the reason).summary: its state, tone and Problem, decided inadmin._summary.GET /api/eventstakes?game=.GET /api/sites/totals. Asites.jsonwritten before this change starts its totals from the per-site half hours it already holds.admin-one-game-page, with deltas foradmin-page,stream-supervisionandevent-log.Things to know
.admin, so a few of those rules stay.Testing
Lanes run locally, since CI runs by hand only:
make test: 1283 passed, 1 skipped.make e2e: passed.openspec validate admin-one-game-page --strict: valid.One
make testrun during the work failed with its output cut off, so the failing test is unknown. The 15 full runs after it were green.Every page was looked at in a browser, wide and at phone width, against a stand-in server replaying saved answers. The state, the Problem and the timeline came from the real server code fed a simulated night. The Watchlist and Games pages were compared with production and look the same.
Not yet run against a live game: Swap and Play have not been pressed on a real channel. The check after deploy is to open Admin during a game, compare the timeline with what the TV shows, and press Swap and Play once each.
🤖 Generated with Claude Code
The Admin page had grown into a stack of cards, chips and gauges, and it did not answer the question it is opened for: the game on the TV skips or freezes, why? The owner asked for a complete redesign and settled it on a canvas of mockups. Admin is now a sidebar and one page at a time, each with an address of its own. /admin opens the game being watched, or the Overview when none is. A game's page leads with the game's name, its state as a tag and a Problem field; the server decides the state and the Problem. Under them are a row of fields and five timeline rows on one time axis (Link, Source, Download, Buffer, Player) over 10 minutes, an hour or the whole game. Then come every link of the game with a Play action, and the game's log with each freeze and each stretch of filler. A page left open when its channel closes keeps what it last showed, marked Closed. The Overview holds the system's fields, the tasks as one table, what is not working with its actions, and five history rows (Games, Stream checks, Sites, Channels, App) over 3 hours, 24 hours or 3 days. Sites, Log and Settings are pages of their own. Every value on these pages is a labelled field or a tag. The old sections are deleted, with their styles. The server gains what the pages need: - A channel keeps its history while it is open (lanes.py): playlist waits, downloads, the buffer every 2 s, releases and errors, for up to 6 hours, served in bins by GET /api/channels/{game_id}/lanes. - Swap works without a ready standby: the link is dropped and the channel recovers, with filler meanwhile. A background channel nobody watches closes instead, as on any recovery with no standby. - POST /api/channels/{game_id}/play plays any link of the game. A standby goes in as it is; any other link is read and verified first, and one that does not play changes nothing. - The admin view carries each channel's state, tone and Problem. - GET /api/events takes a game filter. - Every site's reads are totalled per half hour and kept 3 days, at GET /api/sites/totals. The pages were looked at in a browser, wide and at phone width, against saved answers. They have not yet run against a live game. OpenSpec change: admin-one-game-page. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>