Compare commits

...

2 Commits

Author SHA1 Message Date
semantic-release-bot
1fe507bc12 chore(release): 2.12.3 [skip ci]
## [2.12.3](https://github.com/antialias/soroban-abacus-flashcards/compare/v2.12.2...v2.12.3) (2025-10-09)

### Bug Fixes

* always show game control buttons in room-based sessions ([14ba422](14ba422919))
2025-10-09 20:38:16 +00:00
Thomas Hallock
14ba422919 fix: always show game control buttons in room-based sessions
In room-based multiplayer games, force canModifyPlayers=false to ensure
Setup, New Game, and Quit buttons are always visible to all room members.

The arcade session locking mechanism (hasActiveSession) doesn't apply
to room-based games, so we detect rooms via isInRoom and override the
canModifyPlayers logic.

This fixes the issue where some room members saw buttons while others
didn't, depending on their arcade session state.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 15:37:19 -05:00
3 changed files with 23 additions and 8 deletions

View File

@@ -1,3 +1,10 @@
## [2.12.3](https://github.com/antialias/soroban-abacus-flashcards/compare/v2.12.2...v2.12.3) (2025-10-09)
### Bug Fixes
* always show game control buttons in room-based sessions ([14ba422](https://github.com/antialias/soroban-abacus-flashcards/commit/14ba422919abd648e2a134ce167a5e6fd9f84e73))
## [2.12.2](https://github.com/antialias/soroban-abacus-flashcards/compare/v2.12.1...v2.12.2) (2025-10-09)

View File

@@ -4,6 +4,7 @@ import { useRouter } from 'next/navigation'
import { useEffect, useRef } from 'react'
import { PageWithNav } from '@/components/PageWithNav'
import { useArcadeRedirect } from '@/hooks/useArcadeRedirect'
import { useRoomData } from '@/hooks/useRoomData'
import { css } from '../../../../../styled-system/css'
import { StandardGameLayout } from '../../../../components/StandardGameLayout'
import { useFullscreen } from '../../../../contexts/FullscreenContext'
@@ -14,9 +15,13 @@ import { SetupPhase } from './SetupPhase'
export function MemoryPairsGame() {
const router = useRouter()
const { state, exitSession, resetGame } = useMemoryPairs()
const { state, exitSession, resetGame, goToSetup } = useMemoryPairs()
const { setFullscreenElement } = useFullscreen()
const { canModifyPlayers } = useArcadeRedirect({ currentGame: 'matching' })
const { isInRoom } = useRoomData()
const arcadeRedirect = useArcadeRedirect({ currentGame: 'matching' })
// In rooms, always show buttons (canModifyPlayers = false shows buttons)
// In arcade sessions, use normal arcade redirect logic
const canModifyPlayers = isInRoom ? false : arcadeRedirect.canModifyPlayers
const gameRef = useRef<HTMLDivElement>(null)
useEffect(() => {
@@ -37,11 +42,14 @@ export function MemoryPairsGame() {
exitSession()
router.push('/arcade')
}}
onSetup={() => {
// Exit current session and return to arcade (which will redirect to setup)
exitSession()
router.push('/arcade/matching')
}}
onSetup={
goToSetup
? () => {
// Transition to setup phase (will pause game if active)
goToSetup()
}
: undefined
}
onNewGame={() => {
resetGame()
}}

View File

@@ -1,6 +1,6 @@
{
"name": "soroban-monorepo",
"version": "2.12.2",
"version": "2.12.3",
"private": true,
"description": "Beautiful Soroban Flashcard Generator - Monorepo",
"workspaces": [