feat(report): tie events to their group, split running time from finishing time

Three changes from reviewing the panel against a real run.

Events are bracketed by the group they belong to. A coloured rail in the
group's own colour runs down the heading and every event under it, closed
by a foot where the group ends. This is the shape the rundown editor
already uses for a group, so the report reads with the same grammar as
the rundown it reports on, and an event can no longer be mistaken for
belonging to the group above it.

The show summary no longer reduces the run to one figure. Finishing time
and running time answer different questions and can point opposite ways:
a show which starts early and runs over still finishes early, and calling
that a single "total plan deviation" reported it as having come in under
when it had in fact overrun. The two are now separate: the headline is
the show against its planned duration, which is what the team controls
and what carries into the next run of the same rundown, and the finishing
time sits beside it as its own row alongside the start it inherited.
ShowOffsets gains plannedDuration, actualDuration and durationOffset,
replacing duringShow, which was the same figure under a name that
described neither.

Nothing is forced into upper case any more. The summary labels are
sentence case, and event rows carry their values in td rather than th:
the panel's th styling is meant for column headings, so every event
title in the report was being rendered small, bold and shouting.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019nr3FbLbM8gB8Jm771YgTV
This commit is contained in:
Claude
2026-08-26 05:43:48 +00:00
parent d2f2cc0bff
commit ef472b513a
10 changed files with 219 additions and 132 deletions
@@ -29,19 +29,28 @@ export type ShowReport = {
};
/**
* How the show sat against its plan.
* How the show sat against its plan, as the two separate questions it answers.
*
* Follows Ontime's offset convention: positive means behind schedule.
* `duringShow` separates a late start from a badly run show, which have
* different causes and different remedies.
*
* `endOffset` asks whether the show came off air when it promised to, which is
* what an audience or a venue booking is measured against. `durationOffset`
* asks whether the show itself ran long, which is what the team controls and
* what carries over to the next run of the same rundown. They differ by
* exactly `startOffset`: a show can run over and still finish early if it
* started early, so reporting either one alone is misleading.
*/
export type ShowOffsets = {
/** actual start against planned start */
startOffset: MaybeNumber;
/** actual end against planned end */
endOffset: MaybeNumber;
/** time lost (positive) or recovered (negative) between start and end */
duringShow: MaybeNumber;
/** how long the show was planned to take */
plannedDuration: MaybeNumber;
/** how long it actually took */
actualDuration: MaybeNumber;
/** actualDuration against plannedDuration, ie whether the show ran long */
durationOffset: MaybeNumber;
};
/**