feat(profile): 'My race today' on the driver's mobile profile - next heats, grid place, marshal duties and today's results (1.89.31)
This commit is contained in:
1 parent
163e82224c
commit
01998952a7
14 files changed
+222
-3
No files matched your search
@@ -2961,6 +2961,8 @@ Dependency graph: `app.js -> decoder_runtime.js -> decoder_diagnostics.js`; `app
|
||||
|
||||
`decoder_diagnostics_view.js` mounts inside a details element outside settingsForm. A one-second timer patches only its own text nodes; it skips closed/paused panels, clears the old timer on remount, and self-clears after detachment. Pause affects display, not collection. Clearing diagnostics preserves socket state and timestamps. Copy uses Clipboard API with a selectable readonly textarea fallback for HTTP. Untrusted payloads are assigned through textContent/value, never interpolated into HTML. No SQLite/localStorage writes, backend endpoint, or public overlay exposure is added. Refresh resets diagnostics independently of saved settings.
|
||||
|
||||
`my_race_logic.js` (pure) builds the "My race today" snapshot from `buildDayRows(today)`: per session an id, label, planned start, state, grid flag, entrant ids in grid order, marshal ids and, for heats run, leaderboard positions (ids, laps, result text - no names). `app.js` `publishPublicRaceDay()` posts it every 15 s on the race master when it changed to `POST /api/public-race-day`; the server keeps it in `data/public_race_day.json` (never in app state) and `/public-training/api/:token` adds `raceToday` from `pickDriverRaceDay()` in `server/public_training_profile.js` (today only, the profile's own ids). `public_training.js` renders it with `renderMyRace()`.
|
||||
|
||||
`check_in_logic.js` (pure) holds the optional race check-in: `raceConfig.checkIn = { driverId: { present, paid } }` (kept by `normalizeEvent` and `buildRaceFormatConfigFromForm`), `checkInRows()` (with today's decoder sightings from `prologue_logic.js`), `checkInSummary()`, `canRemoveNoShows()` (someone checked in, no non-practice session of the race started) and `removeNoShows()` (race participants and unstarted sessions only, never the register). `check_in_view.js` renders the Manage race tab; `app.js` `mountCheckIn()` fills it through the `renderCheckIn` context hook.
|
||||
|
||||
`decoder_watch.js` (pure) decides the decoder alarm: `decoderAlarm(decoder, session, { startPending, bestLapMs, now })` returns `ok`, `lost` (main link down 3 s or more during a running heat or start count-down, counted from `state.decoder.disconnectedAt`, set on the first `onclose` and cleared on `onopen`) or `silent` (connected, a non-practice heat past its first 30 s, no PASSING since `state.decoder.lastPassingAt` or the start for `silentLimitMs(bestLapMs)` = max(30 s, 3 × best lap)). `app.js` `checkDecoderAlarm()` runs every second on the race master with a configured `wsUrl` and `settings.raceAudio.decoderAlarm` on; it renders `#decoderAlarm`, plays `timing_disconnected` (or the WebAudio siren when race audio is off) every 30 s until silenced, and shows 10 s of "working again" after recovery. No backend or SQLite change.
|
||||
|
||||
Reference in new issue
Block a user