diff --git a/CHANGELOG.md b/CHANGELOG.md index 6878e91..c225d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ The application version is maintained in `package.json` and displayed in the adm No changes recorded yet. +## 1.26.0 - 2026-09-30 + +### Added + +- Warm-up / transponder check on Race Day before a heat starts: "Start warm-up" (1, 2 or 3 minutes, with a countdown and voice announcements) lists every driver in the heat, and each one gets a green tick once their transponder crosses the line. A missing driver's transponder can be changed right in the panel, or linked to one of the unknown transponders that just crossed. Start warns about anyone not seen, but can still start the heat. The preflight list shows "Transponder check: 3/4". + ## 1.25.0 - 2026-09-27 ### Added diff --git a/ROADMAP.md b/ROADMAP.md index 71b9ab4..fc41b29 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -561,6 +561,18 @@ Investigated alongside this, per the user's follow-up question about whether the Verified 2026-09-12: `npm run test:browser` passes all 37 scenarios (3 new, 34 pre-existing) including the new Guide tabs coverage; `npm test` passes all 205 unit tests unchanged. Live headless-browser checks in both languages confirmed correct tab labels/translations, no raw `guide.*` keys, and that the "Run a race" tab's content (`guide.race_day_title`) renders correctly. Refreshed `docs/screenshots/guide.jpg` to show the new tab bar. +## Warm-up / transponder check before a heat + +Asked by the user 2026-09-30: what happens if a driver in a running heat registered the wrong transponder? Checked first: fixing the transponder on the driver mid-heat works for every passing *after* the fix (drivers are looked up per passing), but laps already driven are stuck on an "Unknown driver" row, credited to the wrong driver, or - if the number belonged to someone not in the heat - thrown away entirely with no way to recover them. The user pointed at how other timing systems prevent this instead: a 1-2 minute warm-up where every driver in the heat must show a valid passing (green tick) before the start, with a quick transponder fix for anyone who doesn't. Built that; the mid-heat "move laps" safety net was offered too, and deferred by the user. + +- [x] `src/warmup_logic.js` (new, pure): remembers each transponder the main decoder sees (bounded, in memory only - never saved or counted as laps), and builds the per-heat check: which entrants have crossed since the warm-up started, which unknown transponders crossed (naming the owner if it's a driver outside this heat), countdown. +- [x] `decoder_runtime.js` reports every main-line transponder *before* its running-session check - previously every passing before the start was discarded as `no_running_session`, so nothing could be checked pre-heat. +- [x] Race Day panel (`race_day_view.js`), shown for a selected, not-yet-started race-format heat with driver transponders (not practice, team race or sponsor/track events): Start warm-up (1/2/3 min) with a live countdown and new voice events `warmup_start` / `warmup_1_minute` / `warmup_end` (sv + en in the sound pack, so Piper pre-generation includes them); ✅/⏳ per driver in start order; for a missing driver, "Link unknown transponder" (one pick) or type a new one - saved on the driver immediately, with the same cross-person conflict warning as the Drivers page. The page refreshes on each passing but never while the operator is typing in a field. +- [x] Start warns - never blocks, a driver may simply not show up - listing who wasn't seen, and ends the warm-up. Preflight shows "Transponder check: seen/total" as a warning while someone is missing. +- [x] `tests/browser_fake_decoder.js` can now send real PASSING frames (`sendPassing`), so browser tests can exercise decoder-driven UI. + +Verified 2026-09-30: unit tests (`tests/warmup_logic.test.js`) cover seen-since-start, a passing before the warm-up not counting, drivers without a transponder, unknown transponders newest-first with owner names, repeat counting and the size bound, and the countdown. `tests/browser_warmup.js` drives it with real decoder frames: Anna and Bo go green, Cia (registered wrong) stays missing until the unknown transponder is linked from the panel - then green and saved - preflight shows 3/3, and after a restarted warm-up Start warns naming the two not seen and starts the heat on confirm. While writing that test it first failed because a passing sent "before" the warm-up reached the page after the click and was (correctly) counted - a test timing issue, fixed by waiting for the frame to arrive. After that fix the same assertion still failed rarely (twice in about ten full-suite runs). Investigated with temporary logging: every run had exactly one decoder connection and the passing was processed before the start (`no_running_session` in the diagnostics), so it is not a duplicate-connection bug - but the flake could not be reproduced while logging (4/4 passed), so the root cause is unknown. The browser test now waits 750 ms between that passing and the start; the before/after rule itself is covered deterministically by the unit tests. 230 unit/integration tests pass, and the 46 browser scenarios passed three runs in a row. + ## Documentation maintenance - [x] Update the architecture's module/dependency inventory as modules change. diff --git a/docs/javascript-architecture.md b/docs/javascript-architecture.md index c469354..15956e5 100644 --- a/docs/javascript-architecture.md +++ b/docs/javascript-architecture.md @@ -576,6 +576,14 @@ Type: Owns: - "Track layout: