Skip to content

Revert #13: Add play again for private matches#15

Merged
Ammaar-Alam merged 1 commit intomasterfrom
revert-pr-13
Apr 6, 2026
Merged

Revert #13: Add play again for private matches#15
Ammaar-Alam merged 1 commit intomasterfrom
revert-pr-13

Conversation

@Ammaar-Alam
Copy link
Copy Markdown
Member

Summary

This reverts #13 (Add play again for private matches).

master is automatically live, so the safest immediate action is to remove the new private-match Play Again flow before shipping a corrected version.

Why revert now

The merged implementation introduced correctness issues in the new play-again path:

  • duplicate lobby:playAgain requests can create multiple replacement lobbies for the same finished match
  • old-lobby timers can survive the migration and still kick or redirect players after they move into the new lobby
  • malformed lobby:playAgain payloads can throw before the handler reaches its own error path
  • migration can advance socket/memory state even if DB membership writes fail
  • the returned lobby UI does not fully reflect preserved settings after migration

Follow-up

A replacement PR is being prepared from this revert branch with the fixes above, targeted tests, and explicit links back to #13.

Verification

  • revert commit generated from merge commit f7f1a5155ceb37311ca7bbf73d281f621ab28416

…h-play-again"

This reverts commit f7f1a51, reversing
changes made to 9f1aaf3.
Copy link
Copy Markdown
Member Author

Replacement PR is ready at #16. Recommended order: merge this revert first because master is live, then retarget #16 from revert-pr-13 to master and merge the fixed implementation.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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:playAgain Socket.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.

@Ammaar-Alam Ammaar-Alam merged commit 279ae0b into master Apr 6, 2026
4 checks passed
@Ammaar-Alam Ammaar-Alam deleted the revert-pr-13 branch April 6, 2026 04:59
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