fix(mobile): preserve dictation through interruptions and failures - #26
Merged
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
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.
Long dictations could silently stop capturing audio, lose their recording after a transcription error, or lose words during cleanup. This change detects native microphone pauses, transcribes interrupted recordings, retries saved audio, and preserves the original file across recorder resets. It fixes hold-to-talk release handling, reloads evicted speech models, and handles native background-time expiration.
Cleanup now rejects missing endings and excessive shortening, waits for the recovery copy to reach disk, and retains uncommitted transcripts for recovery. Rejected cleanup visibly falls back to the original transcription.
Validation: 89 focused tests passed; client-runtime typecheck passed; the native voice module and keyboard controls passed an iOS-targeted Swift typecheck against the pinned dependencies; strict Swift lint passed. Targeted JavaScript lint passed with warnings. The local mobile package typecheck reported navigation errors outside the changed voice files; CI subsequently passed the repository typecheck. Two existing Swift parameter-alignment violations in the diff viewer were corrected to unblock native CI. Physical-device long-recording verification remains outstanding; this PR does not publish an app build.
Scope: iOS/iPadOS composer microphone and hardware shortcuts, shared voice controller, local speech engines, and voice documentation. No provider adapter, server protocol, or connection-mode changes. Web, desktop, and Android do not expose this dictation implementation. UI changes are status/accessibility wording; no visual layout changes.
Implemented with GPT-6 in the Codex harness.