Skip to content

fix(web): remember guest names for room link joins#74

Merged
knzeng-e merged 3 commits into
mainfrom
fix/realtime-meet-grade
Jul 9, 2026
Merged

fix(web): remember guest names for room link joins#74
knzeng-e merged 3 commits into
mainfrom
fix/realtime-meet-grade

Conversation

@knzeng-e

@knzeng-e knzeng-e commented Jul 7, 2026

Copy link
Copy Markdown
Owner

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:

  • guests without a wallet can persist a chosen display name under a per-browser guest key;
  • a direct #/rooms/<roomId> link still auto-joins immediately, but uses the remembered guest or wallet-scoped name when one exists;
  • first-time link guests still enter immediately as Listener and can rename later;
  • the auto-join path now passes the remembered name directly into joinRoom, avoiding the React async-state bug where the server still received Listener;
  • room e2e now verifies that a remembered guest name appears on the host side after link join.

The design note in docs/design/room-stream-sync-fixes.md records that future Meet-grade switching or a lobby step needs real two-device browser validation before landing.

Verification

  • npm run test:unit - 96/96
  • npm run lint - 0 errors, 3 pre-existing hook warnings
  • npm run build - passed
  • npm run test:signal - 30/30, required local-port permission outside sandbox
  • npx playwright test e2e/room-join.spec.ts - 4/4, required local-port permission outside sandbox
  • npm run test:e2e - 10/10, required local-port permission outside sandbox

@netlify

netlify Bot commented Jul 7, 2026

Copy link
Copy Markdown

Deploy Preview for muzinga ready!

Name Link
🔨 Latest commit b33d0c1
🔍 Latest deploy log https://app.netlify.com/projects/muzinga/deploys/6a502b4a308f820008c32391
😎 Deploy Preview https://deploy-preview-74--muzinga.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

knzeng-e and others added 3 commits July 10, 2026 01:10
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
knzeng-e force-pushed the fix/realtime-meet-grade branch from da4e5bc to b33d0c1 Compare July 9, 2026 23:14
@knzeng-e knzeng-e changed the title feat(web): Meet-grade track switching and named arrivals fix(web): remember guest names for room link joins Jul 9, 2026
@knzeng-e
knzeng-e merged commit 07220f5 into main Jul 9, 2026
9 checks passed
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.

1 participant