fix(two-thumb): live-compose reliability - casing, tap-weighting, gesture correction, backspace#108
Open
SHAWNERZZ wants to merge 1 commit into
Open
fix(two-thumb): live-compose reliability - casing, tap-weighting, gesture correction, backspace#108SHAWNERZZ wants to merge 1 commit into
SHAWNERZZ wants to merge 1 commit into
Conversation
…ture correction, backspace Reliability fixes for the existing two-thumb / live-compose feature: - Casing: keep a sentence-start capital when a fresh-word swipe begins right at a boundary; keep the capital across merged-trail re-recognition; neutralize an unsolicited all-caps acronym; require >= 2 letters before inferring shift-lock (so a lone re-composed I/A does not become ILL/AND). - Tap weighting: densify a tapped prefix's geometry so a long swipe cannot out-vote the letters you typed (tap s,h + swipe -> should, not would); clustered per-key, capped, symmetric, dev-equivalent for dense swipe+swipe. - Gesture correction: after a merged-trail extend, keep the recognizer's own whole-word alternatives on the strip so the intended word stays one tap away (e.g. super when speer ranked first), instead of burying it behind typed-word suggestions for the auto-committed word. - Backspace: realign the raw stroke after any edit (incl. select-delete + retype) so a following swipe rebuilds the corrected word, not an ever-longer one; clear fragment boundaries when the composing word is gone; mark the stroke stale when an extend gesture recognizes nothing. Unit-tested (WordComposerTest, InputLogicTest). Compiles standalone on dev. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Reliability fixes for the existing two-thumb / live-compose feature. Four areas:
Casing
yeah→Yeah). When the visual shift indicator hasn't caught up, casing falls back to the authoritative auto-caps state (gated by the auto-cap setting).I,A) gets first-letter shift, notILL/AND.Tap weighting
When you tap a prefix then swipe the rest, the tapped letters now carry real weight, so a long swipe can't out-vote them (tap
s,h+ swipe →should, notwould). The prefix geometry is densified by clustering samples at each key center — capped per key, spread symmetrically, and with the already-dense swipe-then-swipe path kept timing-equivalent to before.Gesture correction
After a multi-part (merged-trail) gesture, the strip keeps the recognizer's own whole-word alternatives, so the intended word stays one tap away when the recognizer ranks the wrong one first (e.g.
superwhenspeerwon) — instead of being buried behind typed-word suggestions for the auto-committed word. Scoped to the merged-trail case (candidates are whole words, so picking one can't lose part of the word); the true-concatenation path still re-runs typed suggestions.Backspace / gesture clearing
After editing a word, the next swipe builds the new word cleanly instead of reusing the old gesture — covers delete-part-and-reswipe, fragment-pop, whole-word delete, and select-and-delete-then-retype. Also: fragment boundaries are cleared when the composing word is gone, and an extend gesture that recognizes nothing marks the stroke stale so a later swipe can't build on a doubled buffer.
Notes
devper CONTRIBUTING. Compiles standalone ondev;WordComposerTestandInputLogicTestpass.