You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Court names/labels can be customized at game setup on /new, but mid-session there is no way to rename courts. The in-game Edit courts modal (CourtsModal) only changes court count — state.courtNames is never updated after new-game, and rounds always display the current global names (state.courtNames[index] || index + 1).
Organizers often need to relabel courts when rotating groups, when a court becomes unavailable, or when physical court numbers do not match the default 1-based sequence.
In-game (/rounds): Court button opens CourtsModal with count only; labels are read-only.
Display: All rounds (including historical) use the currentstate.courtNames; there is no per-round court-name snapshot (unlike player names in Edit player names (in-game + setup) #31).
Count changes:editCourts updates courts but does not resize or reconcile courtNames.
UX
Where: Extend the existing Edit courts modal on /rounds (and optionally keep /new in sync when returning to setup — already loads state.courtNames).
Control: When customizing, show the same per-court name inputs and quick-set presets as /new.
Toggle: "Customize court names" switch — when off, display defaults (1, 2, 3… by court index).
Save paths:
Rename only (count unchanged): apply immediately — no round regeneration required.
Count changed: existing Redo round / New round flows unchanged; reconcile courtNames length (truncate extras, default-fill new slots).
Validation: Same as setup — non-empty when customizing, no duplicate trimmed names.
Historical rounds
Default: Renaming courts updates labels on all rounds (past and current), since court index → label is a display concern, not match data.
Optional stretch: Per-round court-name snapshot if we later need "Court A was called Court 3 in round 1" — out of scope unless requested.
Acceptance criteria
Court names editable mid-session from the courts modal on /rounds
Summary
Court names/labels can be customized at game setup on
/new, but mid-session there is no way to rename courts. The in-game Edit courts modal (CourtsModal) only changes court count —state.courtNamesis never updated afternew-game, and rounds always display the current global names (state.courtNames[index] || index + 1).Organizers often need to relabel courts when rotating groups, when a court becomes unavailable, or when physical court numbers do not match the default 1-based sequence.
Current behavior
/new): "Customize court names" toggle, per-court inputs, quick-set presets (1,2,3… / evens / odds), validation for empty/duplicate names./rounds): Court button opensCourtsModalwith count only; labels are read-only.state.courtNames; there is no per-round court-name snapshot (unlike player names in Edit player names (in-game + setup) #31).editCourtsupdatescourtsbut does not resize or reconcilecourtNames.UX
/rounds(and optionally keep/newin sync when returning to setup — already loadsstate.courtNames)./new.1,2,3… by court index).courtNameslength (truncate extras, default-fill new slots).Historical rounds
Acceptance criteria
/rounds/new)courtNamesarray length and preserves existing names where possiblelocalStorage)yarn test:ciandyarn buildpassFiles likely touched
src/CourtsModal.tsx— add name editing UIsrc/useShuffler.tsx— new action (e.g.edit-court-names) andeditCourtsreconciliation forcourtNamespages/rounds.tsx— wire modal submit for name-only vs count changespages/new.tsx— optional: extract shared court-name inputs component to avoid duplicationDependencies
none
Related