Commit bf6275e
Fix stale isSolo flag leaking into subsequent host/client sessions
After a solo session was disconnected, roomState.isSolo remained true
because clearRoomState() only clears localStorage, and solo mode has
no SocketHost whose destroy() would reset the store. Starting a hosted
room afterwards then used SocketHost._syncRoomState's spread update,
which preserved the stale isSolo flag — causing LobbyView/TimerView
to keep showing the solo badge instead of the room code.
- SocketHost._syncRoomState now explicitly sets isSolo/isSpectator to
false so a host session can never inherit stale flags.
- Disconnect handlers in LobbyView, TimerView, and DisplayView now
reset the roomState store alongside clearRoomState().
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent d08abf5 commit bf6275e
4 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
| |||
0 commit comments