Skip to content

fix(lobby): MP mode joins existing session before allocating new slug#172

Merged
slabgorb merged 1 commit intodevelopfrom
fix/s4-mp-lobby-join-existing-ui
Apr 26, 2026
Merged

fix(lobby): MP mode joins existing session before allocating new slug#172
slabgorb merged 1 commit intodevelopfrom
fix/s4-mp-lobby-join-existing-ui

Conversation

@slabgorb
Copy link
Copy Markdown
Owner

Summary

Playtest 2026-04-26 S4-UX bug — UI affordance companion to sidequest-server PR #68.

In Multiplayer mode, P2 (on a different host with no shared local Past Journey state) hit "Start Adventure" and was routed to a fresh `-2` slug instead of joining P1's existing table. The server-side fix in PR #68 makes `POST /api/games` join the existing same-slug MP game by default; this UI change signals that intent in the affordance label so users understand that clicking Start in MP mode will join rather than split.

Changes

  • `src/screens/ConnectScreen.tsx` — Start button reads `"Start or Join Adventure"` when `mode === "multiplayer"`, `"Start Adventure"` otherwise. The button click handler is unchanged — the heavy lifting is server-side.
  • `src/screens/tests/ConnectScreen.test.tsx` — 3 new tests covering the solo copy, MP copy, and live mode-toggle behavior.

Why this is minimum-viable

Per architect's recommendation: "For tonight's game, the server-side fix is sufficient and load-bearing. The UI affordance is a quality-of-life improvement that can ship next." The button-text change is the smallest honest signal of the new behavior; a richer "Existing session in progress: [Join]" annotation can ship later without blocking tonight's playtest.

Test plan

  • `npx vitest run src/screens/tests/ConnectScreen.test.tsx` — 28/28 pass (3 new + 25 existing)
  • `npx eslint src/screens/ConnectScreen.tsx src/screens/tests/ConnectScreen.test.tsx` — clean
  • Live verification: open lobby, switch to Multiplayer mode, observe button reads "Start or Join Adventure".

Related

🤖 Generated with Claude Code

Playtest 2026-04-26 S4-UX bug: P2 (different host, no shared local
Past Journey state) hit "Start Adventure" in Multiplayer mode and was
routed to a fresh ``-2`` slug instead of joining P1's existing table.
The companion server fix (sidequest-server
fix/s4-mp-lobby-join-existing-server) makes POST /api/games join the
existing same-slug MP game by default — this UI change signals that
intent in the affordance label so users on a second host understand
that clicking Start joins rather than splits.

Cosmetic-only: the button still calls handleStart unchanged. The
heavy lifting is server-side; this is the QoL signal the architect
specified as the minimum-viable UI affordance.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@slabgorb slabgorb merged commit e288111 into develop Apr 26, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant