docs: stint cards, Standard/Pro mobile view and overlay live marks

This commit is contained in:
larssand committed 2026-11-10 10:27:17 +01:00
1 parent f1a80a0724
commit 3e78db9156
3 files changed
+33 -1

No files matched your search

+25 -1
View File
@@ -488,6 +488,28 @@ Owns:
- side panels
- overlay leaderboard rows
### `src/overlay_live_marks.js`
Type:
- pure overlay live-mark state and markup
Owns:
- detecting a new passing, split, pit entry and pit exit per row between renders, on the client clock
- passing flash class with a negative animation delay so re-renders continue the animation
- pit badge (fuel icon, ticking clock, then stop time for 5 s) and split chip (4 s, ± delta)
- `refreshLiveMarkNodes()` for the 250 ms overlay tick: updates pit clocks and removes expired marks without a re-render
- the shared `overlayLiveMarks` instance used by `src/overlays.js`
### `src/stint_laps_view.js`
Type:
- pure stint lap-card renderer
Owns:
- per-lap rows: stint best (green), day best (purple), slow (>115% of median), out lap after a break
- fold-out `<details>` cards with laps, best, average, total time and spread
- keeping open cards open across re-renders (`openStintLapCardIds`)
Used by `src/training_views.js`. `src/public_training.js` holds an inlined copy (the public page must load as one file through the router allowlist); `tests/stint_laps_view.test.js` checks that the two render identically.
### `src/session_replay.js`
Type:
- pure transient replay logic
@@ -747,11 +769,13 @@ Type:
Owns:
- fetching profile data from `GET /public-training/api/:shareToken`
- posting only class-scoped setup markers to `POST /public-training/api/:shareToken/markers`
- rendering one person's sanitized statistics, pace chart, recent stints, goals, rewards, and daily history with a class selector
- rendering one person's sanitized statistics, pace chart, recent stints with per-lap times, goals, rewards, and daily history with a class selector
- hiding optional sections according to the server-provided share visibility map
- switching between class-specific statistics without combining lap performance across classes
- 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
- Standard / Pro mode (`?mode=pro`, remembered in `localStorage` key `rcPublicTrainingMode`); Pro shows only today's practice numbers and the fold-out stint cards
- an inlined copy of `src/stint_laps_view.js` between the marked copy comments; the file must have no imports
- Swedish/English copy selected by `lang` query or browser locale
Important isolation: