fix(chess): board interactive on mobile at game start

The board was non-interactive for participants during pending challenges
on Android because canMakeMoves factored in isPendingChallenge. Desktop
passed isSpectator directly without the pending check, so it worked.

Remove isPendingChallenge from the board interactivity gate to match
Desktop behavior. The header still shows "Challenge Pending" status,
and this also fixes a secondary issue where the isPendingChallenge flag
could get stuck when replaceGameState preserved the old state via its
open-challenge workaround.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
davotoula
2026-03-23 15:27:20 +01:00
parent 306d76f793
commit 2004caa53c
@@ -210,8 +210,9 @@ fun LiveChessGameScreen(
// Use override if provided, otherwise fall back to gameState flag
val isSpectator = isSpectatorOverride ?: gameState.isSpectator
// Pending challenges and spectators cannot make moves
val canMakeMoves = !isSpectator && !gameState.isPendingChallenge
// Spectators cannot make moves; pending challenges still allow board interaction
// (matches Desktop behavior where board is always interactive for participants)
val canMakeMoves = !isSpectator
// Track if game end overlay was dismissed
var gameEndDismissed by remember { mutableStateOf(false) }