lägg till jämna varv-övning + v1.2.0

Ny guidad träningsövning i Open Practice: sätt måltid, tolerans
och antal varv, se aktuell serie och dagens bästa live på
Training-sidan. Ett missat varv startar en ny serie utan att
radera bästa resultatet.

Hittade och fixade två buggar under vägen:
- syncTrainingLedger byggde om training-state vid varje sparning
  utan att föra vidare det nya evenLaps-fältet, så sparade
  konfigurationer försvann direkt
- Training-sidan kraschade för alla förare med färre än 3 varv i
  varje stint (t.ex. de första varven i ett pass) eftersom en
  dedupe-funktion läste en egenskap på ett null-värde

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
larssand
2026-09-09 08:51:50 +02:00
parent d18cd7fb5e
commit 9122e91f2e
9 changed files with 341 additions and 18 deletions

View File

@@ -6,8 +6,13 @@ The application version is maintained in `package.json` and displayed in the adm
## Unreleased
No changes recorded yet.
## 1.2.0 - 2026-09-09
### Added
- "Jämna varv" (even laps): a guided practice exercise inside an active Open Practice session. Set a target lap time, tolerance and lap count (with a suggested target from the driver's own personal best); the Training page shows the live streak and today's best streak, and a missed lap starts a new streak without losing the best one.
- Personal mobile profiles show last successful data retrieval, stale-data and failed-update warnings, and a Retry button without replacing loaded statistics or active forms. Requests time out after 15 seconds and cannot overlap.
- Browser coverage for Race Day start/pause/resume/finish and switching to the next queued heat, against a simulated decoder socket.
- Browser coverage for opening the OBS overlay as a real popup window (not a direct URL load): compact layout, and live clock updates that freeze on pause, polling independently of the admin page.
@@ -18,6 +23,7 @@ The application version is maintained in `package.json` and displayed in the adm
- Open Practice sessions on a sponsor (track-mode) event could show a ready/green Race Day preflight yet refuse to start, blocked by a stricter assignment check the preflight never warned about. Open Practice is now exempt from that check everywhere, matching the preflight.
- The Race Day view did not refresh when the decoder connected, disconnected, or errored, so its Start button and preflight checklist could stay stale after a page load until something else triggered a re-render.
- Printing or exporting start lists, results, heat sheets and team reports always showed a false "popup blocked" error and produced nothing, in every modern browser. Opening the OBS overlay as a popup had the same false "blocked" check and its window never received focus. Both used `window.open(..., "noopener,noreferrer,...")`, which returns `null` even on success by current browser standards; both now open without those flags.
- The Training page crashed for any driver with fewer than 3 laps in every stint - a common state, e.g. a driver's first couple of laps in a session - because a dedup step read a property off a `null` "best stint" entry.
## 1.1.2 - 2026-09-08