Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): voice setup stops reporting a saved microphone as unplugged before device ids are known #48129

Mergedonly21mil(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/48129/headmerged by juliusmarminge View on GitHub

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).
ddc72ec5c99e4a3f37d96076
Shows "Selected microphone (Unavailable)" and unplugged error.
Shows "Selected microphone (Unavailable)" and unplugged error.
Shows saved "USB Mic" label with no 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

    1. Pushed24c9577

    2. 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 9a08ffb840 | Head 24c957797b |\n| --- | --- | --- |\n| Result | ❌ The picker changed to Selected microphone (Unavailable) and displayed the unplugged warning. | ✅ The picker retained Fake Audio Input 2 with no unplugged warning. |\n| Capture | Base failure: unavailable saved microphone | Head saved microphone retained |\n\nScenario driver: https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/a0464e609857e70d/voice-saved-microphone-before-permission.e2e.ts

    3. juliusmarminge added labelstakeover:ready

    4. juliusmarminge removed labelstakeover:in-progress

    5. juliusmarminge merged this7b6a2c9

    6. juliusmarminge closed this

    7. juliusmarminge removed labelstakeover:ready

Sign in to join this conversation.