Repository navigation
fix(gesture): learn from a swiped word deleted and retyped (#946) - #954
Merged
Merged
Conversation
Swipe corrections were only learned when another suggestion was picked from the strip. Deleting the swiped word with backspace and typing a word in its place taught nothing, which is the only way to correct a swipe with suggestions hidden. Now the deleted swipe and its other candidates are remembered, and the first word typed in the same place is recorded in GestureWordBias when it was one of them. Without suggestion lookups (suggestions hidden and auto-correct off) letters are committed one by one, so the word is read from the text at the next separator or swipe. Deleting past the swipe, a word that was no candidate, incognito mode, fields without suggestions or Personalized suggestions off record nothing. Picking a suggestion after a swipe now also respects Personalized suggestions.
This was referenced Nov 27, 2026
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.
Fixes #946
Problem
Swipe corrections were learned only when another suggestion was picked from the strip. Deleting the swiped word with backspace and typing the right word taught nothing. With suggestions hidden, that is the only way to correct a swipe.
Change
GestureWordBias(the same store as picking a suggestion) if it was one of those candidates.Side effects
Only
GestureWordBiasis affected: a relative score adjustment capped at 3% that fades over time, applied to swipe candidates only. It decides close calls and never changes typing.Testing
InputLogicTest: 150 tests, 0 failures (11 new: candidate, next swipe commits, no candidate, deleting further, first word only, incognito/personalized off, suggestions hidden, and 4 for the no-lookup mode).