Admin that explains itself: a live top bar, your games, coverage, 24 h sites, history by window #111

Merged
cmoriarty merged 1 commit from feature/admin-explains-itself into develop 2026-11-08 00:25:57 -05:00
Owner

OpenSpec change: admin-explains-itself. Milestone 37, "Admin that explains itself". This builds #98, #104, #106, #107, #108, #109 and #110; each issue stays open for its check on the live page. Part of #103. Playing (#105) comes in its own batch with #90.

Why

The Admin page showed how busy the app was, not whether it was working (#103):

  • the checks chart had no way to tell a normal miss from trouble;
  • the sites count had no scale;
  • the uptime line had no time axis;
  • Problems was always empty;
  • History seemed to grow without end.

The Sites table also read as bans that weren't there. The app's own browser was challenged before the solver handed off, and that first step backed good sites off for up to 30 minutes (#98).

What changes

  • Site reads counted by their outcome (#98).
    • A page handed to the solver no longer backs its host off for the app browser's challenge.
    • The read is counted once, after the solver and the frames.
    • Frames on the page's own host pass the backoff.
    • The solver call waits 10 s past maxTimeout, so a challenge the solver can't clear counts against the host and drops the session.
    • Hosts that gate every page are read by the solver directly, for 6 hours.
  • Top bar (#104). One line replaces the status strip and the uptime graph:
    • the game playing and its site;
    • Ready for Emby, with its list behind the count;
    • the checks in one word;
    • the sites working and held back;
    • the server's uptime as a value;
    • Pause checks.
  • Your games (#106).
    • Tabs: Live, Soon, Later, Done.
    • A game without a stream comes first, in red, with how many links were tried, a countdown to its next check, Check now and a new Skip.
    • Problems is gone.
  • Now (#107).
    • Each task shows its progress, its time and the time left, what its last run produced, and its next run.
    • The queue shows as chips.
    • A Game lists row is new.
  • Stream checks (#108, coverage.py).
    • Coverage of the followed live games every 15 minutes, kept for 3 days.
    • Shown with a range switch and a covered badge.
  • Sites (#109, site_history.py).
    • Every site, grouped into game lists and player pages, with 48 half-hour cells over 24 h.
    • A held-back site shows a countdown and Try now.
  • History (#110).
    • The log keeps 3 days by age, answers a time window with a cursor and a day histogram, and gives each event its meaning.
    • The page loads one window at a time, picked on the day's chart, with events shown as chips.

New routes:

  • GET /api/coverage
  • GET /api/sites/history
  • GET /api/events/histogram
  • POST /api/readiness/{id}/skip
  • GET /api/events gains until, before and next_before.

New data files: coverage.jsonl and sites.json.

Tests (run locally; ci.yml is manual for now)

  • make test: 1077 passed, 1 skipped (16 s)
  • npm --prefix frontend test: 208 passed (16 files)
  • make e2e: passed (click-to-play, failure, recording, replay, channel)

Checked in a local preview against today's game list and three days of production events.

🤖 Generated with Claude Code

OpenSpec change: `admin-explains-itself`. Milestone 37, "Admin that explains itself". This builds #98, #104, #106, #107, #108, #109 and #110; each issue stays open for its check on the live page. Part of #103. Playing (#105) comes in its own batch with #90. ## Why The Admin page showed how busy the app was, not whether it was working (#103): - the checks chart had no way to tell a normal miss from trouble; - the sites count had no scale; - the uptime line had no time axis; - Problems was always empty; - History seemed to grow without end. The Sites table also read as bans that weren't there. The app's own browser was challenged before the solver handed off, and that first step backed good sites off for up to 30 minutes (#98). ## What changes - **Site reads counted by their outcome (#98).** - A page handed to the solver no longer backs its host off for the app browser's challenge. - The read is counted once, after the solver and the frames. - Frames on the page's own host pass the backoff. - The solver call waits 10 s past `maxTimeout`, so a challenge the solver can't clear counts against the host and drops the session. - Hosts that gate every page are read by the solver directly, for 6 hours. - **Top bar (#104).** One line replaces the status strip and the uptime graph: - the game playing and its site; - Ready for Emby, with its list behind the count; - the checks in one word; - the sites working and held back; - the server's uptime as a value; - Pause checks. - **Your games (#106).** - Tabs: Live, Soon, Later, Done. - A game without a stream comes first, in red, with how many links were tried, a countdown to its next check, Check now and a new **Skip**. - Problems is gone. - **Now (#107).** - Each task shows its progress, its time and the time left, what its last run produced, and its next run. - The queue shows as chips. - A Game lists row is new. - **Stream checks (#108, `coverage.py`).** - Coverage of the followed live games every 15 minutes, kept for 3 days. - Shown with a range switch and a covered badge. - **Sites (#109, `site_history.py`).** - Every site, grouped into game lists and player pages, with 48 half-hour cells over 24 h. - A held-back site shows a countdown and Try now. - **History (#110).** - The log keeps 3 days by age, answers a time window with a cursor and a day histogram, and gives each event its meaning. - The page loads one window at a time, picked on the day's chart, with events shown as chips. New routes: - `GET /api/coverage` - `GET /api/sites/history` - `GET /api/events/histogram` - `POST /api/readiness/{id}/skip` - `GET /api/events` gains `until`, `before` and `next_before`. New data files: `coverage.jsonl` and `sites.json`. ## Tests (run locally; ci.yml is manual for now) - `make test`: 1077 passed, 1 skipped (16 s) - `npm --prefix frontend test`: 208 passed (16 files) - `make e2e`: passed (click-to-play, failure, recording, replay, channel) Checked in a local preview against today's game list and three days of production events. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
From the 2026-11-07 review of the Admin page (#103) and the throttling
investigation (#98). The page showed how busy the app was, not whether
it worked: a checks chart with no meaning, a sites count with no scale,
an uptime line with no axis, a Problems section that was always empty,
a history that seemed endless, and a Sites table that read as bans that
were not there.

- Site reads by outcome (#98): the app browser's challenge on a page it
  hands to the solver no longer backs the host off; the read counts once,
  after the solver and the frames. A page the solver read with no stream
  holds nothing against the host. Frames on the page's own host pass the
  backoff. The solver call waits 10 s past maxTimeout, so a challenge the
  solver cannot clear counts against the host and drops the session
  instead of reading as an outage. A host that challenged the app's
  browser in the last 6 h is read by the solver directly.
- The top bar (#104): one line under the nav replaces the status strip
  and the uptime graph: the game playing and its site (or the next
  game), Ready for Emby with its list, the checks in one word (Normal,
  None found with minutes, Paused), sites working and held back, the
  server's uptime as a value with a restart mark, and Pause checks.
- Your games (#106): the followed games in Live, Soon, Later and Done
  tabs, a state pill and one detail each; a game without a stream comes
  first, in red, with its tries, a countdown to its next check, Check
  now and a new Skip (POST /api/readiness/{id}/skip). Problems is gone.
- Now (#107): each task's progress (link dots, a re-check pass's games),
  time running and an estimate of what is left, what its last run
  produced as chips, its next run (a clock or "on change"), the queue as
  chips, and a Game lists row from the hub's and thetvapp's reads.
- Stream checks (#108, coverage.py): every 15 minutes the followed live
  games with a stream, without one (named) and starting soon, and the
  checks run, kept 3 days in coverage.jsonl and served at /api/coverage;
  charted with a range switch, a covered badge and legend toggles.
- Sites (#109, site_history.py): each host's reads in half-hour buckets
  for 24 h (worked, played from, challenged, held, refused), kept in
  sites.json and served at /api/sites/history; every site listed in its
  group with 48 cells, a countdown and Try now when held back.
- History (#110): the event log keeps 3 days by age (capped at 20 000),
  answers a window with a cursor and a day histogram, and gives each
  event its meaning; swaps and recoveries carry the hosts they left and
  landed on. The page loads one window of a day at a time, picked on
  the day's chart, with events as chips and new ones offered as a count.

OpenSpec change admin-explains-itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cmoriarty merged commit a133e29f30 into develop 2026-11-08 00:25:57 -05:00
Sign in to join this conversation.
No reviewers
No labels
No project
No assignees
1 participant
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
cmoriarty/sports-breaker!111
No description provided.