Skip to content

wall: draw the race on the picture; parse races[] and wakes[] - #1332

Merged
ejc3 merged 3 commits into
mainfrom
wall/race-on-image
Oct 26, 2026
Merged

ejc3 merged 3 commits into
mainfrom
wall/race-on-image

Conversation

@ejc3

@ejc3 ejc3 commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Stacked on: wall/full-bleed (#1331)

The race is now drawn on the picture: every dark tile counts, each half has one large clock, and each tile shows its own time as it relights. The strip under the image always has a race line, and waking is a lower third over the recording.

Contract. fleet/web only. Every number is the coordinator's measurement; the page formats it.

The race (core/race.ts, core/view.ts, app/_wall/Overlays.tsx, app/wall.css)

  • While a race runs, each dark tile shows its own clock since the race began (mono, clamp(18px, tile.h/5, 56px)) above its progress ring and phase.
  • A tile that relights pulses its side's colour for 250 ms and shows its time (first_frame_at - relaunch_all.started_at) in its centre for 3 s, then in its top right corner until the race ends.
  • One clock per half, centred low in the half (clamp(56px, 9vw, 160px), weight 300 while counting, 600 once frozen). fcvm freezes in blue with a check mark when its last tile returns; EC2 keeps counting in amber with +{gap} s and counting once its counted time passes fcvm's and where its slowest tile is (instance → OS → driver → app, from the tiles' phases). While AWS has no spot GPU the clock does not count the wait and says so: not counting 21 s AWS spent finding a spot GPU.
  • When both halves are back, one card in the lower third for 8 s: fcvm back in 3.3 s · EC2 back in 27 s · 8.1× faster (EC2's time without its capacity wait; the ratio only when both halves ran). Then the strip's line takes over.
  • The race's bar panel and Score.tsx are gone. The strip says who started a running race ("Restart running", "Scheduled restart, running").
  • Phone upright: the image is 219 px tall, so the two clocks, the result and the wake card sit under it, and tiles too small for text show only their ring.

The last race line, without dashes. lastRaceLine reads the scoreboard, else the newest race in races[] (the coordinator's snapshot carries the last 10; the page did not parse it), else each half's newest single restart (Last single restarts: fcvm VM 1 back in 2.8 s · EC2 VM 1 back in 58 s), else nothing.

Asleep and waking.

  • The recording's badge reads ◉ RECORDING · 21 Oct 2026, 18:30 UTC and flips to ● LIVE as the live image replaces it.
  • The checklist card becomes a lower third: WAKING 16 GPUs 0:41.2 and the five wake phases as dots (each with its label and time). Asleep: Asleep. 16 GPUs wake in about 1:38 when you stay., from the median of fleet.power.wakes (also newly parsed), or "The GPUs wake when someone watches." with none measured.

Also

  • The spec line's frame rate is the renderers' own reported fps (median over live tiles), not the rate this page receives, which reads 1 to 5 fps for a tile that has just relit.
  • docs/screenshots regenerated from the e2e screenshot run.

Review fixes (two later commits; the first also closes #1331's two findings)

  • The race result, a frozen half clock, the announcement and the bar value read the coordinator's measured half time (relaunch_all.fcvm_ms / ec2_ms, now parsed, else the matching race in races[]). The coordinator leaves each tile's own wait out, so a tile back at 60 s without waiting beside one back at 50 s after a 30 s wait is 60 s; the page said 30 s.
  • A side tag is shortened to its half's name when that half is under 320 px (wall: fill the screen with the image; cap each tile at 0.5 Mpx #1331: one fcvm GPU against seven EC2 on 960 px ran the fcvm tag off the left edge).
  • The top row's controls wrap under the title when they do not fit one row (wall: fill the screen with the image; cap each tile at 0.5 Mpx #1331: at 701 to 860 px the isolation and menu buttons were off screen).
  • Each half's clock is sized to its half (9% of the image width within 56 to 160 px, no wider than the half allows, 24 px floor), and a card wider than its half moves in from the image edge.
  • Tests observed failing first: "ends a race with one card in the coordinator's numbers" (30 s against 60 s), "shortens a half's tag to its name", e2e "every control stays on screen from just above the phone breakpoint up" (three buttons past the right edge at 701 px), "sizes each half's clock to its own half". Full gate after the last fix: 223 unit tests, e2e 56 passed in 9.4 min.

Evidence

  • pnpm lint && pnpm typecheck && pnpm test: 221 unit tests pass. New: the race on the picture (clocks per half and per tile, chips fresh then in the corner, EC2's steps and gap, the capacity-wait line), the end card and its hand-over to the strip, the last-race fallback from races[], the asleep line from measured wakes, the badge flip; in contract.test.ts, races and wakes parsed from the coordinator's own snapshot states (15_scoreboard, 02_relaunch_generations, 20_power).
  • Red first, against wall: fill the screen with the image; cap each tile at 0.5 Mpx #1331's tree with the new tests: the races[] fallback, the contract test for races/wakes, and the race-on-picture tests fail (no races, no clocks).
  • pnpm build && FLEET_SCREENSHOT_DIR=$PWD/docs/screenshots pnpm test:e2e: 55 passed in 9.6 min. The run before it had one WebKit page crash (Target crashed) in the re-tile test; the WebKit subset then passed twice on its own and the whole suite passed. The restart race now checks a tile's clock, both half clocks, fcvm freezing while EC2 counts, a relit tile's time, EC2's steps, the end card's text against the coordinator's times, and the hand-over to the last-race line; the schedule test checks the capacity-wait line on EC2's clock; the asleep test checks the new badge and lower third.

Downstream impact. The staging page during a race and while the fleet sleeps or wakes.

The race moves from a bar panel onto the image.

- Each dark tile shows its own clock since the race began above its
  progress ring and phase (tiles too small for text show the ring).
- A relit tile pulses its side's colour for 250 ms and shows its time
  (first_frame_at - relaunch_all.started_at) in its centre for 3 s,
  then in its corner until the race ends.
- One clock per half, centred low in the half: fcvm freezes in blue with
  a check mark when its last tile returns; EC2 keeps counting with
  "+N s and counting" (once its counted time passes fcvm's) and where
  its slowest tile is (instance, OS, driver, app). A capacity wait is
  not counted and is named: "not counting 21 s AWS spent finding a spot
  GPU". On an upright phone the two clocks sit in a row under the image.
- When both halves are back, a card for 8 s: "fcvm back in 3.3 s · EC2
  back in 27 s · 8.1× faster", from the coordinator's times, EC2 without
  its capacity wait. Then the strip's last-race line takes over.
- The bar panel and Score.tsx are removed.

The last-race line falls back from the scoreboard to the newest race in
races[] (now parsed) to each half's newest single restart, so the strip
does not show dashes.

Asleep and waking: the recording's badge reads "◉ RECORDING · <date>"
and flips to "● LIVE" as the live image replaces it; the checklist card
becomes a lower third ("WAKING 16 GPUs 0:41.2" and the five phases as
dots), under the image on an upright phone. Asleep says "16 GPUs wake
in about 1:38 when you stay." from the median of fleet.power.wakes (now
parsed).

The spec line's fps is the renderers' reported fps, median over live
tiles, not the rate this page receives (1 to 5 fps on a tile that just
relit).

docs/screenshots regenerated from the e2e screenshot run.

Tests: unit tests for the clocks, chips, EC2 steps and gap, the
capacity-wait line, the end card and hand-over, the races[] fallback,
the asleep line and the badge; contract tests that races and wakes parse
from the coordinator's own snapshot states. Each fails against the
previous commit's core files. e2e race, schedule and asleep tests moved
to the on-picture elements.
@ejc3
ejc3 marked this pull request as ready for review October 26, 2026 05:21
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ejc3

ejc3 commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T05:57:03.739651Z 3912dfe Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 62bbc12a74

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread fleet/web/core/race.ts Resolved
…rols

- Race result, frozen half clock, announcement and bar value read the
  coordinator's measured half time (relaunch_all.fcvm_ms / ec2_ms, now
  parsed; else the matching race in races[]) instead of wall time less
  the longest capacity wait. The coordinator leaves each tile's own wait
  out, so a tile back at 60 s without waiting beside one back at 50 s
  after a 30 s wait is 60 s; the page said 30 s.
- A side tag is shortened to the half's name when that half, not the
  whole image, is under 320 px: one fcvm GPU against seven EC2 on a
  960 px image left the full fcvm tag running off the left edge.
- The top row's controls wrap under the title, right-aligned, when the
  two do not fit one row; at 701 to 860 px the isolation and menu
  buttons were off screen.

Tests, each failing before the change: "ends a race with one card in
the coordinator's numbers" (EC2 30 s against 60 s), "shortens a half's
tag to its name" (full tag on a 120 px half), e2e "every control stays
on screen from just above the phone breakpoint up" (three buttons past
the right edge at 701 px).

@ejc3 ejc3 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RED-VERIFIED: the finding in this review is fixed in 42a5359, with "ends a race with one card in the coordinator's numbers, then hands over to the strip's line" observed failing on 62bbc12. Answered in the thread.

@ejc3

ejc3 commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42a5359309

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread fleet/web/app/wall.css Resolved
…mage

raceOnImage gives each clock a font size, the design's
clamp(56px, 9vw, 160px) as 9% of the image width within 56 to 160 px,
but no wider than its own half allows (six monospace characters plus
56 px of padding), with a 24 px floor; and a card width from it. A half
narrower than the card moves the card in from the image's edge. The
page draws the figure at that size. One fcvm GPU against fifteen EC2 on
a 1600 px image centred a 144 px clock 50 px from the left edge, mostly
off screen.

Test: "sizes each half's clock to its own half and keeps the whole card
on the image" fails on the previous race.ts (no size, no card width).

@ejc3 ejc3 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RED-VERIFIED: the finding in the review of 42a5359 is fixed in 3912dfe, with "sizes each half's clock to its own half and keeps the whole card on the image" observed failing first. Answered in the thread.

@ejc3

ejc3 commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 3912dfe3c2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Base automatically changed from wall/full-bleed to main October 26, 2026 05:57
@ejc3
ejc3 merged commit 74be9cb into main Oct 26, 2026
5 of 15 checks passed
@ejc3
ejc3 deleted the wall/race-on-image branch October 26, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant