houserules/packages/chess/src
Joey Yakimowich-Payne bd20032767
feat(ui): group RulesDrawer presets by category + layout suggested-rules chips
Phase F.3 + F.2-UI of the rule-variants epic.

Preset metadata:
  - Added optional `category: 'king' | 'objective' | 'movement' |
    'multi-move' | 'pieces' | 'misc'` on PresetDef (registry.ts).
    Defaults to 'misc' when omitted.
  - Categorized all 28 registered presets:
    * King Variants: knightmate-rules, coregal, dual-king,
      weak-dual-king.
    * Objectives: capture-to-win, last-piece-standing,
      first-promotion-wins, suicide-chess, capture-all,
      extinction-chess.
    * Movement: pawns-move-backward, double-pawn-sprint,
      pawn-diagonal-no-capture, knights-leap-twice,
      bishops-ignore-color, rook-warp, wrap-board,
      berolina-pawns(+2), bouncing-pieces(+2), queen-splits.
    * Multi-move: double-move, monster-rules.
    * Pieces: piece-hp, king-heals, explosive-rook,
      knight-immunity, poisoned-squares.

UI:
  - RulesDrawer.tsx renders presets in category sections with
    sentence-case headers ('King Variants', 'Objectives',
    'Movement', 'Multi-move', 'Pieces', 'Misc'). Empty sections
    hidden. Each section has data-testid='rules-category-<id>' for
    e2e addressability. Existing search / scope / duration controls
    preserved.
  - LayoutPicker.tsx renders a 'Suggested rules' chip group under
    each layout with suggestedPresets.length > 0. Chips toggle
    presets on/off. Active = filled (neutral-800), inactive =
    ghost (neutral-100). data-testid='layout-suggested-preset-<id>'
    on each chip.
  - Lobby.tsx wires activations + setPresets props to LayoutPicker
    so chip toggles flow into the host-game payload
    (rulesetIds array).

Tests: 1651 passing (unchanged — pure UI metadata).
2026-04-21 09:19:38 -06:00
..
app fix(chess): use ref-based guard for shared-link auto-join to prevent StrictMode double-join 2026-04-18 16:26:35 -06:00
assets fix(chess): cylindrical board wraps every piece, plus eliminate piece image flash 2026-04-17 15:17:57 -06:00
hooks feat(ui): share custom modifier with multiplayer room — closes T29 fixmes 2026-04-19 21:56:34 -06:00
layouts test(layouts): suggestedPresets references must resolve to registered presets 2026-04-21 09:04:54 -06:00
modifiers fix(modifiers): close client schema/server schema drift + add parity test (Q4.2) 2026-04-20 17:53:22 -06:00
net fix(net): sync customModifiers to late-joiners + reconnects in game.state 2026-04-20 16:58:48 -06:00
persist feat(chess): custom-layout editor + saved library (Phase E) 2026-04-18 20:20:41 -06:00
presets feat(ui): group RulesDrawer presets by category + layout suggested-rules chips 2026-04-21 09:19:38 -06:00
rules feat(engine): getRoyalPieces hook + engine royal dispatch 2026-04-20 20:04:29 -06:00
ui feat(ui): group RulesDrawer presets by category + layout suggested-rules chips 2026-04-21 09:19:38 -06:00
audio.ts feat(chess): polish UI with SVG pieces, motion animations, sound, and confetti 2026-04-17 12:04:56 -06:00
coord.test.ts feat(chess): add coordinate + color helpers (P2.7) 2026-04-16 14:47:04 -06:00
coord.ts feat(chess): add coordinate + color helpers (P2.7) 2026-04-16 14:47:04 -06:00
engine-presets.test.ts feat(chess): starting-layout foundation (Phase A) 2026-04-18 19:44:01 -06:00
engine.ts fix(engine): onCheckGameResult 'ongoing' suppresses defaults without short-circuit 2026-04-21 07:32:00 -06:00
index.ts fix(modifiers): close client schema/server schema drift + add parity test (Q4.2) 2026-04-20 17:53:22 -06:00
pgn.ts test(chess): replay 5 classic FIDE games; Phase 2 acceptance gate (P2.23) 2026-04-16 15:18:57 -06:00
schema.test.ts feat(chess): add attribute schema and piece fact shape (P2.5) 2026-04-16 14:46:27 -06:00
schema.ts feat(engine): shouldAdvanceTurn hook + HalfMovesThisTurn fact 2026-04-20 20:13:51 -06:00
starting-position.test.ts feat(engine): shouldAdvanceTurn hook + HalfMovesThisTurn fact 2026-04-20 20:13:51 -06:00
starting-position.ts feat(engine): shouldAdvanceTurn hook + HalfMovesThisTurn fact 2026-04-20 20:13:51 -06:00
vite-env.d.ts feat(chess): polish UI with SVG pieces, motion animations, sound, and confetti 2026-04-17 12:04:56 -06:00