feat: add cardio PRs for longest distance and fastest pace by range
All checks were successful
CI / update (push) Successful in 2m14s

Track longestDistance and fastestPace PRs for cardio exercises with
activity-specific distance ranges: running (0-3, 3-7, 7-21.1, 21.1-42.2,
42.2+ km), swimming (0-0.4, 0.4-1.5, 1.5-5, 5-10, 10+ km), cycling
(0-15, 15-40, 40-100, 100-200, 200+ km), hiking (0-5, 5-15, 15-30,
30-50, 50+ km), rowing (0-2, 2-5, 5-10, 10-21.1, 21.1+ km).

Shared detection logic in cardioPrRanges.ts used by both session save
and recalculate endpoints. Display support in history detail and workout
completion summary.
This commit is contained in:
2026-03-24 20:41:19 +01:00
parent 81bb3a2428
commit f3a89d2590
6 changed files with 236 additions and 16 deletions

View File

@@ -31,7 +31,7 @@ export interface ICompletedExercise {
export interface IPr {
exerciseId: string;
type: string; // 'est1rm' | 'maxWeight' | 'bestSetVolume' | 'repMax'
type: string; // 'est1rm' | 'maxWeight' | 'bestSetVolume' | 'repMax' | 'longestDistance' | 'fastestPace:<min>:<max>'
value: number;
reps?: number;
}