Turns the reporter from a live-only, single-run curiosity into a
persistent, per-project, per-rundown history of runs.
- Extend OntimeEventReport with a schedule snapshot (scheduledStart,
scheduledDuration) taken when an event starts, plus playCount. Reports
are now a record that survives later rundown edits, rather than a live
join against the current rundown.
- Add a run lifecycle: a run opens on the first event start and closes on
a full stop, archiving the previous run to history so the next start
begins fresh.
- Persist runs to a per-project sidecar file (services/report-service),
patterned on the existing restore-service, so a crash or restart no
longer loses the whole show's record. Runs are scoped by rundownId for
multi-rundown projects, cascade-deleted with their rundown or project,
renamed alongside a project rename, and deliberately not copied when a
project is duplicated.
- Extract the over/under/on-time variance and run summary maths shared by
the rundown chip, the report settings panel, and the server into
ontime-utils (getEventVariance, getRunSummary, countPlannedEvents).
- Extend the report API with run history endpoints (list, get, latest,
rename, delete) while keeping GET /report's existing shape so Companion
and HTTP automations are unaffected.
- Replace the settings report table with a run browser: a list of runs
with a rundown filter, inline rename, delete, and a detail view with
per-run summary stats and CSV export.
- Add a third, muted state to the rundown event chip: an event with
nothing in the current run yet previews how it went last time.
Fixes a real bug found while testing the new store: emptyStore() was a
shared object, so its runs array leaked mutations across project loads.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019nr3FbLbM8gB8Jm771YgTV
* fix: issue where a count-to-end would lead to incorrect expected times
* fix: include add time in overtime when countToEnd
* fix: ui and server use same calculation for expected end
* feat: update auto cue numbering
* feat: renumber from ui
* refactor: patchEntries is not used
* chore: format
* fix: correct cue at top of group
* fix: handle precision
* refactor dialog
* bump limit for performance time test
* extract type
* add class name to lable
* fix rebase
* refator: extract renumering logic
* chore: comments for getIntegerAndFraction function
* chore: add the for renumber mutation
* fix: fraction match precision
* refactor: small cleanup
* refactor: use more narrow validator
---------
Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
* chore: migrate eslint to oxlint
* chore: migrate prettier to oxfmt
* chore: migrate typescript
* chore: toThrow should have a expected value
* chore: cast test value as Day
* chore: small title fix
* chore: mocks should be hoisted
* chore: incorrect async useage
* chore: test should be inside description
* chore: test sohuld include an expeced
* chore: oxfmt
---------
Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
* feat: add group start time to state
* refactor: calculate expected times when offset mode changes
* feat: show relative data in ui
* fixup! feat: add group start time to state
* fixup! refactor: calculate expected times when offset mode changes
* fixup! feat: show relative data in ui
* try to handle multiday
* show planed/expected rundown end day offset values
* refactor: style tweaks to timers
* refactor: cleanup data use
* day offset
* update tests
* test getExpectedStart multiday
* write start epoch to restore file
* current day in relative mode
* remove todo
* move find day offset to utils
---------
Co-authored-by: arc-alex <ac@omnivox.dk>
* refactor: runtime types
* refactor: runtimeState functions to use the split type
* refactor: RuntimeService to use the new split data
* refactor: use the split data in the UI
* update comments
* refactor: rename runtime to offset
* fix utils test
* refactor: split event data and state data
* refactor: calculate the start time insted of until
* cleanup
* send next flag expected start from server
* refactor: render
* fix test
* use same icon
* refactor: group duration
* Optimize (#1711)
* refactor: consolidate block, flag and end loading and expected times
* work on test
* cal end value
* lint
* fix test
* remove todo