houserules/packages/chess
Joey Yakimowich-Payne 31af101b55
feat(ui): multi-profile stacking in lobby
T3 Wave 4 (T27). Lobby now supports stacking multiple modifier
profiles for solo play. The primary picker stays single-select for
backwards compatibility with multiplayer create/join (which sends
exactly one ModifierProfile on the wire today); a 'Stacked (solo
only)' list below it lets the user append additional profiles, with
up/down reorder and remove buttons per entry.

State:
- additionalProfiles: ModifierProfile[] holds the stack-on-top
  entries. Empty by default; appears in the UI only when the primary
  picker has a selection.

resetToFreshGame branches:
- 0 or 1 profile total → unchanged single-profile fast path through
  EngineOptions.profile (preserves T1/T2 behaviour exactly).
- 2+ profiles → constructs a profile-less engine, then runs
  applyProfilesToSession across the full ordered stack so additive
  contributions compose correctly across profiles. Sets activeProfile
  to the LAST entry as a UI-display canonical (header badge etc.).

UI:
- Primary picker unchanged.
- profile-stack list with data-testids profile-stack, profile-stack-{i},
  profile-stack-{i}-up/down/remove for e2e access.
- profile-stack-add dropdown filters out already-selected ids.

Multiplayer wire shape unchanged — sending the stack to the server is
a future T27 extension that would touch the protocol.

E2E for the new stacking UI defers to T29; existing 9/9 solo-smoke
+ all 1378 unit tests pass.
2026-04-19 20:22:58 -06:00
..
docs feat(chess): preset-flexibility architecture — decouple HP, damage, piece-types, state, effects 2026-04-18 16:26:17 -06:00
e2e fix(lobby): clear stale MP creds on Play Solo to avoid blank-screen trap 2026-04-19 17:03:21 -06:00
src feat(ui): multi-profile stacking in lobby 2026-04-19 20:22:58 -06:00
tests/fide-games test(chess): replay 5 classic FIDE games; Phase 2 acceptance gate (P2.23) 2026-04-16 15:18:57 -06:00
index.html feat(branding): rename product to Houserules 2026-04-17 15:27:48 -06:00
package.json feat(engine): modifier profile types 2026-04-18 22:05:58 -06:00
README.md chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
RULES.md chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
tsconfig.json test(chess): e2e full-flow scenario; tag Phase 3 (P3.15) 2026-04-16 16:55:28 -06:00
vite.config.ts feat(chess): scaffold Vite + React app (P3.9) 2026-04-16 15:54:32 -06:00
vitest.config.ts chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00

@paratype/chess — custom-rules chess demo