Skip to content

Fit an iOS keyboard dictation placed mid-sentence to the text around it - #99

Merged
ajbarryiii merged 3 commits into
mainfrom
feat/insertion-context-ios
Oct 31, 2026
Merged

ajbarryiii merged 3 commits into
mainfrom
feat/insertion-context-ios

Conversation

@ajbarryiii

Copy link
Copy Markdown
Owner

In the iOS keyboard, a dictation inserted into the middle of a sentence kept the model's capital and final punctuation: …like this one Which ends like this one..

The keyboard now passes the text after the cursor (documentContextAfterInput) as well as the text before it to the shared formatter from #97. That formatter replaces the iOS-only spacing rules. A dictation placed mid-sentence now starts lowercase and drops punctuation that the following text makes redundant. The spacing rules are unchanged.

Contract change: in the existing TextInsertionFormatterTests, a transcript after the context "Prefix" (which ends in a letter, so mid-sentence) now starts lowercase. Those two cases now use the context "Prefix." so they keep testing what they were written for, and a new test covers the mid-sentence fitting.

The text around the cursor is used only to format the insertion. It's never stored.

Proof: make -C iOS check passes on a Mac (868 host tests). Device test pending in a TestFlight build from this branch.

Sol Loop: 2 rounds, 3 fixes (1 high, 2 medium, 0 low, 0 rejected). These counts cover the whole stack; none of the fixes is iOS-specific.

Created with Claude Opus 5.5 in Claude Code; reviewed by gpt-6.1-sol in Codex.

The keyboard now passes the text after the cursor as well as before it to
the shared InsertionContextFormatter, which replaces the iOS-only spacing
rules: a dictation placed mid-sentence starts lowercase and drops
punctuation the following text makes redundant.
@ajbarryiii
ajbarryiii changed the base branch from feat/insertion-context-core to main October 31, 2026 20:06
@ajbarryiii
ajbarryiii merged commit abd30d8 into main Oct 31, 2026
4 checks passed
@ajbarryiii
ajbarryiii deleted the feat/insertion-context-ios branch October 31, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant