houserules/packages/chess/e2e
Joey Yakimowich-Payne 6e0479703d
fix(lobby): clear stale MP creds on Play Solo to avoid blank-screen trap
If the user played multiplayer earlier in the tab session, room-code,
room-token, and player-color persisted in sessionStorage. Clicking Play
Solo then:

  1. navigate('/game')  — no code param
  2. GameRoute reads sessionStorage, finds stale creds → Case 1
     canonicalises the URL to /game/<stale-code>
  3. MultiplayerGameView mounts, opens a WS to a dead room, handshake
     fails silently → blank white screen with a live URL like
     /game/OSJBJY in the address bar.

Fix: handlePlaySolo explicitly wipes room-code, room-token, player-color,
layout-name, and modifier-profile-name before navigating. The solo path
then goes through GameRoute's Case 2 (no code, no creds) and mounts
GameView cleanly.

Regression test in solo-smoke.spec.ts seeds sessionStorage with stale
MP creds, clicks Play Solo, and asserts:
  - URL settles on /game (not /game/<stale>)
  - No 'mp-joining' placeholder
  - Board renders (e2 pawn visible)
  - All stale keys are wiped from sessionStorage
  - No console errors

Verified the test fails without the fix (Playwright hits the blank
screen / Joining placeholder) and passes with it.
2026-04-19 17:03:21 -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): hide modifier tooltip on pieces with no active modifiers 2026-04-19 16:58:04 -06:00
multiplayer.spec.ts feat(chess): drop-target hover indicator + personalized turn banner 2026-04-17 14:41:01 -06:00
solo-smoke.spec.ts fix(lobby): clear stale MP creds on Play Solo to avoid blank-screen trap 2026-04-19 17:03:21 -06:00