Run Plan
The Run Plan is where the engineer commits to a sequence of runs (or laps) before the session: how many runs, what fuel load, which tyre set, who drives, what's the setup change.
Find it at Event → Run Plan. Route: /events/:eventId/run-plan.
Two modes
The view ships with a segmented switch at the top:
| Mode | What it does |
|---|---|
| Run mode | The plan is a list of runs. Each row carries fuel kg, target lap count, target tyre set, driver, average lap time, and a setup-change blurb. |
| Lap mode | The plan is a list of planned laps, flattened across all runs. Useful for short qualifying sessions where each lap might have a different goal (e.g. new push lap, cool down). |
You can switch back and forth without losing data — the underlying storage is keyed by run.
Time breaks and time fillers
Run-mode rows aren't all driving runs. The toolbar exposes:
- Add run — a normal driving stint
- Time break — explicit pit / red-flag interruption
(
PlannedRunKind.timeBreak) - Time filler — open block of session time the team is
reserving but hasn't planned yet
(
PlannedRunKind.timeFiller)
Each row has an Insert below popup that drops a new run / break / filler underneath, in any combination. Time breaks tint red, fillers tint amber, runs are neutral.
Lap markers per row
In Lap mode each row picks a lap marker from the catalogue
(/lap-markers). The marker carries two ratios:
lapTimeRatio— pace multiplier applied to the run's avg lap time (e.g. an out-lap might havelapTimeRatio = 1.20)fuelConsRatio— fuel-burn multiplier (e.g. SC laps might burn0.5×normal)
The dropdown shows both ratios next to the marker name so you can sanity-check what the calculator will do. See Admin → Lap Markers for managing the catalogue.
Live calculator
Every keystroke recomputes an EnrichedRunPlan via
run_plan/calc.dart:
- Per-run start/end offset (relative to session start)
- Per-run total distance, total fuel, total duration
- Plan-wide totals + session-coverage percentage
The same engine runs server-side via
POST /run-plans/calculate (see
API Endpoints) so the API can
return the same enriched shape headlessly — useful for plugins
or integrations.
Print to PDF
The toolbar has a Print PDF button that renders the plan to a
multi-page PDF using the pdf package. The output mirrors the
on-screen grid plus the summary card and is intended for the pit
wall printer / iPad reference.
Summary card
A right-rail card (or a stacked card on narrow screens) shows the session at a glance:
- Session name / type / length
- Track + length
- Plan totals (runs, laps, distance, duration, fuel)
- A coverage bar —
total duration ÷ session length. Goes amber past 90%, red past 100%.
What you can do today
- Build a plan for the active session × car
- Switch between Run mode and Lap mode
- Insert runs, time breaks, time fillers in any order
- Pick lap markers per row in Lap mode (with the ratio inputs visible in the dropdown)
- Print the plan to PDF
- Recalculate via
/run-plans/calculate— same engine as the UI - Reset the whole plan with confirmation
What's coming
- Server persistence — the plan is currently saved to
SharedPreferences (per-device). A
/run-plansREST endpoint is scheduled for the next phase; only/run-plans/calculateis live today. - Plan diffs — show what changed between the last saved and current plan
- Real-time co-editing of the plan (Automerge)
- Plan → Run Sheet auto-linking — once a planned run is on track, the run sheet's run row pre-populates from the plan
- AI assistance — pit-window predictor and stint-length forecaster pre-filling the plan