From 489058d53764a973c605016a1bd908e719f8afbe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 1 Sep 2026 20:02:25 +0000 Subject: [PATCH 1/3] fix: skip real AudioContext in Voice Mode onboarding preview under tests The onboarding voice-sample preview always built a real AudioContext and connected the analyser to context.destination, opening the host audio output device even when a test-supplied audio element was injected. In headless Electron test runs this device kept spinning with no producer, emitting endless `SyncReader::Read timed out` audio-glitch warnings and hanging the unit test task until timeout. Skip the best-effort analyser graph when an audioFactory override is provided; the sample still plays. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../contrib/agentsVoice/browser/voiceModeOnboarding.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.ts b/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.ts index 93f8f9184eaeb7..e2a653a5083289 100644 --- a/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.ts +++ b/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.ts @@ -618,6 +618,15 @@ class VoiceSamplePlayer extends Disposable { audio.src = ''; })); + // The analyser graph opens a real audio output device via + // `AudioContext`/`destination`. When a caller supplies its own audio + // element (only tests do) that device would keep spinning with no input, + // stalling headless runners with `SyncReader::Read timed out` warnings, so + // skip the best-effort waveform analysis - the sample still plays. + if (this.audioFactory) { + return audio; + } + try { const context = new targetWindow.AudioContext(); this._register(toDisposable(() => void context.close().catch(() => { /* already closing */ }))); From d22478c618b78044c97e3d6e106710de6888e22f Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Tue, 1 Sep 2026 16:31:08 -0400 Subject: [PATCH 2/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../contrib/agentsVoice/browser/voiceModeOnboarding.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.ts b/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.ts index e2a653a5083289..4e71fd4fe5dc9d 100644 --- a/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.ts +++ b/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.ts @@ -618,11 +618,7 @@ class VoiceSamplePlayer extends Disposable { audio.src = ''; })); - // The analyser graph opens a real audio output device via - // `AudioContext`/`destination`. When a caller supplies its own audio - // element (only tests do) that device would keep spinning with no input, - // stalling headless runners with `SyncReader::Read timed out` warnings, so - // skip the best-effort waveform analysis - the sample still plays. + // Tests inject audio elements to avoid opening the host audio output device. if (this.audioFactory) { return audio; } From 300c5d5897da1596e6dd9d0ffed36c887022dccd Mon Sep 17 00:00:00 2001 From: Giuseppe Cianci Date: Wed, 2 Sep 2026 18:37:38 +0200 Subject: [PATCH 3/3] chore: attest automated pull request