Skip to content

Fix/restrict clues to active spymaster#78

Merged
tasaje1 merged 5 commits into
developmentfrom
fix/restrict-clues-to-active-spymaster
Jun 12, 2026
Merged

Fix/restrict clues to active spymaster#78
tasaje1 merged 5 commits into
developmentfrom
fix/restrict-clues-to-active-spymaster

Conversation

@tasaje1

@tasaje1 tasaje1 commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Context

This PR fixes the frontend clue submission flow so only the active team’s spymaster can enter and send clues.

Description

Spymasters can now only access the clue input when their own team is currently in the spymaster phase. The inactive spymaster still sees the current clue like other players, but cannot enter or submit a new clue.

The clue 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 a spymaster from the wrong team from submitting a clue as the active team through the normal frontend flow.

Changes in the code base

Restrict clue input visibility to the active spymaster
Show the current clue to inactive spymasters instead of the clue input
Pass the current player team into clue submission
Validate clue submission against the active spymaster turn
Add ViewModel tests for active-spymaster clue validation and error handling
Add UI test coverage for inactive spymasters not being able to enter clues
Remove unused game connection parameters from the frontend ViewModel flow

Changes outside the code base
N/A

Additional information
N/A

Screenshot 2026-06-12 at 12 55 51 Screenshot 2026-06-12 at 12 56 41

@sonarqubecloud

Copy link
Copy Markdown

@the-only-queen-anna the-only-queen-anna left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ist getestet und funktioniert. eventuell das Hint: ausblenden, wenn kein Hint gegeben wurde ? Ebenfalls das Guesses oben, würde vllt sauberer aussehen, aber kein Muss

@tasaje1

tasaje1 commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

Ist getestet und funktioniert. eventuell das Hint: ausblenden, wenn kein Hint gegeben wurde ? Ebenfalls das Guesses oben, würde vllt sauberer aussehen, aber kein Muss

Guesses würd ich fix drinnenlassen, Spymaster sollen auch live sehen wie viele guesses noch übrig sind usw. Bei Hint: weiß ich es nicht ganz weil wenn ein Clue reinkommt kommt dann ja auch Hint: das signalisiert ja auch ok ein Clue ist noch nicht reingekommen..

@tasaje1 tasaje1 merged commit 631e8ad into development Jun 12, 2026
2 checks passed
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.

2 participants