Repository navigation
android: fix earlier words (labs) (#3019) - #3029
Open
opencodejr[bot] wants to merge 1 commit into
Open
opencodejr[bot] wants to merge 1 commit into
opencodejr[bot] wants to merge 1 commit into
Conversation
opencodejr
Bot
force-pushed
the
agent/issue-3019
branch
from
November 28, 2026 05:10
5ef661d to
f29fce0
Compare
opencodejr
Bot
force-pushed
the
agent/issue-3019
branch
from
November 28, 2026 05:14
f29fce0 to
e2314e6
Compare
This branch has not been deployed
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.
Adds Labs › Keyboard › Fix earlier words, off by default (#3019). Requested and specified by @dgunay. This is written fresh from the issue's description; no code was taken from their fork.
With the toggle on, the strip offers up to three words (its three slots) after its usual 100 ms pause when the cursor is back in a finished word: after deleting back into it, after tapping it, or right at its start.
SpatialDecoder.alternativesreads the letters as taps on the key centres. It uses the last grid typed on, or an even grid built from the layout's rows. One letter may be missed, extra or swapped. A reading is kept only when it fits the word pairs on both sides at leastEARLIER_MARGIN= 3 nats better than the word already there.Tapping one replaces the whole word in one batch edit. This adds
KeyboardTextTarget.deleteAfter, which defaults to false so existing test fakes still compile. Choosing the original callsfeedback.undo, the same count Delete's undo uses, and drops that fix.Nothing is offered:
With the toggle off, nothing is recorded or scheduled and the keyboard is unchanged.
Files:
keyboard/EarlierWords.kt: fix list, finding the word around the cursor, building the offerKeyboardEngine: wiringTypingPreferences.fixEarlierWordsHexSettings: the toggleandroid/README.md: Labs › Keyboard paragraphChanges after review:
spot()returns null with the cursor right after a closing quote ('teh',dogs', curly’), so a pick can no longer delete the quote.Suggestion.SLOTSand the README wording matches.Known limits:
Testing:
EarlierWordsTest(3 tests, realen.hextm, JUnit with a standalone Kotlin 2.0 compiler) passes. It covers:HexSettings.ktcompile againstandroid.jarwith no new errors.HexSettings.ktwas not compiled, and the feature was not tried on a device.python3 scripts/code-shape.py --checkpasses.ios/was touched.Closes #3019