houserules/packages/chess/e2e
Joey Yakimowich-Payne cc0b7b0446
feat(ui): lobby profile picker integration
Adds a modifier profile picker next to the layout picker in the Lobby, and a header badge in GameView that surfaces the active profile's name.

Lobby:

- New <select data-testid="profile-picker"> loads entries from loadLibrary() on mount and refreshes when the ModifierProfileEditor closes (auto-selecting the most recently updated entry).

- Selecting a saved profile sets the active ModifierProfile; selecting 'Custom…' opens the existing editor modal.

- URL param ?modifierProfile=<b64> decodes + pre-selects even when the profile isn't in the local library, via a synthetic '<name> (from link)' option so the <select> can reflect the choice without collapsing it.

- handleCreate now sends payload.profile when a profile is selected and stashes modifier-profile-name in sessionStorage.

- handleJoin reads profile from the server's room.joined echo so late joiners see the badge on first paint.

GameView:

- New ModifierProfileBadge component mirrors LayoutBadge but reads modifier-profile-name from sessionStorage and uses fuchsia tones so it's visually distinct when both badges are present.

lobby-request.ts:

- OneShotRoomResult exposes the optional profile field the server now echoes (T19).

E2E:

- 2 new Playwright tests: 'create room with profile — badge shows in game' seeds the library via localStorage, selects the profile, creates the room, and asserts the badge text. 'URL pre-select loads profile in picker' base64-encodes a profile into ?modifierProfile= and verifies the picker shows the correct value + 'from link' synthetic label.

All 8 modifier-profiles e2e tests pass; bun run check green (1213/1213 unit tests).
2026-04-18 23:11:11 -06:00
..
full-flow.spec.d.ts Preset refactors for HP 2026-04-17 18:59:11 -06:00
full-flow.spec.d.ts.map Preset refactors for HP 2026-04-17 18:59:11 -06:00
full-flow.spec.js Preset refactors for HP 2026-04-17 18:59:11 -06:00
full-flow.spec.js.map Preset refactors for HP 2026-04-17 18:59:11 -06:00
full-flow.spec.ts test(chess): e2e full-flow scenario; tag Phase 3 (P3.15) 2026-04-16 16:55:28 -06:00
layouts.spec.ts feat(chess): live-sync FEN textarea with board edits in the editor 2026-04-18 20:43:11 -06:00
modifier-profiles.spec.ts feat(ui): lobby profile picker integration 2026-04-18 23:11:11 -06:00
multiplayer.spec.ts feat(chess): drop-target hover indicator + personalized turn banner 2026-04-17 14:41:01 -06:00