feat(training): fold-out practice stints with every lap time on Training and the driver's page (1.86.0)

This commit is contained in:
larssand committed 2026-11-09 22:31:52 +01:00
1 parent 3870510d8c
commit 73e1c0ccf3
16 files changed
+224 -5

No files matched your search

+2
View File
@@ -678,6 +678,8 @@ function buildPublicTrainingStats(allLaps, layoutLaps = allLaps) {
number: index + 1, startedAt, lapCount: stint.laps.length,
bestLapMs: values.length ? Math.min(...values) : 0, averageLapMs: average(values),
durationMs: Math.max(0, endedAt - startedAt),
// Lap times only (no timestamps) for the fold-out list on the driver's page.
laps: stint.laps.slice(0, 300).map((lap) => ({ lapMs: lap.lapMs, excluded: Boolean(lap.excludedFromPace) })),
};
}).sort((left, right) => right.startedAt - left.startedAt).slice(0, 8);