Commit Graph
27 Commits
Author SHA1 Message Date
larssandandClaude Opus 5.5 533f59adf9 feat(settings): one public address (domain / DynDNS) for all mobile profiles
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>
2026-10-11 19:45:53 +02:00
larssandandClaude Opus 5.5 efa082c2b5 fix(training): keep a linked driver until the first server load finishes
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>
2026-10-10 20:21:19 +02:00
larssandandClaude Opus 5.5 af79b610db feat(training): base training stats on practice, keep race laps separate
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>
2026-10-10 20:08:17 +02:00
larssandandClaude Opus 5.5 627179b95a feat(layouts): switch track layout mid-practice and view stats per layout
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>
2026-09-27 21:24:44 +02:00
larssandandClaude Sonnet 5 1c4a06b69e Record completed training sessions, credit them, and add session-count goals
A driver completing the practice timer, "Jämna varv", or "Stegträning"
now gets a permanent history entry instead of the outcome only existing
as a one-off notification - visible on both their mobile profile and
the admin Training page, so progress over past sessions is actually
reviewable. Each completion earns a prominent emoji-badged credit.

The completion is verified server-side against the driver's real
recorded laps before being saved, reusing the same progress builders
live tracking already uses - the client can only ask for a completion
to be checked and recorded, never supply the outcome itself, so a
driver can't fabricate a completed session (and the reward tied to it)
any more than they could fabricate a lap time.

Both per-driver and club-wide goals can now target "complete N
sessions of one exercise kind" as an alternative to "N laps", sharing
the existing reward/claim mechanism and forms.

Fixes a real bug found while building this: a pre-existing two-argument
wrapper around getTrainingGoalProgress in app.js silently dropped the
new third argument, so every sessions-metric goal displayed 0 progress
regardless of how many sessions were actually completed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 20:43:47 +02:00
larssandandClaude Sonnet 5 01e1165748 lägg till stegträning-övning + v1.3.0
Andra guidade träningsövningen i Open Practice: konfigurera en
stegserie (antal varv + lugnt/kontrollerat/snabbt per steg),
förvalt till klassiska pyramiden. Training-sidan visar aktuellt
steg, kvarvarande varv och en progress-pill per steg. När
sekvensen är klar jämförs de två kontrollerade stegens snitt
neutralt (t.ex. "+0.90s"), utan att kalla en försämring för
trötthet.

syncTrainingLedger sprider nu resten av det normaliserade
training-objektet istället för att lista fält manuellt, så
samma klass av bugg som drabbade Jämna varv inte kan upprepas
för framtida fält.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 09:02:44 +02:00
larssandandClaude Sonnet 5 9122e91f2e 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>
2026-09-09 08:51:50 +02:00
larssand 9e6fe2386d fix sort and obs panels 2026-09-08 13:21:29 +02:00
larssand a2e29b89dd add sorting 2026-09-05 13:50:11 +02:00
larssand 4068cc7c19 add more stats to mobile profile 2026-09-04 16:17:45 +02:00
larssand 1e33e1fffc fix qr code 2026-09-03 20:21:36 +02:00
larssand 2d56b74731 Add local and public QR sharing for training profiles 2026-09-03 20:15:13 +02:00
larssand 4f847610dc Improve training statistics, achievements and stable pace audio 2026-09-03 06:36:17 +02:00
larssand 483a9dbd5a Fix lap limits and five-minute stint statistics 2026-09-02 19:36:25 +02:00
larssand 5366043979 fix stats sida 2026-08-30 14:31:53 +02:00
larssand 694aba5f3d Add motivational training challenges and shared club goals 2026-08-30 09:16:11 +02:00
larssand e5e1754185 add more train stats per driver 2026-08-29 09:56:45 +02:00
larssand 375bfb2416 förbättreing tränings 2026-08-28 21:44:23 +02:00
larssand 0a05f04075 fix tränings statse sidan 2026-08-28 14:12:09 +02:00
larssand a87c64a47c Improve decoder setup UI and add configurable training timers 2026-08-27 17:29:44 +02:00
larssand abf887dccd Split- och depåstatistik är implementerad 2026-08-25 20:00:55 +02:00
larssand 6f02e955a5 Add class-specific driver training profiles and metadata 2026-08-24 22:05:50 +02:00
larssand 3aeb77a042 add stat 2026-08-24 21:28:38 +02:00
larssand 40d0c3fa90 förenklat träningsdelen 2026-08-24 17:16:07 +02:00
larssand 4a74785791 Add secure public driver training profiles 2026-08-24 16:54:35 +02:00
larssand c2ed00861a Add persistent driver training history and progression 2026-08-24 16:06:36 +02:00
larssand de7b4adfe0 "Add Windows installer and driver training rewards" 2026-08-24 14:48:49 +02:00