Skip to content

Fix bonus answer box opening for all players in multiplayer#460

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-answer-box-multiplayer-bonuses
Closed

Fix bonus answer box opening for all players in multiplayer#460
Copilot wants to merge 2 commits intomainfrom
copilot/fix-answer-box-multiplayer-bonuses

Conversation

Copy link
Contributor

Copilot AI commented Mar 8, 2026

When bonuses are enabled in multiplayer, clicking "Reveal" to start the bonus answer phase showed the answer input box to all connected players instead of only those on the eligible team.

Root Cause

BonusClient.startBonusAnswer unconditionally removes d-none from the answer input group. The multiplayer client had no override to restrict this to eligible players.

Fix

Override startBonusAnswer in MultiplayerTossupBonusClient to hide the answer box for players not on the bonus-eligible team:

startBonusAnswer (data) {
  super.startBonusAnswer(data);
  const myTeamId = this.room.players[this.USER_ID]?.teamId;
  if (myTeamId !== undefined && myTeamId !== this.room.bonusEligibleTeamId) {
    document.getElementById('answer-input-group').classList.add('d-none');
  }
}

This mirrors the existing pattern used for tossup buzzes, where the answer box is already gated behind userId === this.USER_ID.

Original prompt

This section details on the original issue you should resolve

<issue_title>answer box opens for all players when bonuses are enabled in multiplayer</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…tiplayer

Co-authored-by: geoffrey-wu <42471355+geoffrey-wu@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix answer box opening for all players when bonuses are enabled Fix bonus answer box opening for all players in multiplayer Mar 8, 2026
@geoffrey-wu geoffrey-wu closed this Mar 9, 2026
@geoffrey-wu geoffrey-wu deleted the copilot/fix-answer-box-multiplayer-bonuses branch March 9, 2026 04:12
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.

answer box opens for all players when bonuses are enabled in multiplayer

2 participants