Commit Graph
44 Commits
Author SHA1 Message Date
larssand a4e734dd74 fix(control): followers update live, phones use the page address, master is visible (1.77.2) 2026-11-07 18:09:34 +01:00
larssand 7c25f23ad0 feat(print): styled PDF export and printouts with branded header, real tables and podium marks (1.72.0) 2026-11-06 22:52:02 +01:00
larssand be99cfaab2 feat(judging): judge finished heats, DSQ/DNF, reasons, own time and driver calls per EFRA (1.70.0) 2026-11-05 23:31:01 +01:00
larssand a7d2d0b9ae feat(practice): open practice settings with ranking by best N in a row or best X minutes (1.68.0) 2026-11-05 22:38:33 +01:00
larssand 37076b8490 feat(team-race): one team race setup panel with auto split, car per team and start checks (1.67.0) 2026-11-05 21:55:37 +01:00
larssand 69a65748ce feat(results): race overview on Race Day and an event-grouped results archive (1.66.0) 2026-11-05 21:44:06 +01:00
larssand fed83ddf67 fix(audio): call a new leader only when the change is confirmed, not at every qualifying swap (1.65.4) 2026-11-05 19:38:37 +01:00
larssand e4874fd558 feat(sim): start and stop the decoder simulator from Settings (1.65.0) 2026-11-05 18:48:37 +01:00
larssand d0a5df6992 feat(sponsor): quick setup with guest drivers, shared rental cars, rotating heats and A/B finals (1.63.0) 2026-11-05 18:31:57 +01:00
larssand 94ec278f53 feat(audio): practice hype calls and leader calls in qualifying and finals (1.61.0) 2026-11-05 08:19:45 +01:00
larssand db6a9f19e4 fix(race): finish the lap you are on, one clock owner, edits survive refresh, participants editable (1.59.0) 2026-11-04 21:34:06 +01:00
larssand b23410c190 feat(race-setup): group the race list into today, upcoming and folded done, with progress and search (1.52.0) 2026-11-02 08:21:17 +01:00
larssand fdc6c179dc feat(race-day): day schedule for all classes, autopilot, pause the day, printed running order and drivers' board (1.50.0) 2026-11-01 22:06:59 +01:00
larssand 54487a18a6 feat(race-day): live race for the race controller with order, laps, gaps and estimated finish (1.47.0) 2026-11-01 16:38:08 +01:00
larssand 71aa149a4d feat(series): next-step button per round and Race Day next session (1.44.0) 2026-10-31 09:03:34 +01:00
larssand dbda06d101 fix(series): report created races, delete a series with its races; group Race Day sessions by today's races (1.43.1) 2026-10-31 08:34:44 +01:00
larssand 40c3737925 test(overlay): every driver is listed, compact rows beyond 12 2026-10-25 21:33:54 +01:00
larssand 35eb3eb059 feat(decoder): warn when the decoder's clock is off (1.42.4)
The decoder's time is never changed. Passings (also during warm-up)
measure it against the computer's clock, and Race Day's preflight and
the decoder diagnostics warn when it is over a minute off, e.g. after
the switch to winter time.
2026-10-25 18:40:35 +01:00
larssandandClaude Opus 5.5 cade201d5a feat(audio): fewer personal best calls in Open Practice
On fresh packs every driver beats their best almost every lap early in
the day. No call for a driver's first 10 laps since the practice started
or was reset, at most one per driver a minute, and 0.1 s over the last
called time. Adjustable under Settings → Audio; 0 turns a rule off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 15:40:24 +02:00
larssandandClaude Opus 5.5 2c6c37f6ca fix(decoder): connect even when the browser storage is full
A big installation outgrew the localStorage quota; saveState() threw
QuotaExceededError and, since connecting saves first, the decoder never
came online. The local copy is only a cache of the server state, so a
write that doesn't fit now drops it instead of throwing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 16:06:35 +02:00
larssandandClaude Opus 5.5 72d83ad183 feat(overlay): show places gained since the start in the OBS tower
Heats and finals started together show ▲/▼ against the start order
(new OBS option, on by default). In practice the best lap is no longer
printed twice as both result and best.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:13:10 +02:00
larssandandClaude Opus 5.5 9a9379aa83 feat(series): add series/cup championships with points tables and standings
Group any number of races in freely chosen classes into a series with a
points table (ÖRC/100-80-70/F1/custom), best-N or drop-X counting, a
club filter that re-ranks members without guests, tie-breaks, rounds
created from a date list, and per-class standings with print and PDF.

