fix(rithmomachia): show guest-friendly message when they can't fix too many players

When a room guest sees "too many players" but has no actions they can take:
- No local players to deactivate
- Not the host (can't kick/deactivate remote players)

**Before:** Generic message "Deactivate or kick extras:" with no buttons

**After:** Clear waiting message "Waiting for the room host to deactivate or remove extras..."

This sets proper expectations for guests who need to wait for the host to resolve the roster issue.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock 2025-10-30 07:18:52 -05:00
parent f401f22075
commit 54bfd2fac8
1 changed files with 14 additions and 2 deletions

View File

@ -259,10 +259,22 @@ function useRosterWarning(phase: 'setup' | 'playing'): RosterWarning | undefined
}) })
} }
// If guest has no actions available, show waiting message
if (actions.length === 0 && !isHost) {
return {
heading: 'Too many active players',
description:
'Rithmomachia supports only two active players. Waiting for the room host to deactivate or remove extras...',
}
}
return { return {
heading: 'Too many active players', heading: 'Too many active players',
description: 'Rithmomachia supports only two active players. Deactivate or kick extras:', description:
actions, actions.length > 0
? 'Rithmomachia supports only two active players. Deactivate or kick extras:'
: 'Rithmomachia supports only two active players.',
actions: actions.length > 0 ? actions : undefined,
} }
} }