Fix voice mode connecting spinner getting stuck indefinitely#326036
Merged
Conversation
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix voice mode button behavior during active sessions
Fix voice mode connecting spinner getting stuck indefinitely
Jul 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Prevents voice mode’s connecting spinner from hanging indefinitely.
Changes:
- Adds a 10-second connection watchdog with timeout feedback.
- Cancels late connections after timeout or disconnect.
- Clears the watchdog after successful connection or disconnection.
Show a summary per file
| File | Description |
|---|---|
voiceSessionController.ts |
Adds watchdog lifecycle, timeout notification, and late-connection handling. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Medium
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
meganrogge
approved these changes
Jul 16, 2026
pwang347
approved these changes
Jul 16, 2026
hediet
approved these changes
Jul 16, 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
Pressing the voice mode button while a chat session is in progress could leave the toolbar spinner (
agentsVoice.connecting) spinning forever with no effect and no feedback.Root cause:
VoiceSessionController.connect()armed its timeout watchdog only after severalawaits (getSessions('github'), transcript-store loads,voiceClientService.connect()). If any of that awaited work hung — plausible when the auth provider is busy servicing an in-progress request — the watchdog was never armed, soisConnectingstayedtrueindefinitely. Re-clicking did nothing sinceconnect()early-returns while connecting, and no failure path surfaced feedback.Changes (
voiceSessionController.ts):_connectWatchdog(MutableDisposable, 10s) is armed before any awaited work, and re-armed immediately before the WebSocket handshake so the handshake gets a fresh window regardless of auth latency. Cleared on a successful handshake and indisconnect().disconnect()and shows a warning notification ("Voice mode could not connect. Please try again.") instead of silently reverting.connect()bails ifisConnectingwas already reset (by the watchdog or an explicit disconnect), avoiding opening a connection the user no longer expects.awaitinlinesetTimeout, which only covered the handshake, with a watchdog spanning the whole connect lifecycle.Adds an
INotificationServicedependency to the controller (registered singleton; no direct instantiation sites affected).