Add per-driver live stats for timed practice sessions
This commit is contained in:
@@ -465,6 +465,7 @@ Owns:
|
||||
- fetching only `/public-training/api/:shareToken`
|
||||
- rendering one driver's sanitized statistics, goals, rewards, and daily history
|
||||
- local 20-minute practice timer with 10-minute push/control phases
|
||||
- token-scoped start-age and bounded-window polling for aggregate lap count, best lap, and average during the personal timer; using an age avoids mobile/server clock-skew errors and the bounded window freezes results after the timer finishes
|
||||
- Swedish/English copy selected by `lang` query or browser locale
|
||||
|
||||
Important isolation:
|
||||
@@ -472,6 +473,7 @@ Important isolation:
|
||||
- does not call `/api/state`
|
||||
- does not mutate backend or race state
|
||||
- timer state is stored in the mobile browser under a token-scoped localStorage key
|
||||
- session-window responses contain aggregates only; individual lap rows and timestamps are not exposed
|
||||
|
||||
### `src/public_training.css`
|
||||
Type:
|
||||
@@ -1904,6 +1906,7 @@ Sanitized response fields:
|
||||
- selected driver display name, class, and brand
|
||||
- numeric club rank without other driver names
|
||||
- aggregate totals, best/average time, consistency, controlled streak, and daily summaries
|
||||
- optional `currentSession` aggregates when a valid start age (or backward-compatible recent `since` timestamp) is supplied
|
||||
- next automatic milestone
|
||||
- recommendation level and target lap
|
||||
- selected driver's goal titles, reward text, progress, and claimed state
|
||||
|
||||
Reference in New Issue
Block a user