Problem#
Before mic permission is granted, or while enumerateDevices() resolves, browsers report empty device IDs. Because no ID matches yet, VoiceInputSetup falsely shows Selected microphone (Unavailable) and "That microphone is unplugged. Pick another one." for a saved mic.
Change#
preferredMicrophone keeps the saved entry while IDs are empty/pending and falls back to the next connected mic or System default once real IDs are known, so VoiceInputSetup never selects an unplugged device after enumeration. Show the saved label (or Saved microphone for legacy unlabelled settings), keep it selectable in the dropdown until real IDs arrive, and remove the unreachable unavailable warning and 3 pruned locale keys (apps/web/src/i18n/translations/*.json).
Scope#
Small VoiceInputSetup UI fix, browser test, and pruned locale keys (0 new/reworded strings); no issue needed.
Evidence#
- Setup: Linux x86_64, Chromium 158, dark theme, 1280x800, fresh isolated data.
- Steps: Pair incognito tab with saved "USB Mic" → open thread, Start voice input → download model to Voice input is ready (no mic permission).
| ddc72ec5c99e | 4a3f37d96076 |
|---|
 Shows "Selected microphone (Unavailable)" and unplugged error. |  Shows saved "USB Mic" label with no unplugged error. |
- Links: Base ddc72ec5c99e, fix 4a3f37d96076, test
apps/web/src/components/chat/VoiceInputSetup.browser.test.tsx.
- Not shown:
- macOS / Windows browsers; physical mic hot-plug
- Mobile voice input (no
VoiceInputSetup)
- Pre-permission aliases in
microphoneOrder.ts (unchanged)
Verification#
- AI agent verified both commits in fresh isolated sessions and checked the open dropdown on
4a3f37d96076 (System default, USB Mic selected).
- Fail-first on
ddc72ec5c99e (4-test suite): saved "USB Mic" and legacy "Saved microphone" both failed with Selected microphone (Unavailable).
vp test run apps/web/src/components/chat/VoiceInputSetup.browser.test.tsx (4a3f37d96076): 4/4 pass (3/3 runs), including opening the dropdown to check the selected option.
vp run check:changed and vp run i18n:check: pass.
Generated with Gemini 4 Neon in T3 Code Nightly
Evidence#
Evidence\n\nThe same web scenario was run on both commits: open voice input, select local transcription, download the model, select Fake Audio Input 2, then simulate the browser pre-permission state where enumerateDevices returns an audioinput with empty deviceId and label and dispatch devicechange.\n\n| | Base
|
|\n\nScenario driver: https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/a0464e609857e70d/voice-saved-microphone-before-permission.e2e.ts#
9a08ffb840| Head24c957797b|\n| --- | --- | --- |\n| Result | ❌ The picker changed toSelected microphone (Unavailable)and displayed the unplugged warning. | ✅ The picker retainedFake Audio Input 2with no unplugged warning. |\n| Capture |