Skip to content

Complete the word being typed with a public-domain suggestion strip - #47

Merged
RioPlay merged 1 commit into
mainfrom
feat/suggestions-slice
Sep 17, 2026
Merged

RioPlay merged 1 commit into
mainfrom
feat/suggestions-slice

Conversation

@RioPlay

@RioPlay RioPlay commented Sep 17, 2026

Copy link
Copy Markdown
Owner

The public's number-one keyboard ask — working word assistance — lands as the mockup's suggestion strip, with completion-only behavior that cannot silently change text:

  • A frequency-ordered English word list derived solely from public-domain Project Gutenberg texts via a reproducible script (mobile/android/tools/build_wordlist.py; 10,989 words). Two popular frequency lists were evaluated and rejected on license grounds (LDC-derived corpus data with no redistribution rights; details recorded in the plan doc and NOTICE.txt).
  • SuggestionEngine offers up to 3 prefix completions of the current word, case-adapted (first-char and ALL-CAPS). The composing word itself is excluded when it is an exact entry. No auto-correction, no learning, no network.
  • The strip renders below the toolbar with stable height, refreshes on commits/delete/navigation/space/Enter, and hides on symbol pages and when the new Suggestions preference (Typing assistance, on by default) is off. It never appears on password fields, raw TYPE_NULL fields, or in private drafts.
  • Tapping a chip runs one balanced editor transaction: batch edit → delete the verified composing run → insert the candidate → re-insert the original if the insert fails. The composing word is re-verified at tap time, so caret movement after rendering can never delete unrelated text. The before-cursor read is bounded (≤32 code points); no document access.

Verification (UtterleafFoundation35, API 35): JVM engine tests (rank/case/exclusion/bounds) and wordlist validation; live-IME tests proving strip completion through the real editor and the preference/password/raw gates; 32 focused regression tests across persistence, tuning, geometry, backspace-selection, compose and editor-contract classes; lint 0 errors; 16 tooling tests including the new wordlist validator.

Implemented by opencode (openrouter/z-ai/glm-5.3-flash) in T3 Code.

@RioPlay
RioPlay merged commit 6bfbb98 into main Sep 17, 2026
7 of 8 checks passed
@RioPlay
RioPlay deleted the feat/suggestions-slice branch September 18, 2026 01:06
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