Skip to content

Remember pre-join choices between meetings - #76

Merged
robo-monk merged 3 commits into
Convex-Works:mainfrom
mah3uz:feat/remember-prejoin
Nov 5, 2026
Merged

robo-monk merged 3 commits into
Convex-Works:mainfrom
mah3uz:feat/remember-prejoin

Conversation

@mah3uz

@mah3uz mah3uz commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Closes #4.

Pre-join now remembers the guest's display name, camera, microphone, and whether each was on, and prefills them on the next visit to any meeting.

  • web/src/lib/rtc/prejoinPrefs.ts keeps the choices in localStorage under tide:prejoin:v1. Every storage access is wrapped, so a browser without storage just gets today's blank pre-join.
  • They are written only on Join, so a choice sticks once it has been used.
  • Each device is stored as { id, label } and matched by deviceId, then by exact label, then the first device as before. Safari, and Firefox without a persisted permission, can give the same device a new id each session, so the label is the second chance. A remembered device that is gone falls back to the default silently.
  • A signed-in host keeps the name from their session. Only the devices and the on/off state apply to them, and their session name is never saved as the guest name.

PreJoin.svelte changes by a few lines: it reads the prefs once, starts the camera and microphone toggles from them, uses pickDevice where it used to take the first device, and writes on Join.

Test

e2e/prejoin-prefs.spec.ts covers a round trip (a name, a non-default camera and microphone, the camera off, then a prefilled visit to another room), nothing saved without Join, an unplugged device falling back with no alert, a rotated deviceId matched by label, and a host keeping the session name. With the label match removed, the rotation spec fails.

make check passes. The other specs that drive pre-join (device-errors, anonymous, new-room, meeting-chrome) pass. lobby.spec.ts needs the Dex stack, which wasn't running locally, so it wasn't exercised. Not run: the media suites, and real Safari or Firefox id rotation, which the spec only simulates with fake devices in Chromium.

🤖 Generated with Claude Code

Join saves the guest's name, camera and microphone, and whether each was on,
in localStorage; the next pre-join starts from them. Signed-in hosts keep the
session name. A remembered device is matched by id, then by label (ids can
rotate between sessions), then falls back to the first device.

Closes Convex-Works#4
@mah3uz
mah3uz marked this pull request as ready for review October 31, 2026 14:34
robo-monk and others added 2 commits November 4, 2026 19:01
A camera or microphone that fails turns its toggle off. Saving that on Join
made one failure stick: later meetings started with the camera off, or muted.
Only a toggle the guest used is saved now. CI also runs this spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robo-monk
robo-monk merged commit 4100d6d into Convex-Works:main Nov 5, 2026
3 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.

Remember pre-join choices between meetings

2 participants