Revert #13: Add play again for private matches#15
Merged
Ammaar-Alam merged 1 commit intomasterfrom Apr 6, 2026
Merged
Conversation
Member
Author
There was a problem hiding this comment.
Pull request overview
Reverts PR #13 by removing the “Play Again” flow for private matches across server and client, restoring the pre-#13 behavior to avoid shipping the known correctness issues described in the PR description.
Changes:
- Removed the
lobby:playAgainSocket.IO handler on the server. - Removed client-side event handling/state transitions for
lobby:playAgain. - Removed the private-match host “Play Again” UI and the associated navigation behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| server/controllers/socket-handlers.js | Removes the lobby:playAgain server handler and related lobby-migration logic. |
| client/src/pages/Race.jsx | Removes navigation side-effect that redirected players back to the lobby after play-again. |
| client/src/context/RaceContext.jsx | Removes the lobby:playAgain listener and the exported playAgain() action. |
| client/src/components/Results.jsx | Removes the “Play Again” button and stops consuming playAgain from context. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
This reverts #13 (
Add play again for private matches).masteris automatically live, so the safest immediate action is to remove the new private-matchPlay Againflow before shipping a corrected version.Why revert now
The merged implementation introduced correctness issues in the new play-again path:
lobby:playAgainrequests can create multiple replacement lobbies for the same finished matchlobby:playAgainpayloads can throw before the handler reaches its own error pathFollow-up
A replacement PR is being prepared from this revert branch with the fixes above, targeted tests, and explicit links back to #13.
Verification
f7f1a5155ceb37311ca7bbf73d281f621ab28416