feat(ux): run sessions from Race Day with quick actions

Race Day gets Start practice, New track layout and Create race, a session
picker, only the buttons that apply, and New practice day (replaces Reset
data on Timing; laps stay in the training stats). Timing is for following
and links to Race Day. The Dashboard shows the three common tasks first.
Guide, READMEs, screenshot and the "Run a session" video follow the flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
larssandandClaude Opus 5.5 committed 2026-10-17 18:32:01 +02:00
1 parent 3a6789f42f
commit c4df90706a
23 files changed
+344 -111

No files matched your search

+20
View File
@@ -164,6 +164,26 @@ async function captureShot(name, { setup }) {
}
const shots = {
"race-day": {
async setup({ evaluate, navigate }) {
// A running Open Practice with a few laps, selected: Race Day as the club evening sees it.
await navigate("dashboard", "#view");
await evaluate(`(async () => {
const { state } = await (await fetch("/api/state")).json();
const startedAt = Date.now() - 25 * 60000;
state.events.push({ id: "shot_op_event", name: "Open Practice", date: new Date().toISOString().slice(0, 10), classId: "", mode: "race", raceConfig: { practiceOnly: true } });
state.sessions.push({ id: "shot_op", eventId: "shot_op_event", name: "Open Practice", type: "open_practice", status: "running", startedAt, durationMin: 600, mode: "race" });
state.activeSessionId = "shot_op";
await fetch("/api/state", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(state) });
})()`);
await navigate("race_day", "#raceDayQuickPractice");
},
},
"overview-active-session": {
async setup({ navigate }) {
await navigate("dashboard", "#dashboardQuickPractice");
},
},
series: {
async setup({ evaluate, navigate, scrollTo }) {
// A series over two of four classes (added out of name order on purpose: the page sorts them).