Skip to content

fix(two-thumb): live-compose reliability - casing, tap-weighting, gesture correction, backspace#108

Open
SHAWNERZZ wants to merge 1 commit into
AsafMah:devfrom
SHAWNERZZ:pr/two-thumb-reliability
Open

fix(two-thumb): live-compose reliability - casing, tap-weighting, gesture correction, backspace#108
SHAWNERZZ wants to merge 1 commit into
AsafMah:devfrom
SHAWNERZZ:pr/two-thumb-reliability

Conversation

@SHAWNERZZ

Copy link
Copy Markdown

Reliability fixes for the existing two-thumb / live-compose feature. Four areas:

Casing

  • Sentence start: a fresh-word swipe that begins right at a sentence/field boundary no longer drops the leading capital (yeahYeah). When the visual shift indicator hasn't caught up, casing falls back to the authoritative auto-caps state (gated by the auto-cap setting).
  • Across re-recognition: the merged-trail re-recognizer replaces the whole composing word with a lowercase lemma; the word's capital (and a deliberate all-caps acronym) is now preserved.
  • No over-capitalization: shift-lock is only inferred for genuinely all-caps words of ≥2 letters, so a lone re-composed capital (I, A) gets first-letter shift, not ILL/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, not would). 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. super when speer won) — 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

  • Targets dev per CONTRIBUTING. Compiles standalone on dev; WordComposerTest and InputLogicTest pass.
  • Independent of the adaptive-typing PR. One tiny interaction (the gesture-correction strip change should clear the adaptive next-key prior) is intentionally left out here to keep this PR self-contained; it's a one-line follow-up for whenever both this and the adaptive PR are merged.

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant