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:
1 parent
3a6789f42f
commit
c4df90706a
23 files changed
+344
-111
No files matched your search
@@ -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).
|
||||
|
||||
@@ -510,26 +510,44 @@ const clips = {
|
||||
await waitFor(async () => (await evaluate('document.getElementById("raceDayStart")?.disabled')) === false, "start enabled once preflight is ready");
|
||||
},
|
||||
steps: [
|
||||
{ text: "This is Race Day, your control center for running a session live." },
|
||||
{ text: "This is Race Day, where every session is run. Practice, a new track layout and new races are one click away at the top." },
|
||||
{
|
||||
text: "Hit Start, and RaceCore runs a countdown before the green light.",
|
||||
async action({ click }) { await click("#raceDayStart"); },
|
||||
text: "Pick a count-down - here thirty seconds - and press Start. The track opens and the announcer calls the time.",
|
||||
async action({ evaluate, click }) {
|
||||
await evaluate(`document.getElementById("raceDayPrologueLength").value = "30"`);
|
||||
await click("#raceDayStart");
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Cars on the grid? Jump to the last ten seconds, or hold the count-down while they line up.",
|
||||
async action({ click }) { await click('[data-prologue="to10"]'); },
|
||||
},
|
||||
{
|
||||
text: "At three seconds the start lights take over, and the heat starts by itself.",
|
||||
async action({ evaluate }) {
|
||||
await waitFor(async () => Boolean(await evaluate('document.getElementById("raceDayPause")')), "heat running", 20000);
|
||||
},
|
||||
},
|
||||
{ text: "Start lights count down, then the session goes live and the clock starts." },
|
||||
{
|
||||
text: "Pause any time - lap timing stops without losing the session.",
|
||||
async action({ click }) { await click("#raceDayPause"); },
|
||||
},
|
||||
{
|
||||
text: "Resume picks up right where you left off.",
|
||||
async action({ click }) { await click("#raceDayResume"); },
|
||||
async action({ evaluate, click }) {
|
||||
await waitFor(async () => Boolean(await evaluate('document.getElementById("raceDayResume")')), "paused");
|
||||
await click("#raceDayResume");
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "And Finish locks in the results for this session.",
|
||||
async action({ click }) { await click("#raceDayFinish"); },
|
||||
async action({ evaluate, click }) {
|
||||
await waitFor(async () => Boolean(await evaluate('document.getElementById("raceDayFinish")')), "running again");
|
||||
await click("#raceDayFinish");
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Head over to Timing to see the leaderboard and lap-by-lap results.",
|
||||
text: "Timing is for following: the leaderboard and lap-by-lap results.",
|
||||
async action({ click }) { await click("#raceDayTiming"); },
|
||||
},
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user