fix(training): keep practice laps in training stats after Reset data

Resetting a running Open Practice deleted its results, the Timing view
recreated an empty result at once, and the next save rebuilt that
session's training laps from nothing - wiping every earlier lap from
the drivers' stats. Reset now syncs first and records resultsResetAt;
laps from before it are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
larssand
2026-10-03 23:13:58 +02:00
parent 8b63dd2372
commit 3cc4fa0845
10 changed files with 141 additions and 7 deletions

View File

@@ -11,6 +11,7 @@ import { runAuthSmoke } from "./browser_auth.js";
import { runTtsSettingsSmoke } from "./browser_tts_settings.js";
import { runTrackLayoutsSmoke } from "./browser_track_layouts.js";
import { runPrologueSmoke } from "./browser_prologue.js";
import { runPracticeResetSmoke } from "./browser_practice_reset.js";
import { runObsPopupSmoke } from "./browser_obs_popup.js";
import { runDecoderReconnectSmoke } from "./browser_decoder_reconnect.js";
import assert from "node:assert/strict";
@@ -152,6 +153,7 @@ try {
await runTtsSettingsSmoke({ evaluate, navigate, savedState, waitFor });
await runTrackLayoutsSmoke({ evaluate, navigate, savedState, waitFor, base, dialogs });
await runPrologueSmoke({ evaluate, navigate, savedState, waitFor, base, dialogs });
await runPracticeResetSmoke({ evaluate, navigate, savedState, waitFor, base, dialogs });
await runRaceDaySmoke({ evaluate, navigate, fill, savedState, waitFor, pause, base, dialogs });
await runRaceDayStartSequencesSmoke({ evaluate, navigate, waitFor, pause, base, dialogs });
await runObsPopupSmoke({ evaluate, navigate, fill, savedState, waitFor, pause, base, debugPort, dialogs, realClick });