Repository navigation
fix(speech): treat aborted as benign; only abort when listening (#197) - #235
Merged
Merged
Conversation
Owner
Author
Stage 4 review — PASSPR: #235 — fix(speech): treat aborted as benign; only abort when listening (#197) How reviewedRead the full #197 thread, context pack (comment 6855175743), design-gap comment (6855230505), and the PR diff, then reviewed the real checkout at the head SHA. Note: Acceptance criteria — all verified
Checks that passed
FindingsNo findings. No validated defect, so nothing blocks merge. Notes (not findings)
|
Port of the speech hunks from open PR #182, standalone. isBenignSpeechError classifies 'no-speech' and 'aborted' as benign (aborted is the documented outcome of abort(); events are module-global, so another screen's cleanup abort() used to surface a phantom 'Voice input failed' alert on the parent session screen). Unmount cleanup now only calls abort() if this hook instance actually started listening, tracked via a listeningRef synced in useEffect. Fixes #197
dzianisv
force-pushed
the
fix/197-phantom-voice-alert
branch
from
November 13, 2026 14:38
a8b376e to
c657b22
Compare
dzianisv
added a commit
that referenced
this pull request
Nov 13, 2026
dzianisv
added a commit
that referenced
this pull request
Nov 13, 2026
Merges the scoped auto-scroll fix for #155. Stage 4 verdict PASS (comment 6856376173) on the reviewed head 8c7747a; branch updated to a2146cf by a clean merge of main (#235 only, reviewed code unchanged); CI green on a2146cf. Device proof remains owed on the v0.4.18 build before it ships (owner phone check).
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.
Fixes #197
Ports the speech hunks from open PR #182 standalone — a mechanical port of already-reviewed hunks, not a fresh design. None of #182's other fixes are included, and #182's speech-errors.test.ts is not ported.
Diff summary
src/lib/speech-errors.ts— pure, import-free helperisBenignSpeechError(code)returning true for'no-speech'and'aborted'. Single place classifying benign speech errors. Its doc comment states only what is documented:abort()emitsaborted, and events are module-global.src/lib/speech.ts— error handler usesisBenignSpeechError(event.error)instead of the inline'no-speech'check, so a module-globalabortedfrom another screen's cleanup no longer sets an error; unmount cleanup only callsabort()if this hook instance actually started listening, tracked with alisteningRefsynced viauseEffect(not assignment during render); the misleadingabort() is a no-op when not listeningcomment is corrected in place.Why
Backing out of a subagent session showed a phantom "Voice input failed" alert on the parent screen with the mic never used: the child screen's unmount cleanup called
abort(), the module-globalabortedevent reached the parent's still-mounted error listener, and onlyno-speechwas carved out. Real voice errors still surface — onlyno-speechandabortedare treated as benign.Gate (local checkout, branch head a8b376e, base e844493)
npm ci— added 794 packages in 45snpm run check:versions—Version metadata aligned: 0.4.17 (44)npm run typecheck— clean (tsc --noEmit, exit 0)npm test— 380 pass, 0 failContext: issue thread comment 6855175743 (context pack) and design-gap comment 6855230505 on #197. No release/tag from this PR — release is a separate act after merges land.