Skip to content

Add offline word prediction to the scanning keyboard - #796

Merged
enaboapps merged 5 commits into
mainfrom
codex/word-prediction-795
Sep 19, 2026
Merged

enaboapps merged 5 commits into
mainfrom
codex/word-prediction-795

Conversation

@enaboapps

@enaboapps enaboapps commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Adds five offline word suggestions to the Letters keyboard page, using the recovered read-only SQLite corpus and actual focused-field context on Windows and macOS. Accepting a word appends its missing suffix and a space. A persisted setting defaults on while retaining compatibility with existing configuration.

Accessibility and database work run in a bounded child process with a two-second timeout. Protected fields, selections, mid-word positions and stale targets suppress acceptance. A temporary Switchify-only fallback starts after a known word boundary when an editable field cannot expose text. Captured text stays in memory and native rendering; no React events, logging, clipboard or learning.

Validation: local Node 24 lint, frontend tests and production build passed. Rust 1.97.1 formatting, warnings-denied Clippy and tests passed. Fake adapters cover extraction, ranking, protection, stale focus/selection, fallback and bounded IPC; a sleeping process verifies cancellation without desktop input. Synthetic database benchmark: 200 samples, median 2.59 ms, p95 10.78 ms, max 14.35 ms, zero failures; startup 251.13 ms (debug). Native app compatibility and end-to-end timings remain untested and are documented explicitly. CI validates Windows/macOS compilation and packaging.

The identity scan now skips binary files so English corpus contents are not mistaken for application branding. All text files remain checked. Corpus provenance and manual fixture instructions are included.

Closes #795

Independent review of latest head ff9ae16 found no remaining actionable findings after fixes for actual captured-switch bindings and observer loss. Final local Rust results: 439 unit tests and 7 integration tests passed, one explicit performance benchmark ignored. The manual measurement command was exercised against a fake worker: 100 supported samples, zero failures, no desktop input. Real app compatibility remains untested.

CI for the previous head ff9ae16 passed: frontend lint/tests/build, dependency audit, CodeQL, Windows native checks and installer verification, and macOS native checks plus app/DMG packaging.

Keyboard redraw fix at 3f062fc: keyboard strokes and prediction acceptance preserve the visible click-through overlay; unchanged tiles skip native repaint. Background geometry changes repaint in stacking order, while pointer execution, stop and failure cleanup retain their existing hiding paths. Fake presentation tests cover changed/unchanged tiles, background changes, removal and failure propagation. Local frontend checks, Mac formatting/Clippy and 442 unit plus seven integration tests passed; Windows ARM VM Clippy, headless tests and native debug build passed. Independent latest-head review found no actionable findings. Updated build is running in the VM for visual user testing; CI for this head is running.

Timing follow-up at e5ee2a5: arriving suggestions that move the scan to their row now restart its interval. Regression coverage verifies arrival at 490 ms of a 500 ms interval still receives a full interval, and unchanged refreshes do not stall scanning. Mac and Windows Rust tests/Clippy and Windows native build passed; independent latest-head review found no actionable findings. Updated VM build is available for user testing; latest CI pending.

@enaboapps enaboapps added this to the v1.0.0-rc.13 milestone Sep 19, 2026
@enaboapps
enaboapps marked this pull request as ready for review September 19, 2026 11:04
@enaboapps
enaboapps merged commit c7b6920 into main Sep 19, 2026
6 checks passed
@enaboapps
enaboapps deleted the codex/word-prediction-795 branch September 22, 2026 09:14
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.

Integrate offline word prediction into the scanning keyboard

2 participants