Repository navigation
Conversation
SummaryFixes dropped voice turns after barge-in: Findings (all Non-blocking)
VerdictLooks good — small, correct fix with a targeted regression test. |
11 of 12 tasks
This branch has not been deployed
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.
What does this PR do?
Prevents a Desktop Voice Conversation barge-in transcript from being silently dropped when its retained submit callback was created while the interrupted agent turn was still busy.
useVoiceConversation()already waits on live busy state before submitting a captured interruption. The parentsubmitVoiceTurn()callback, however, could still readbusy=truefrom the older render retained by the barge monitor and return without reaching the composer. This keeps the existing safety gate but makes it read the current busy value through a synchronously updated ref.The reporter's independent RED → GREEN follow-up confirms the causal sequence at unit level: the retained callback produced zero semantic submissions before the fix, exactly one after it, and remained blocked while live busy was true. A patched live Windows Voice canary remains a separate follow-up.
Draft #95180 is adjacent but not a duplicate: it changes turn and capture lifetimes inside
useVoiceConversation()and does not update this parent submit guard.Related Issue
Fixes #105497
Type of Change
Changes Made
apps/desktop/src/app/chat/composer/hooks/use-composer-voice.ts: read the live busy gate from a ref when a Voice callback submits.apps/desktop/src/app/chat/composer/hooks/use-composer-voice.test.tsx: retain the callback from abusy=truerender, prove it submits after live busy clears, and preserve the live-busy block.How to Test
From
apps/desktop, run the focused and adjacent Voice suites:Verify all 12 tests pass.
Run
npm run typecheck.Run ESLint and Prettier against the two changed files.
The new regression was also run against the unfixed base first and failed with zero calls to the semantic
onSubmit; the identical test passes after this patch.The full UI suite was attempted: 7,334 tests passed and two existing
src/store/voice-prefs.test.tslocalStorage assertions failed. Those two failures reproduce when that unchanged file is run alone; its source, test, andvitest.setup.tshave no diff frommain.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass — N/A for this Desktop TypeScript-only changeDocumentation & Housekeeping
docs/, docstrings) — N/Acli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AScreenshots / Logs
N/A — this async coordination bug is covered by the retained-callback regression and the reporter's independent RED → GREEN verification.