Repository navigation
feat(ios): delete right after a dictation takes all of it back - #256
Open
dylan-duan-aai wants to merge 1 commit into
Open
dylan-duan-aai wants to merge 1 commit into
dylan-duan-aai wants to merge 1 commit into
Conversation
Dictations land as whole sentences, so clearing a bad one meant holding delete through it a character at a time. The keyboard now remembers what the last result inserted (separator included); the next delete removes all of it, provided the caret still sits at its end with nothing highlighted. Any keystroke, a moved caret, a selection, or a host that shows less context than the dictation falls back to a one-character delete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Dictations land as whole sentences, so clearing a bad one meant holding delete through it a character at a time (the keyboard's delete doesn't repeat yet).
What
resultArrived()remembers exactly what it inserted, separator included (lastInsertion).deleteBackward()removes all of it in one tap when the text before the caret still ends with it and nothing is selected.documentContextBeforeInputis shorter than the dictation falls back to a one-character delete.model.deleteBackward()).Testing
deleteTakesBackDictationinProtocolTestscovers: whole dictation removed once then single characters, typing after a dictation, moved caret, and selection.scripts/ios-test.sh: 145 passed, 0 failed; BlurtiOSCore line coverage 97.19% (gate 88%).scripts/ios-typecheck.sh: ok.🤖 Generated with Claude Code