Admin: the Playing card's wait strip keeps one scale, with a y-axis #114

Closed
opened 2026-11-08 10:37:23 -05:00 by cmoriarty · 3 comments
Owner

On the Playing card (#105), the strip of the source's waits for a new segment has no fixed scale and no y-axis. The owner likes the live view but called the moving proportions a bug.

What happens

  • The scale moves.
    • The chart's top is the larger of 1.25× the late line and the longest wait on show (waitBars and lateLine in frontend/src/admin.ts).
    • With a 4 s late line, any wait past 5 s makes the whole chart shrink to fit it: the dashed line drops and every bar gets shorter. That includes the open wait still growing at the right edge.
    • When that wait leaves the window, the chart grows back.
    • Seen live on 2026-11-08 on C Palace vs. Liverpool. In the first screenshot the open wait (blue, far right) has pushed the line down. The second is the same card 23 s later, after that wait closed: the line is back up and the bars are taller.
  • No y-axis. Only the dashed line carries a value ("4 s"), so a bar's height says nothing until you hover over it.
  • The help text over-promises.
    • The info icon and the line's title both say that past the dashed line the stream has failed and the standby takes over.
    • In the second screenshot two waits went past the line (4.3 s) and nothing swapped.

Before: the open wait has pushed the line down

23 s later: the line is back up

The idea

  1. One scale.
    • The chart's top is fixed at twice the late line (8 s for a 4 s line), so the dashed line always sits at mid-height.
    • A longer wait is drawn full height with a cap mark. Its seconds stay on hover.
  2. A y-axis of three labels on the right edge: 0, the late line (its label is already there) and the top. No gridlines and no other text.
  3. Help text that matches the app.
    • Find what a wait past the line really does: Health.classify and failed_by in backend/app/channel.py call the upstream failed at 2× the target duration, but the strip's waits are timed from the playlist listing (_waits).
    • Say that in the info icon and the line's title.

Done when

  • In the frontend tests:
    • waitBars and lateLine put the line at the same height whether the longest wait is 2 s or 30 s;
    • a wait past the top is drawn full height and marked as cut off;
    • with late_after_seconds 4, the strip shows the axis labels 0, 4 s and 8 s.
  • The help text says what the live app does with a wait past the line.
On the Playing card (#105), the strip of the source's waits for a new segment has no fixed scale and no y-axis. The owner likes the live view but called the moving proportions a bug. ## What happens - **The scale moves.** - The chart's top is the larger of 1.25× the late line and the longest wait on show (`waitBars` and `lateLine` in `frontend/src/admin.ts`). - With a 4 s late line, any wait past 5 s makes the whole chart shrink to fit it: the dashed line drops and every bar gets shorter. That includes the open wait still growing at the right edge. - When that wait leaves the window, the chart grows back. - Seen live on 2026-11-08 on C Palace vs. Liverpool. In the first screenshot the open wait (blue, far right) has pushed the line down. The second is the same card 23 s later, after that wait closed: the line is back up and the bars are taller. - **No y-axis.** Only the dashed line carries a value ("4 s"), so a bar's height says nothing until you hover over it. - **The help text over-promises.** - The info icon and the line's title both say that past the dashed line the stream has failed and the standby takes over. - In the second screenshot two waits went past the line (4.3 s) and nothing swapped. ![Before: the open wait has pushed the line down](https://forgejo.underthere.xyz/attachments/4c73ba64-c72e-4389-9df7-bdfd97355be6) ![23 s later: the line is back up](https://forgejo.underthere.xyz/attachments/acff284a-9c6a-4429-b520-084affd06bb2) ## The idea 1. **One scale.** - The chart's top is fixed at twice the late line (8 s for a 4 s line), so the dashed line always sits at mid-height. - A longer wait is drawn full height with a cap mark. Its seconds stay on hover. 2. **A y-axis of three labels** on the right edge: 0, the late line (its label is already there) and the top. No gridlines and no other text. 3. **Help text that matches the app.** - Find what a wait past the line really does: `Health.classify` and `failed_by` in `backend/app/channel.py` call the upstream failed at 2× the target duration, but the strip's waits are timed from the playlist listing (`_waits`). - Say that in the info icon and the line's title. ## Done when - **In the frontend tests:** - `waitBars` and `lateLine` put the line at the same height whether the longest wait is 2 s or 30 s; - a wait past the top is drawn full height and marked as cut off; - with `late_after_seconds` 4, the strip shows the axis labels 0, 4 s and 8 s. - **The help text** says what the live app does with a wait past the line.
Author
Owner

Seen live at 15:37Z on the same channel, after filing: the line is the failure threshold some of the time.

  • The log says powerstream.club (hls.lshls.st) failed: no new segment for 4 s, and 3 s later the channel recovered on the standby (bally-sports.lat).
  • Earlier, two waits of 4.3 s went past the same line with no failure.

So the strip's waits (timed from the playlist listing, _waits) and the failure check (now - last_new_segment_at at the health check) measure differently. The fix should make the strip and its help text agree with the check that actually fails the stream.

Seen live at 15:37Z on the same channel, after filing: the line **is** the failure threshold some of the time. - The log says `powerstream.club (hls.lshls.st) failed: no new segment for 4 s`, and 3 s later the channel recovered on the standby (bally-sports.lat). - Earlier, two waits of 4.3 s went past the same line with no failure. So the strip's waits (timed from the playlist listing, `_waits`) and the failure check (`now - last_new_segment_at` at the health check) measure differently. The fix should make the strip and its help text agree with the check that actually fails the stream.
Author
Owner

Closing: merged to develop in PR #119 (merge 73f86a3), milestone 39. It deploys once nobody is watching.

What changed:

  • The strip's top is fixed at twice the late line, with a cap mark on longer waits and a 0 / line / top axis.
  • Why the 4.3 s waits passed a 4 s line without failing: the failure clock also restarts when a segment finishes downloading, while the strip only timed listings.
  • The waits are now timed on that same clock, so a bar at the line means the check fails, and the help says so.

Not seen live yet.

Closing: merged to develop in PR #119 (merge 73f86a3), milestone 39. It deploys once nobody is watching. **What changed:** - The strip's top is fixed at twice the late line, with a cap mark on longer waits and a 0 / line / top axis. - **Why the 4.3 s waits passed a 4 s line without failing:** the failure clock also restarts when a segment finishes downloading, while the strip only timed listings. - The waits are now timed on that same clock, so a bar at the line means the check fails, and the help says so. **Not seen live yet.**
Author
Owner

Deployed 2026-11-08 17:27:26Z: commit 73f86a3, container a07efdae03b6, 36.6 s down, no errors in the log.

Deployed 2026-11-08 17:27:26Z: commit 73f86a3, container a07efdae03b6, 36.6 s down, no errors in the log.
Sign in to join this conversation.
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#114
No description provided.