Also fixes PDF export of wide tables: they are compacted and switched
to landscape instead of truncating names and dropping columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:49:23 +02:00
larssandandClaude Opus 5.5 8601954ea2 feat(practice): flag suspiciously short laps and remove any lap in one click
Practice laps under 85% of the driver's own median (a likely shortcut)
are flagged: counted, but never a best lap, record or training stat
until approved. Timing and Race Day get a one-click Approve/Remove
panel, overlays show a warning mark, and any lap can be removed or
restored from Timing and Judging with undo.

Also sends judge corrections straight to the server so its hot-results
protection can no longer hold back a correction made right after a
passing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 19:53:23 +02:00
larssandandClaude Opus 5.5 5bfb67ea02 feat(race-day): start heats with an EFRA/IFMAR count-down and flying start
Race Day Start now runs a count-down (Go, 30 s - 5 min, default per
event) with calls every minute, 30 s and 10 s, grid call and 9..3
count for grid starts, hold/resume/+1 min/to 30 s/to 10 s/Go now, and
starts the heat by itself when it runs out. The transponder check runs
during the count-down, replacing the separate warm-up.

Adds a flying start mode (horn + clock is running, own clock per car)
as the qualifying default, and the latest personal clock start rules
from EFRA 9.3 / IFMAR 4.2.3 for flying and staggered starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 21:27:20 +02:00
larssandandClaude Opus 5.5 1bc75f8ec1 feat(race-day): add warm-up transponder check before a heat
Race Day gets a 1-3 minute warm-up per heat with a green check per
driver when their transponder is seen, countdown announcements
(sv/en), quick transponder fix from the panel, and a start warning
that still allows starting when someone is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:47:15 +02:00
larssandandClaude Opus 5.5 e8a2799a92 feat(audio): add offline local neural voice via Piper (sv + en)
Announcements can use Piper, a free local neural TTS, instead of the browser's system
voice. No account, no paid service, and it keeps working with no internet at the track.

- npm run tts:install (or Settings -> Audio -> Install) downloads the standalone Piper
  release for Linux/Windows/macOS plus Swedish and English voices into piper/ once
- server/tts.js generates each line once, one at a time, and caches it as WAV under
  data/tts/; a new line takes ~0.3 s with the standalone build
- src/piper_speech.js plays it and falls back to the browser voice if Piper is missing,
  errors, or takes over 2.5 s, so no announcement is lost and timing is never held up
- "Pre-generate phrases and driver names" renders every fixed phrase and name in both
  languages before race day

