Flagged laps never entered the reference pace, so a driver who got
faster had every lap flagged. They now count in the reference (last 10
laps), settled flags are released, and a flagged lap counts until it is
removed; Approve only drops the flag.
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.
Passes and exercises only count the selected class, and the profile
opened on the first registered one, so laps with another car never
showed. It now opens on the class with the latest lap and offers a
switch when today's latest laps are in another class.
The JSON imports were bare file inputs next to the export buttons and
didn't read as imports. They are now buttons like the CSV imports; the
full import asks before it replaces all race data.
express.json decompressed Content-Encoding br/gzip/deflate bodies before
the PIN check, running Node's Brotli decoder on input from anyone who
can reach the port (CVE-2026-111497). The app never sends compressed
bodies, so they now get 415.
In RaceCore's own overlay a driver row opens Training stats for that
driver and class; the stand-alone overlay window opens them in a new tab.
The public overlay gets no links: the mobile profile link is personal
and can write.
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>
"New practice day" didn't say that it resets. Also a test that several
resets of the same Open Practice (even the same day) keep every lap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
It went away with Timing's run controls; practice has New practice day,
heats and finals get Reset data on Race Day when not running.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Race Day gets Start practice, New track layout and Create race, a session
picker, only the buttons that apply, and New practice day (replaces Reset
data on Timing; laps stay in the training stats). Timing is for following
and links to Race Day. The Dashboard shows the three common tasks first.
Guide, READMEs, screenshot and the "Run a session" video follow the flow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Passings and the session clock followed only the selected session, so
selecting another practice or the next heat while one was running
dropped every lap. They now go to the running session, and Timing and
Race Day show where laps are being recorded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Connect now used the saved URL even after a new one was typed; typed
decoder URLs are now saved first. Adds a browser test for saving a new
decoder port and connecting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Moves the public address from each driver's share panel to Settings ->
System & backup, with Save and Detect public IP. The share panel shows
the address in use and links to the setting; empty keeps using the
local network address.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Explains creating a series, running each round from the series page,
points and standings, and a worked winter-series example.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Step 3 becomes a rounds table: pick drivers inline (copy from the
previous round, add a late entry), set qualifying rounds/finals/max
cars per heat per round, see the status, and create qualifying and
finals from there. Qualifying heats are now split evenly so nobody
drives alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The series page is split into numbered steps; classes are a sorted list
with the tick on the left and All/None, new series start with none, and
every change is saved straight away so ticks are no longer lost. Also
gives primary/danger buttons white text in the light theme.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Who scores is now an explicit per-series choice: every driver (default)
or club members only, with the club field shown only for the latter.
Series saved with a club keep members-only scoring. README updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A ?driver= link to Training stats was cleared when the page rendered
from the local copy before the server data arrived. The selection now
survives until the first load settles, then the driver opens.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Training stats count Open/Free practice by default; laps from
qualifying, heats and finals are kept and shown under Based on: Races
or All, marked with race, session and series. Races are listed per race
session and never split into stints. Same picker in the mobile profile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Adds a Test pronunciation button (forms and list) that plays the
passing sound and real announcements with the spoken name through race
audio. Fixes the Drivers/Cars search losing focus after one letter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Race sessions: Timing driver details become read-only with an Open in
Judging button; penalties and lap changes happen only in Judging.
Practice: no penalties anywhere, per-lap clean-up stays on Timing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sidebar update notice now lands on System & backup at Updates, and
Race Day's decoder/backend/audio fix buttons open the matching tab,
instead of whichever tab was used last.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each layout can carry its own lap window (set on creation, editable in
Settings, saved from Race Day during practice). Open/Free practice on
that layout uses it; races always keep the event's values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Resetting a running Open Practice deleted its results, the Timing view
recreated an empty result at once, and the next save rebuilt that
session's training laps from nothing - wiping every earlier lap from
the drivers' stats. Reset now syncs first and records resultsResetAt;
laps from before it are kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A layout switch during a running open practice kept every driver's
old-layout best lap, blocking personal-best calls and skewing the
practice leaderboard. Best laps now restart on a new layout and each
lap records its layout. The track record baseline now includes the
current session so the same record isn't called twice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds Alma (sv), Alan, Northern English, Cori, Alba (British/Scottish)
and Joe, John, Norman (American) as optional voices downloaded one at
a time from Settings, with gender (measured pitch) and accent shown in
the voice lists. The standard install is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds 'Calls during a race' (default: passing tone only, like timing
systems) that drops name/personal best/leader/position calls in race
sessions; practice keeps them. Removes the legacy audio panel and
fallbacks, including its 'Sound on' switch that silently muted every
race-audio voice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
A club can run one Open Practice all season and re-lay the track now and then.
Previously a session's layout was frozen at start and every training lap inherited
it, so a season-long practice stayed on its first layout forever, and changing layout
was hidden under Settings -> Appearance.
- Each practice lap now counts toward the layout active when it was driven; a running
practice session moves onto a new layout when one is added
- "New layout" strip on Training stats, Race Day and the Dashboard, offered only around
practice; a running race session blocks layout changes everywhere
- "Stats for" selector (current / older layout / before layouts / all layouts) on
Training stats and in the driver's mobile profile (?layout= on the public API)
- A layout that has practice laps on it can no longer be deleted
- Fix: the buildDriverTrainingStats wrapper in app.js dropped extra arguments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The installer now fetches one male and one female Piper voice per language (Swedish
NST/Lisa, English Ryan/Lessac), with genders confirmed by measuring each voice's pitch
rather than guessed from the name. Settings -> Audio gets a voice selector per language
with its own Test button that always plays the Piper voice. Male is preselected for both.
The integration test now runs its server with an empty home directory, so voices
installed on the developer's own machine can't leak into it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
The page had grown to ~20 stacked panels on one very long scroll - the same problem
already fixed twice this session for Settings and Event Manager. Grouped into 5 tabs
(Getting started, Create a race, Run a race, Training & results, Video guides) using
the same activeGuideTab-as-module-state approach so the selection survives an in-place
re-render (e.g. a language switch). The always-visible overview cards at the top are
unchanged.
Also investigated a "feels slow" concern raised alongside this: measured the page's
actual render cost in a real browser (median 0.6ms, on par with or faster than Settings/
Timing) and confirmed the periodic tickClock/updateSyncStatus intervals never re-render
an idle Guide page. No performance issue found - the perceived slowness was the page's
length, which this change addresses directly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
These three UIs (all shipped earlier this session) had only been verified with throwaway
scratch scripts during development. Adds tests/browser_settings_tabs.js,
browser_event_manager_tabs.js and browser_event_schedule.js, wired into the existing
test:browser suite.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
A "practice" session used as a scheduled slot in a structured
race/sponsor event's session plan silently skipped the entire
countdown/lights/start-tone ceremony and jumped straight to running,
unlike qualifying/heat/final. Narrowed the ceremony-skip check to
only the standalone "Quick Open Practice" shortcut and free_practice
(both rolling/best-lap ranked with no fixed roster) - "practice" is
already ranked like a real timed session in every other respect and
now gets the same start sequence.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Events can now be given a start time and a gap between sessions on a
new "Schedule" panel; every session's planned clock time cascades
automatically in running order (practice, qualifying, finals), and
once a session actually starts or finishes, everything after it
re-anchors to that real time - a late start or a session that ran
long (including any pause) pushes the rest of the day forward with
no manual reschedule step. The scheduled time now also shows on the
printed/PDF start lists.
Printable start lists and manually moving a driver to start last in
their own heat (for a mechanic-time request) already existed, so
this only builds the missing piece: the schedule itself.
Also fixes a real pre-existing bug in the same session-ordering logic
this feature relies on: getSessionSortWeight used `order[type] || 99`,
which silently treated open_practice's own weight of 0 as falsy and
sorted practice sessions dead last instead of first in print/PDF
output.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
getEventDrivers followed the drivers directory's internal creation
order instead of the order participants were actually selected for
the event, so the fallback qualifying/finals grid, the Start List
display, and the staggered-release announcer all read out drivers in
a scrambled order relative to how the event was actually entered.
Fixed to preserve raceConfig.driverIds' own order.
Also, a staggered heat's shared clock/auto-finish target only ever
counted the flat session duration, not the staggered release schedule
itself - so the last-released driver's own personal window could
still be running when the session force-finished. The shared clock
now widens by (driverCount - 1) * staggerGapSec on top of the base
duration for staggered sessions; each driver's own personal quota is
unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Staggered-start qualifying heats now announce each car's transponder
number in grid order (~3s apart) right after the official start,
matching what a track announcer does when releasing cars one at a
time; mass/position starts are unaffected. The Timing leaderboard and
every overlay variant now also show a green "Done" flag next to a
driver's name once their own personal timing window (which already
started at their own first crossing) has elapsed, even while the
session is still running for other drivers.
Also confirmed two things already worked correctly: finals already
always start everyone together with the shared countdown/lights/tone
sequence, and practice's time-up announcement already says "finish
the lap you are on" - only a "2 minutes remaining" cue is genuinely
missing from the existing 1min/30s/10s ladder, left as an open
question for the user.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
The user asked whether a lone driver left in the last heat (e.g. 7
drivers at 3 per heat) could be moved into another heat manually.
Investigated first: neither "Reseed" (redistributes every not-yet-run
heat by current standings, not a targeted move) nor the grid editor
(reorders start position within one heat, never moves a driver
between heats) could do this - there was genuinely no path to it.
moveDriversIntoQualifyingHeat (src/event_race_logic.js) adds the same
"checking them elsewhere is the move" pattern already used for team
rosters: a new driver checklist on the qualification session edit
form pulls a checked driver out of whichever other heat they're
currently on, scoped to the same round only ("Q2 H2" never touches
"Q1"/"Q3", since heat composition can legitimately differ round to
round after a reseed). The checklist names the driver's current heat
before saving, mirroring the team-roster warning.
Also confirmed, per the user's earlier questions, already correct
with no changes needed: practice's per-driver "best 3 laps"/"best
5-minute result" stats, and that heats are already seeded fastest-
first from practice results. Flagged one real, deliberately unbuilt
gap while investigating: a true per-driver rolling "5 minutes from
your own first crossing" qualifying *heat* clock isn't supported -
only the practice stats work that way today.
Verified with new unit tests for moveDriversIntoQualifyingHeat and
the extracted parseQualifyingHeatName helper, and a real headless-
browser run reproducing the exact reported scenario end to end
through the actual UI.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The user asked whether the DNS fix had actually been tested against
the different points systems, not just the default one. It hadn't -
buildQualifyingStandings had never been exercised end to end with
qualifyingPointsTable "field_desc"/"ifmar" (high-points-win scoring)
or qualifyingScoring "best" (ranked by time, not points) at all,
DNS or otherwise.
Added two tests: a DNS driver scored under the high-points field_desc
table (confirms the DNS row still ranks last under an inverted sort
direction, and isn't scored as either zero or the winner's points),
and one under "best time" qualifying (confirms a bad DNS heat can't
contaminate a driver's genuine best result, since bestRank/
bestRoundMetric take the driver's single best heat, not an average).
Both passed immediately, confirming the fix already handled these
correctly - this closes a real, previously-untested gap in confidence
rather than fixing a new bug.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The user asked specifically to confirm this: a driver who DNS'd in one
qualifying heat but raced normally in others must still be fully
counted across all of them, not dropped. Traced through the fix
(buildQualifyingStandings backfills a DNS row per finished heat,
accumulating into the same per-driver entry across every heat they're
in) and confirmed it already handles this correctly - added a test
that exercises exactly this scenario (DNS in heat 1, wins heat 2 and
3) to lock it in, since this specific multi-heat aggregation path had
no prior coverage.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>