Skip to content

Add Leave Game button with confirmation prompt#215

Merged
aaylward merged 1 commit into
mainfrom
golf-leave-game
Apr 12, 2026
Merged

Add Leave Game button with confirmation prompt#215
aaylward merged 1 commit into
mainfrom
golf-leave-game

Conversation

@aaylward
Copy link
Copy Markdown
Contributor

Summary

  • Wire leaveGame through plugin → adapter → hook → component so the server is notified when a player leaves
  • Add button in game header that opens an inline "Leave this game? [Leave] [Stay]" confirmation
  • Waiting room has a direct "Leave Game" link (no confirmation needed, game hasn't started)
  • "Back to Room" on ended screen now notifies the server via leaveGame instead of only clearing local state
  • Compact mobile game header: room title + player chips in a single row, reduced padding/margins

Test plan

  • Verify button shows confirmation bar, "Stay" dismisses, "Leave" exits to room
  • Verify "Leave Game" in waiting room returns to room without confirmation
  • Verify "Back to Room" on ended screen notifies server
  • Verify mobile layout is compact single-row header
  • Typecheck and all 214 tests pass

Closes #211

Depends on muchq/MoonBase#1151 for the backend handler.

Wire leaveGame through plugin/adapter/hook so the server is notified
when a player leaves. Add a confirmation prompt during active play to
prevent accidental exits. Compact the mobile game header into a single
row to save vertical space.

Fixes #211
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 12, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
muchq 6309615 Commit Preview URL

Branch Preview URL
Apr 12 2026, 05:12 PM

@aaylward aaylward merged commit 9b9dca6 into main Apr 12, 2026
2 checks passed
@aaylward aaylward deleted the golf-leave-game branch April 12, 2026 17:32
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.

Golf: add Leave Game button and wire up leaveGame message

1 participant