You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug: leaving the room while seated at a table left the client stuck in a room the hub had already removed it from.
Cause: the hub queued roomLeft before LeaveEverywhere. That function sends the table's gameLeft and a roomState to the room, and the leaver is still a member when that happens. So the leaver received those two frames after the ack. The client (muchq.github.io useLobby) re-entered the room from that late roomState, rewrote the URL back to the room, and got "not in room" on its next command.
Fix:roomLeft is now queued after LeaveEverywhere, so it is the last frame the leaver gets.
Test:LeavingTheRoomFromATableEndsOnRoomLeft fails on the old order (a rummy frame follows roomLeft) and passes now. lobby_wire_test, lobby_e2e_test, voice_wire_test and hub_e2e_test all pass. In a browser against a local hub, "Leave room" from a table now lands on /games with no room panel.
The same commit also rides on #1614. Whichever merges second will see it as already applied.
Four lenses + Bugbot. Bugbot found no bugs. Correctness, resource-safety, tests, and altitude clean. build-and-test green; sanitize still running at post time.
Verdict: LGTM. Right seam — roomLeft after LeaveEverywhere so table gameLeft / membership roomState precede the ack in the same outbox. Wire test bites the old order via the post-ack getRoomState → commandRejected probe (drain-to-roomLeft alone would green either way). Riding the same commit in #1614 is named and merge-order safe.
Soft (pre-existing, not introduced): Stage-then-Deliver outside mu_ can still let a concurrent peer BroadcastRoom / PumpChat land a roomState/roomChat after roomLeft on the wire. Same client hazard, rarer. Out of scope for this one-line fix; optional follow-up if it shows up in the wild.
Optional: one sentence on smithy RoomLeft that the ack is terminal for the leaver (wire test already pins it).
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
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.
Bug: leaving the room while seated at a table left the client stuck in a room the hub had already removed it from.
Cause: the hub queued
roomLeftbeforeLeaveEverywhere. That function sends the table'sgameLeftand aroomStateto the room, and the leaver is still a member when that happens. So the leaver received those two frames after the ack. The client (muchq.github.iouseLobby) re-entered the room from that lateroomState, rewrote the URL back to the room, and got "not in room" on its next command.Fix:
roomLeftis now queued afterLeaveEverywhere, so it is the last frame the leaver gets.Test:
LeavingTheRoomFromATableEndsOnRoomLeftfails on the old order (arummyframe followsroomLeft) and passes now.lobby_wire_test,lobby_e2e_test,voice_wire_testandhub_e2e_testall pass. In a browser against a local hub, "Leave room" from a table now lands on/gameswith no room panel.The same commit also rides on #1614. Whichever merges second will see it as already applied.
Generated by Claude Code