Phase 5: control room with direct scoring, bonuses and shortcuts

- /admin/events/[eventId]/live: game list with status, previous/next,
  mark done/reopen, scoring grid, standings, and bonus/penalty with undo.
- Scores autosave per cell with optimistic UI; the validate_score trigger
  and RLS do the checking so a save costs one DB round trip.
- BlockInput and NumberStepper are shared UI, ready for the judge page.
- buildLiveView shapes all data on the server from the scoring engine, so
  the client components contain no score math.
- N / P switch games, ? shows shortcut help.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 14:48:41 +02:00
co-authored by Claude Opus 5.5
parent 17eb76d036
commit f7122b193c
12 changed files with 1091 additions and 4 deletions
+4 -1
View File
@@ -19,13 +19,16 @@ export default async function EventSetupPage(props: PageProps<"/admin/events/[ev
const { event, teams, games } = setup;
return (
<div className="flex flex-col gap-8">
<div className="mx-auto flex max-w-5xl flex-col gap-8">
<div>
<Link href="/admin" className="text-sm underline underline-offset-4">
← All game nights
</Link>
<div className="mt-1 flex flex-wrap items-center justify-between gap-3">
<h1 className="font-display text-4xl font-bold">{event.name}</h1>
<Link href={`/admin/events/${event.id}/live`} className={`${buttonClass("primary")} ml-auto`}>
Control room
</Link>
<a
href={`/s/${event.scoreboard_token}`}
target="_blank"