fix(love): allow rejoining a room the client is still recorded in - #11029
Closed
nigad wants to merge 1 commit into
Closed
fix(love): allow rejoining a room the client is still recorded in#11029nigad wants to merge 1 commit into
nigad wants to merge 1 commit into
Conversation
ParticipantInfo is written by the person's own client on join and leave. When that client goes away mid-call (reload, crash, network loss) the record keeps pointing at the room while no LiveKit session exists. The room popup then hides Enter room because the person counts as joined, and the meeting controls need a live session, so the person can neither hear anything nor re-establish the call. Show Enter room whenever no LiveKit session is connected, and route it through a new reconnectMeeting() that connects directly instead of knocking again when the record already places the person in the room. Leave keeps working as before. Signed-off-by: Ayush Nigade <ayush@mirro.ai>
Author
|
Closing; will be resubmitted from the correct account. |
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.
Description of the issue
ParticipantInfo(who is in which Love room) is written only by the person's own client, on join and on leave, and dropped by the server only when the person goes fully offline. If the client goes away mid-call — page reload, crash, laptop lid, network loss — the LiveKit participant is dropped but the record keeps pointing at the room.The person then reloads and sees themselves "in" the room with no audio/video.
RoomPopuphides Enter room because$myInfo.room === room._id, and the microphone/camera controls need$lkSessionConnected, so there is no way to get the call back. Everyone else keeps seeing them as a member of the room.Steps to reproduce
Expected behaviour
The person can re-establish the call (or leave the room).
Actual behaviour
The popup shows the person as a member, offers only Leave, and no media is connected. Server side, the LiveKit log shows
participant closing … CLIENT_REQUEST_LEAVEwhile theParticipantInfostill hasroomset to the video room.Fix
RoomPopup.svelte: show Enter room whenever no LiveKit session is connected, not only when the record says the person is out.meetings.ts: new exportedreconnectMeeting(room), which connects directly when the record already places the person in that room.joinMeetingis not used for this case because it would send a knock/join request again for Knock rooms and offices.connectToMeeting'smoveToMeetingRoomalready returns early when the room is unchanged, so rejoining is only a fresh token and LiveKit connect.Deliberately no automatic reset on startup: a second tab of the same user would reset the first tab's live call, and the record's
sessionIdcannot identify the owning tab (it is refreshed on every transactorReconnected).A companion PR makes the Love service reset stale records on LiveKit
participant_left/room_finishedwebhooks, so other members stop seeing the ghost without the person doing anything.Testing
Reproduced on a self-hosted v0.7.432 instance (LiveKit self-hosted). Verified the failure mode from the transactor and livekit-server logs and the transactor REST API; verified that the same
ParticipantInfoupdate the client's ownkick()sends clears the state.Developed with AI assistance; reviewed and tested by the author.