Build the Review Queue chart's actual trace from per-second samples, not lap averages

A lap can span many minutes, so plotting one flat value per lap hid real
within-lap variation -- a single-lap hill repeat rendered as a dead-flat
line despite the pace/HR swinging throughout it. The actual pace/HR trace
now comes from activity_samples (per-second telemetry) when available,
looking up each sample's enclosing lap only for the target band/phase
color. Falls back to the previous lap-stepped rendering when an activity
has no samples.
This commit is contained in:
2026-07-19 15:25:48 +02:00
parent 647757dcab
commit 7f0373f2f3
5 changed files with 117 additions and 36 deletions

View File

@@ -62,6 +62,15 @@ export interface Lap {
RawJSON: string;
}
export interface Sample {
ElapsedSeconds: number;
TimestampMs: number;
HeartRate: number | null;
SpeedMps: number | null;
DistanceM: number | null;
ElevationM: number | null;
}
export interface ActivityListItem extends Activity {
workout_kind_id: number | null;
workout_kind_name: string | null;
@@ -128,6 +137,7 @@ export interface KindAssignment {
export interface ReviewQueueItem extends KindAssignment {
activity: Activity;
laps: Lap[];
samples: Sample[];
}
export interface ProgressionPoint {