Fix/restrict guesses to active team#76
Merged
Merged
Conversation
|
the-only-queen-anna
approved these changes
Jun 12, 2026
the-only-queen-anna
left a comment
Collaborator
There was a problem hiding this comment.
Ist getestet, funktioniert einwandfrei. Danke!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Context
This PR fixes the frontend guess permission flow so only the active operative team can select cards and submit guesses.
Description
Operatives can now only select cards when their own team is currently in the operative guessing phase. The guess submission flow now uses the current player’s actual team from the lobby state instead of deriving the team from the current turn.
This prevents players from the inactive team from selecting cards or sending guesses as the active team.
Changes in the code base
Restrict card selection to the active operative team
Pass the current player team into guess submission
Validate guess submission against the active operative turn
Prevent null-team, wrong-team, spymaster-phase, blank-lobby, and empty-position guess submissions
Add ViewModel tests for active-team guess validation and error handling
Add UI test coverage for inactive operatives not being able to select cards
Changes outside the code base
N/A
Additional information
N/A