Browser voice stays the default. Generation routes fall under the admin PIN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 19:28:15 +02:00
larssandandClaude Opus 5.5 9016ce02e4 feat(auth): add optional admin PIN for all API writes
Off by default. Once a PIN is set in Settings -> System & backup, every non-GET /api/*
request (plus GET /api/ammc/config) needs a signed 30-day HttpOnly cookie, which also
closes the unauthenticated /api/update/run restart trigger. A 401 opens a PIN dialog
and the pending save is retried after login. Reads stay open because the public overlay
hydrates through GET /api/state. Optional RC_ADMIN_ALLOWED_CIDRS restricts the same
routes by client address.

The PIN hash and signing secret live in data/, outside the app_state blob, so they
never leak through GET /api/state, exports or backups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 22:14:58 +02:00
larssandandClaude Sonnet 5 ba2d78779f Warn when a driver's transponder collides with a different driver
Registering or editing a driver with a transponder already assigned
to a different driver (e.g. a wrong-class typo) previously saved
silently - the only symptom was that driver's laps never registering
during their heat, with no indication why. Now a confirm dialog names
the conflicting driver and their class before saving; the same
person's own multiple class entries sharing one physical transponder
are correctly never flagged.

Also confirms two things the user asked to verify: the race clock
already counts down for all timed session types (only open practice
counts up unbounded), and a driver not entered in a heat already has
their laps fully discarded rather than recorded - both were already
correct, no changes needed there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 20:20:40 +02:00
larssandandClaude Sonnet 5 f0838bc5db Fix qualifying/finals/bump-up/judging/pause-timing bugs
A thorough audit of practice/qualifying/heats/finals, bump-up,
judging and pause/timer code (requested by the user) found several
real, concrete bugs, fixed together:

- Qualifying reseed sorted heats as text ("H10" before "H2"),
  scrambling grids at 10+ heats; now sorts numerically and reports a
  clear warning instead of silently dropping/ghosting heats when the
  participant count changes.
- A driver with zero laps in a finished heat/final (DNS) vanished
  entirely - not just from that round, but silently from every future
  reseeded round and the final grid. Now backfilled as a real,
  last-place "DNS" row.
- Bump-up did nothing at all with "reserve bump slots" off (mains
  were already seeded full, so the old capacity check always
  blocked it), and a promoted driver stayed double-entered in their
  old main's upcoming leg. An oversized bump count could also blow
  the main-letter naming past "Z". All three fixed.
- Judging undo restored an absolute snapshot instead of reversing its
  own delta - undoing two penalties out of order could leave a live
  penalty behind two "undone" log entries. Now always nets correctly
  regardless of undo order.
- A competitor's elapsed time didn't exclude paused time (only the
  session clock did), making a paused heat's results incomparable to
  an unpaused one in qualifying ranking. Finishing while paused also
  dropped the final pause segment, so the displayed elapsed time kept
  growing after finish. Both fixed.

Verified with new unit tests for every fix (including a new
session_control.test.js - that file had zero prior coverage) and a
real headless-browser run confirming the judging-undo and bump-up
fixes end to end through the actual UI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 17:41:10 +02:00
larssandandClaude Sonnet 5 fd6efe2c7e Add track layout tracking so lap-time stats stay comparable
Clubs that reconfigure their track (e.g. running indoors in the same
building) can now add named track layouts under Settings, each with
just a start date/time - layouts are contiguous, so a layout's end is
implicitly the next one's start, with no separate field to keep in
sync. Every session freezes which layout was active when it started,
so the "track record" audio cue and the Results Archive (which now
shows each session's layout) only compare laps run on the same
physical track. With no layouts configured, everything behaves
exactly as before - the feature is fully inert until a club uses it.

Design settled through conversation with the user: global scope (not
per class), start-date-only (no redundant stop date), and no changes
needed to driver/transponder mapping, since that's already fully
independent of track geometry in this app.

Deliberately out of scope for this pass: the mobile/driver training
profile's own cross-session personal-best trend stats still compare
across a driver's whole lap ledger regardless of layout - logged in
ROADMAP.md as a real remaining gap for a later pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 14:17:06 +02:00
larssand a0c3d3039e Separat status och mottagningsräknare för varje kanal.
Senaste råmeddelande, fel och ignoreringsorsaker.
Pausa visning, rensa och kopiera logg.
Uppdateras utan att störa inställningsfält eller tidtagning.
2026-09-08 18:37:47 +02:00
larssand 443434d569 fix status and roadmap 2026-09-08 17:26:55 +02:00
larssand 9e6fe2386d fix sort and obs panels 2026-09-08 13:21:29 +02:00
larssand bfe13de59c fixrefresh in mbil prof 2026-09-05 09:49:19 +02:00
larssand 142c45be04 add replay session 2026-09-04 15:58:24 +02:00
larssand f561dd8feb new raceday and backup 2026-09-01 07:07:23 +02:00
larssand 0a05f04075 fix tränings statse sidan 2026-08-28 14:12:09 +02:00
larssand 5f79228941 Add configurable manifest-driven race audio system 2026-08-28 13:29:27 +02:00
larssand e5af42ce2d Add CSV imports and granular competition data cleanup 2026-08-27 17:56:50 +02:00
larssand 8ea8b3a84e Add multi-decoder split and pit timing support 2026-08-25 19:45:40 +02:00
larssand 355a1ad3b0 Förbättrat ljudsystemet 2026-08-24 19:40:39 +02:00
larssand 5a6e51c51b Add persistence and SQLite integration tests 2026-08-24 19:08:21 +02:00
larssand 0ca1679e2a Add race timing and judging regression tests 2026-08-24 18:58:40 +02:00
larssand 1365da7f3c publika träningslogik är nu utbruten och testbar 2026-08-24 18:50:02 +02:00