Skip to content

Fix overflow encore, projector clipping, and gone-room board - #2

Merged
willtech3 merged 1 commit into
mainfrom
fix/overflow-reset-projector-board
Aug 14, 2026
Merged

Fix overflow encore, projector clipping, and gone-room board#2
willtech3 merged 1 commit into
mainfrom
fix/overflow-reset-projector-board

Conversation

@willtech3

Copy link
Copy Markdown
Owner

Summary

  • Reset an 80-seat room plus overflow spectators without seating 81 people — extras stay watching so start_game still works; lobby copy no longer promises them a seat.
  • Size projector tiles to the visible wall (and allow the grid to scroll) so 80 names fit on a 720p screen.
  • Close the EventSource on gone so a missing room shows room not found instead of looping on reconnecting….

Test plan

  • npx vitest run test/reducer.test.ts test/redaction.test.ts test/mcp.e2e.test.ts
  • 80 seated + 1 overflow → reset_roomstart_game succeeds; overflow remains a spectator
  • Overflow player's hint / app lobby says the room is full (not “you will be dealt in”)
  • Projector at 1280×720 with 80 players shows every seated name (or scroll to the rest)
  • /room/NOPE/board settles on room not found, not reconnecting…

Made with Cursor

Reset was seating every spectator, so an 80-player room plus one watcher could not start again. The projector hid names at 720p and treated a gone room as a reconnect loop.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb001ab224

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/game/reducer.ts
// Deal spectators in, but never above MAX_PLAYERS — otherwise start_game
// refuses and the encore (the reason we reset) cannot begin. Earliest
// joiners keep seats; overflow stays watching.
const ordered = Object.values(next.players).sort((a, b) => a.joinedSeq - b.joinedSeq);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve occupied seats before promoting spectators

When an overflow spectator joined before a later replacement player, this global joinedSeq sort can eject the replacement on reset. For example, fill the lobby, add an overflow spectator, kick one seated player, let a new player take the free seat, then play and reset: the older spectator is promoted while the newer current player is demoted, even though the spectator hint says a reset keeps them watching while 80 people remain. Prioritize existing non-spectators before filling remaining seats from the spectator queue.

Useful? React with 👍 / 👎.

Comment thread src/app/main.ts
Comment on lines +571 to +572
const status = p.you?.spectator
? 'The lobby is full — you are watching this round.'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Derive the full-lobby message from the seat count

A lobby spectator is not guaranteed to mean the lobby is still full: after an 81st player becomes a spectator, the moderator can kick a seated lobby member, leaving 79 seated while the spectator remains. In that state this branch still tells the spectator that the lobby is full, contradicting both lobbyCount and the new nextStepHint logic and obscuring that a seat is available.

Useful? React with 👍 / 👎.

@willtech3
willtech3 merged commit 7919ae9 into main Aug 14, 2026
2 checks passed
@willtech3
willtech3 deleted the fix/overflow-reset-projector-board branch August 14, 2026 11:46
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.

1 participant