Skip to content

feat(ios): add a setting to make delete after a dictation one character - #297

Merged
alexkroman merged 2 commits into
mainfrom
claude/ios-char-delete-after-dictation
Nov 11, 2026
Merged

alexkroman merged 2 commits into
mainfrom
claude/ios-char-delete-after-dictation

Conversation

@claude

@claude claude Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What & why

Before: On iPhone, tapping delete right after a dictation erases the whole dictated section (#256). When you only want to fix the last word or a typo, you lose everything and have to dictate again.

After: Settings › Keyboard has a new Delete whole dictation toggle. It is on by default, so nothing changes for existing users. Turn it off and delete after a dictation removes one character, like a normal backspace.

How: a new App Group setting, SharedStore.deleteWholeDictation (key deleteWholeDictation, true when unset), is stored the same way as Hands-free. KeyboardModel.deleteBackward() (BlurtiOSCore/KeyboardModel+Typing.swift) only takes back the whole dictation when it is on. Otherwise it falls through to the single-character path it already uses after typing or a caret move. The keyboard reads the setting on every delete, so a change applies straight away. SettingsView gets the toggle and a line in the section footer, and DESIGN.md's Settings line names it.

Diff: 6 files, +46/−4 (24 non-test lines across SharedState, KeyboardModel+Typing, SettingsView and DESIGN.md; 24 test lines).

How it was tested

  • New test ProtocolTests.deleteAfterDictationIsOneCharacterWhenOff: with the setting off, delete after a dictation removes one character. The existing deleteTakesBackDictation test still covers the default (on).

  • SharedStateTests.settings now checks the setting defaults to on and keeps an off value.

  • Ran on Linux (no Swift toolchain): scripts/check-invariants.sh passed (14 settled decisions hold), scripts/check.sh --portable passed, and prettier --check App/BlurtiOS/DESIGN.md passed.

  • Not run: swift test, scripts/ios-check.sh/ios-test.sh, and the iOS build. Those need macOS and Xcode, so CI on macos-26 is the authority here.

  • scripts/check.sh passes (or CI will, if I'm not on a Mac)

  • I read AGENTS.md and this doesn't reintroduce anything
    deliberately removed

  • Docs updated if behavior changed

Delete right after a dictation takes all of it back (#256). A new
"Delete whole dictation" toggle in Settings > Keyboard turns that off,
so delete removes one character like any other. On by default, so
existing behavior is unchanged; stored in the App Group like the other
keyboard settings and read on each delete.

Co-Authored-By: Claude <noreply@anthropic.com>
@claude
claude Bot requested a review from he-james November 4, 2026 15:15
SharedState.swift was exactly at SwiftLint's 400-line file_length limit;
the deleteWholeDictation key and accessor took it to 412, which
`swiftlint lint --strict` fails on. KeyboardLayout is independent of the
App Group contract, so it moves out verbatim, beside MicAlignment.swift
and VoiceElementKind.swift (and matching the keyboard's
KeyboardLayout+Height.swift). No behaviour change.

Co-Authored-By: Claude <noreply@anthropic.com>
@claude
claude Bot marked this pull request as ready for review November 4, 2026 16:56
@alexkroman
alexkroman merged commit 3052ed5 into main Nov 11, 2026
13 checks passed
@alexkroman
alexkroman deleted the claude/ios-char-delete-after-dictation branch November 11, 2026 02:54
nbisht-aai added a commit that referenced this pull request Nov 13, 2026
Keeps the KeyboardKit keyboard over main's hand-drawn one and takes #297's
'Delete whole dictation' setting: undoLastInsertion is an ordinary delete
when the switch is off. Main's three-layout enum (KeyboardLayout.swift) is
dropped: the layouts are gone and the name is KeyboardKit's.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@alexkroman alexkroman mentioned this pull request Nov 19, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants