theme_guess/frontend
Gabriel Franco 42d1732816 fix(frontend): scope player identity to a tab, not the browser
Two tabs of the same browser share localStorage, so both got the same
persisted playerId and stepped on each other: matchmaking's waiting
queue is keyed by playerId and dedupes a second queue:join as a no-op,
so two tabs searching never both count as waiting; and re-identifying
with the same playerId hijacks the ws registry's socket binding, tearing
down the first tab's connection (surfacing as room:join replying 'room
already has two players' once its creator's socket is dead).

Move playerId/name from localStorage to sessionStorage: still stable
across reloads within a tab (reconnect-by-refresh keeps the same
identity), but each new tab gets a fresh UUID, so two tabs of one
browser behave like two separate players. Not IP-related; no such
restriction existed.
2026-09-13 19:52:32 -03:00
..
src fix(frontend): scope player identity to a tab, not the browser 2026-09-13 19:52:32 -03:00
.env.example feat(frontend): add WebSocket client service with identity and typed messages 2026-09-10 11:54:48 -03:00
index.html fix(frontend): drop Change Theme button, stop pre-selecting last theme 2026-09-13 19:35:37 -03:00
package-lock.json refactor(frontend): move to frontend/, port to Vite + TypeScript 2026-09-10 10:37:44 -03:00
package.json refactor(frontend): move to frontend/, port to Vite + TypeScript 2026-09-10 10:37:44 -03:00
tsconfig.json refactor(frontend): move to frontend/, port to Vite + TypeScript 2026-09-10 10:37:44 -03:00
vite.config.ts refactor(frontend): move to frontend/, port to Vite + TypeScript 2026-09-10 10:37:44 -03:00