Give the cadence line the gap its siblings have

Every other paragraph in that stack carries an mt-*; this one did not, so
"every 2 weeks" sat flush against the bottom of the window table with no
gap. Static-markup tests assert on content, not spacing, so nothing caught
it — the Task 10 review did, by reading the surrounding rhythm.

Reading cadenceLabel once into a local rather than calling it at both the
guard and the render also drops the non-null assertion the second call
needed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Lucas Winther
2026-08-28 05:04:39 +02:00
co-authored by Claude Opus 5
parent c93f85fb6d
commit 14b221a627
+5 -2
View File
@@ -86,6 +86,9 @@ export function EventDetail({
const game = gameMeta(event.game);
const heat = URGENCY_COLOR[clock.urgency];
const risk = status === "done" ? "fine" : pressure(effort, clock.msRemaining);
// Read once rather than at both the guard and the render: calling it twice
// was what forced the non-null assertion below it.
const cadence = cadenceLabel(own?.record.repeat ?? null);
useEffect(() => {
const onKey = (e: KeyboardEvent) => {
@@ -160,8 +163,8 @@ export function EventDetail({
<Field label="Type">{event.type}</Field>
</dl>
{cadenceLabel(own?.record.repeat ?? null) !== null && (
<p className="text-xs text-faint">{cadenceLabel(own!.record.repeat)}</p>
{cadence !== null && (
<p className="mt-2 text-xs text-faint">{cadence}</p>
)}
{risk !== "fine" && effort !== undefined && clock.msRemaining !== null && (