Skip to content

Race overlay for any event, an Overlays tab, and a fixed desktop port (RaceGOW mode removed) - #528

Open
ryan-johnson2 wants to merge 5 commits into
develfrom
racegow
Open

ryan-johnson2 wants to merge 5 commits into
develfrom
racegow

Conversation

@ryan-johnson2

@ryan-johnson2 ryan-johnson2 commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

What this is now

This branch started as a RaceGOW solo-run mode (#527). Flying it for real showed the mode was worse than an ordinary event, so the mode is gone and what was worth keeping stays, generalised:

  • RaceGOW mode removed. No preset field, no #/racegow pages, no Events-page chooser or badge, no lib/racegow.ts. A one-pilot event with an open-ended Time Trials round scored by best 3 consecutive laps does the job with nothing special. Server crates and bindings are back to devel.
  • The overlay works for any event. #/overlay/race follows the Director's active event: the race clock (countdown when the round has a fixed end), the phase, the heat's friendly name, a row per pilot off the served lap list (laps / last / best, or best-N window + served round best for a BestConsecutive round), and the long form with recent laps for a one-pilot heat. #/overlay/race/light is the dark-text-on-light contrast. It re-reads the event meta when the heat or phase moves and polls the active event, so an OBS scene left open follows an event switch. Race-day audio is not mounted on an overlay route.
  • An Overlays tab in the event workspace (#/event/overlays): the catalogue, each overlay's URL with a contrast picker, Copy URL, open in a new tab, and a live preview frame of the same route.
  • The desktop app binds a fixed port. It used 127.0.0.1:0, so the address changed on every restart and broke every OBS browser source. It now binds 127.0.0.1:8080 (GRIDFPV_ADDR overrides) and falls back to an ephemeral port only when that port is taken, with a loud log line.

Tests

  • Unit: overlay.test.ts, RaceOverlay.test.ts, EventOverlays.test.ts; route tests cover the overlay routes and the new tab. The RaceGOW tests are deleted.
  • e2e: overlay.spec.ts schedules and starts a heat of three on the worker's ordinary event, asserts the overlay renders it (names, countdown, LIVE, climbing laps, transparent document, both contrasts), then the Overlays tab's URL and preview frame. Passes locally in the Playwright container.
  • The fixed-port fallback was exercised in a scratch binary: a second instance on a busy 8080 logs the bind failure and comes up on an ephemeral port.

Docs: the user guide's RaceGOW page is replaced by an Overlays page (GridFPV/docs main).

🤖 Generated with Claude Code

ryan-johnson2 and others added 5 commits September 26, 2026 19:18
… and the first overlay (#527)

RaceGOW is an at-home whoop competition: fly the season's track, submit your
fastest 3 consecutive laps with a video that shows a timer. GridFPV already
ran that event shape, six RD screens deep. This is a start button over it.

- `EventMeta.preset` (+ `CreateEventRequest`): the console preset that built
  an event, `"racegow"` here. Persisted like any meta; nothing server-side
  consults it.
- `#/racegow`: the RaceGOW page. Track, pilot (or a new callsign inline),
  timer, channel → `createRaceGowRun` builds the event through the wizard's
  own commands: Whoop class, one-pilot roster with a fixed channel, one
  time-trial round, `rounds=0`, `BestConsecutive{n:3}`, a 10-minute ceiling
  (a ranking-only round with no race time is refused), a fixed 1 s hold.
- `#/racegow/run`: one button (FillRound → SetCurrentHeat → Stage → Start;
  Stop = ForceEnd → Finalize), the live clock, this run's laps off the served
  lap list with the best-3 window highlighted, the served round-wide best as
  the headline, a copy-and-paste submission line, the runs table, the overlay
  URL, and a link into the full console.
- `#/overlay/racegow`: the first overlay of the streaming design — a bare,
  transparent (`html[data-overlay]`), read-only route following the active
  event: run clock, recent laps, best 3 this run and today.
- Hub card; design-doc notes (streaming §5, roadmap); unit tests for the
  helpers and all three screens; `e2e/racegow.spec.ts` drives the whole loop
  on the Simulator, including the overlay and reopening a run.

No engine change: every run is an ordinary heat of an ordinary event, with
marshaling, audit and export behind it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ross encryption levels)

A new advisory (published 2026-09-14, medium) against rustls 0.23.40, which
turned the cargo-audit gate red on the first push after it. Bumped in both
lockfiles (root + src-tauri) so the tauri-lock gate stays in step. No
manifest change; rustls is a transitive dependency.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…k, or dark text on light

The OBS overlay (`#/overlay/racegow`) now takes a theme: the default dark glass panel for goggle
DVR, or `#/overlay/racegow/light` — dark text on a light panel — for a bright room camera. The
run screen's "Timer in your video" card grows a two-way picker above the URL, so the copied URL
carries the choice.

The light variant is the component library's `[data-theme='light']` token set scoped to the
overlay, plus the page's own glass values flipped. A mistyped theme segment still renders the
dark overlay rather than bouncing the scene to the hub.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The hub had grown a RaceGOW card beside Events, which read as a second kind of
thing when a track run is an ordinary event. It now lives where events do:

- "+ New event" (and the first-run call to action) opens a dialog that first
  asks Club race / RaceGOW track run. Club race is the default with the name
  form already up, so that path is still name → Create & enter; the track-run
  choice hands off to the RaceGOW page's own form (#/racegow).
- A run the preset built lists on the Events page with an accent "RaceGOW"
  badge, and entering it routes to the solo run screen (#/racegow/run) rather
  than the workspace — the events-page effect in App.svelte checks the preset.
- The run screen and the RaceGOW page gain an Events crumb that leaves the run
  locally first (leaveToPicker), or the Events page would route straight back
  into the run. The RaceGOW page's trail is now Home › Events › RaceGOW.
- The hub is back to its four cards.

Tests: HomeHub asserts no RaceGOW card; EventPicker proves the badge, the
club-race default and the track-run hand-off; the e2e spec now walks hub →
Events → new event → track run, and reopens the run from the Events list.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…y event, fix the desktop port

The RaceGOW preset was tried for real and was worse than an ordinary event. It is gone:
`EventMeta.preset` / `CreateEventRequest.preset`, the `#/racegow` page and `#/racegow/run`
solo run screen, the club-race / track-run chooser and the RaceGOW badge on the Events page,
`lib/racegow.ts`, their unit tests and the `racegow` browser spec, and the user-doc links. A
one-pilot event with an open-ended Time Trials round scored by best 3 consecutive laps does
the same job with nothing special.

The overlay stays, and now works for ANY event. `#/overlay/race` (RaceOverlay.svelte, helpers
in lib/overlay.ts) follows the Director's active event with no preset check: the race clock
(a countdown when the round has a fixed end, as the console's clocks do), the phase, the heat's
friendly name, and a row per pilot off the served lap list — laps, last, best, or the best-N
window when the round scores BestConsecutive, plus the served round-wide best. A one-pilot heat
gets the long form with its recent laps. It re-reads the event meta when the heat or phase
moves (a round created on the console never reaches a second client otherwise) and polls the
active event so an OBS scene left open all evening follows an event switch. Race-day audio is
not mounted on an overlay route — a browser source must not play a second copy of the tones.

The event workspace gains an **Overlays** tab (`#/event/overlays`, EventOverlays.svelte): the
catalogue, each page's URL with a contrast picker, Copy URL, open in a new tab, and a live
preview frame of the same route — the way to see an overlay from inside any event.

The desktop app binds a FIXED port. It bound `127.0.0.1:0` and took whatever the OS gave it,
which changed on every restart and broke every OBS browser source holding an overlay URL. It
now binds `127.0.0.1:8080` (the hosted binary's default; `GRIDFPV_ADDR` overrides) and falls
back to an ephemeral port — logged loudly — only when that port is taken.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ryan-johnson2 ryan-johnson2 changed the title RaceGOW at home: a solo track-run preset, and the first overlay (#527) Race overlay for any event, an Overlays tab, and a fixed desktop port (RaceGOW mode removed) Oct 12, 2026
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