Only show onboarding microphone picker once a real mic is detected - #328851
Merged
Conversation
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix microphone picker display in voice mode
Only show onboarding microphone picker once a real mic is detected
Aug 3, 2026
meganrogge
marked this pull request as ready for review
August 3, 2026 21:41
meganrogge
enabled auto-merge (squash)
August 3, 2026 21:42
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes premature microphone picker rendering before device labels are available.
Changes:
- Gates both onboarding pickers on real microphone labels.
- Adds dictation regression coverage for dynamic label availability.
Show a summary per file
| File | Description |
|---|---|
dictationOnboarding.ts |
Defers dictation picker rendering. |
voiceModeOnboarding.ts |
Defers Voice Mode picker rendering. |
dictationOnboarding.test.ts |
Tests unlabeled-to-labeled behavior. |
Review details
Suppressed comments (1)
src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.ts:780
- The regression test covers only
DictationOnboardingBanner, but this independent Voice Mode branch can still regress unnoticed even though the issue and PR explicitly cover both cards. Please add the equivalent unlabeled-to-labeled picker test inagentsVoice/test/browser/voiceModeOnboarding.test.ts.
if (options.length > 1 && !devices.some(device => device.kind === 'audioinput' && device.label)) {
- Files reviewed: 3/3 changed files
- Comments generated: 3
- Review effort level: Balanced
meganrogge
approved these changes
Aug 3, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
pwang347
approved these changes
Aug 3, 2026
vritant24
approved these changes
Aug 3, 2026
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.
Description
The voice-mode and dictation onboarding cards could render the microphone picker before device names were available, showing a blank selected mic or "Unknown device" rows.
Both cards guard picker rendering behind a "wait for real labels" check, but that check inspected
IMicrophoneOption.label— whichbuildMicrophoneOptions()always fills with an"Unknown device (…)"fallback, making it unconditionally truthy. As a result the guard never fired, and a multi-mic picker rendered blank before microphone permission was granted.Gate on raw device labels —
refreshMicrophones()in bothdictationOnboarding.tsandvoiceModeOnboarding.tsnow bails when there are multiple options but noMediaDeviceInforeports a reallabel:The picker stays hidden until named mics are detected, then renders (and keeps updating via the existing
devicechangelistener). A single mic still never shows a picker.Dropped the
this.options.length > 1precondition that previously let the first render slip through unlabeled, so the gate applies from the initial refresh.Test — added coverage asserting the dictation picker stays hidden while mics are unlabeled and appears with correct options once a real label lands.