add more stats to mobile profile

This commit is contained in:
larssand
2026-09-04 16:17:45 +02:00
parent 142c45be04
commit 4068cc7c19
13 changed files with 267 additions and 22 deletions

View File

@@ -194,6 +194,8 @@ Owns:
- profile resolution across several race-specific driver records
- strict per-class lap filtering and aggregate statistics
- sanitized branding plus class-specific goals and recommendation response
- server-side visibility filtering for progress, achievements, performance/stints, goals, and history
- bounded class-specific pace history and recent stint summaries for the mobile profile
- clock-skew-safe personal timer start/window normalization
- bounded current-session lap, best-lap, and average calculations
@@ -611,6 +613,7 @@ Owns:
Mutations:
- replaces or appends entries in `state.training.goals`
- creates, rotates, enables, or disables entries in `state.training.shares`
- persists per-share visibility for development, achievements, performance/stints, goals, and history
- creates and removes entries in `state.training.markers`
- replaces or clears `state.training.clubGoal`
- always calls injected `saveState()` before rerender
@@ -637,7 +640,8 @@ Type:
Owns:
- fetching only `/public-training/api/:shareToken`
- rendering one person's sanitized statistics, goals, rewards, and daily history with a class selector
- rendering one person's sanitized statistics, pace chart, recent stints, 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
@@ -656,7 +660,7 @@ Type:
Owns:
- phone-first layout independent from the admin sidebar/theme system
- profile, level, timer, goals, and daily-history presentation
- profile, level, timer, pace chart, collapsible stint details, goals, and daily-history presentation
## 3. Direct Import Dependencies
@@ -1859,7 +1863,7 @@ This bucket is the most dynamic part of state and is mutated heavily during live
{
goals: TrainingGoal[],
ledger: TrainingLap[],
shares: TrainingShare[],
shares: TrainingShare[], // includes per-link public section visibility
markers: TrainingMarker[],
clubGoal: TrainingClubGoal | null
}
@@ -2312,7 +2316,8 @@ Sanitized response fields:
- selected person's display name plus linked class names and brands
- one `classProfiles` entry per linked class; no cross-class performance aggregate is emitted
- no club rank or other driver names; the public profile focuses on personal development
- class-specific totals, best/average time, consistency, controlled streak, stints, best-three, five-minute result, and daily summaries
- class-specific totals plus optional pace history, achievements, stint summaries, best-three, five-minute result, goals, and daily summaries
- optional detail sections are omitted server-side according to the share visibility map; core lap/day/best/consistency totals remain visible
- optional class-specific `currentSession` aggregates when a valid start age (or backward-compatible recent `since` timestamp) is supplied
- class-specific next automatic milestone, recommendation level, target lap, goals, and reward progress
- public club branding and safe PNG/JPEG/WebP logo data