fix(web): remember guest names for room link joins#74
Merged
Conversation
✅ Deploy Preview for muzinga ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Two production-readiness gaps in the room experience: - Track changes renegotiated every listener peer from scratch (close, offer, answer, full ICE): seconds of silence per listener and a hard failure if any ICE step glitched - perceived as casting desync. Now, when a listener's peer connection is already up, the host swaps the audio in place with RTCRtpSender.replaceTrack: no renegotiation, no ICE restart, no teardown, no perceptible gap (the Zoom/Meet pattern). Full offer/answer remains only for listeners without a usable connection. - Guests arriving by share link / QR were silently auto-joined as "Listener" with no chance to pick a name (identity Layer 2, previously deferred). Now: a guest with a remembered name (wallet-scoped, or the new per-browser guest login) walks straight in under that name; a first-time guest gets the join sheet (code pre-filled from the URL) to pick one. Names chosen without a wallet persist under a guest key, so non-connected users also set a login once. The deterministic room-join e2e keeps its direct auto-join. 96 unit tests (4 new guest-identity cases), signaling 30/30, lint 0 errors, build/fmt green on touched files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both regressed a real deployment (listeners lost audio, host felt heavier) and could not be verified without a browser. Restore main's behavior: - Track changes go back to full renegotiation (createOfferForListener for all listeners) instead of RTCRtpSender.replaceTrack. - Link/QR guests auto-join immediately again instead of being routed to a name-entry sheet that blocked them from hearing the room until submitted. Kept (safe, non-gating): a link/QR guest joins under a remembered name when one exists (wallet-scoped or the per-browser guest login), and a name typed without a wallet is remembered under a guest key. Neither blocks entry or touches the WebRTC path. useSession/ListenerShell/PersistentAudio now match main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
knzeng-e
force-pushed
the
fix/realtime-meet-grade
branch
from
July 9, 2026 23:14
da4e5bc to
b33d0c1
Compare
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.
This PR is now intentionally narrowed after review against current
main.The original
replaceTrack/ Meet-style switching attempt and name-gated lobby were reverted because they regressed real room behavior and were not browser-verified enough to land safely. The remaining change is still useful and non-gating:#/rooms/<roomId>link still auto-joins immediately, but uses the remembered guest or wallet-scoped name when one exists;Listenerand can rename later;joinRoom, avoiding the React async-state bug where the server still receivedListener;The design note in
docs/design/room-stream-sync-fixes.mdrecords that future Meet-grade switching or a lobby step needs real two-device browser validation before landing.Verification
npm run test:unit- 96/96npm run lint- 0 errors, 3 pre-existing hook warningsnpm run build- passednpm run test:signal- 30/30, required local-port permission outside sandboxnpx playwright test e2e/room-join.spec.ts- 4/4, required local-port permission outside sandboxnpm run test:e2e- 10/10, required local-port permission outside sandbox