Repository navigation
Release 0.0.6-beta.1: precompiled Rime, stroke keyboard, fuzzy switches, pre-edit fixes - #130
Merged
Merged
Conversation
librime compiled every dictionary on the phone after each install or upgrade: about a minute (over fifteen on CI's software emulator) with only the Kotlin fallback lexicon available. prebuildRimeData now builds the vendored librime's deployer for the host, compiles rime-data at build time, and adds the tables to the APK as rime-data/build, librime's prebuilt data dir. The output is byte-identical to what librime compiles on device. The dictionary sources that only the compiler reads stay out of the APK, so it shrinks by about 4 MB. Without sources librime cannot tell a stale staged table from a current one, so a new APK also clears user/build (the user dictionary is beside it, untouched), and startup crash recovery restores the prebuilt tables instead of deleting them. Fresh install to librime ready: 60.1 s -> 2.7 s on the API 36 emulator, 1.7 s on a Xiaomi 15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build writes a SHA-256 of the packaged Rime data (sources, compiled tables, and the names kept out of the APK) to rime-data.revision; the phone copies again only when it changes. The ready log now reports the copy and native startup times. Emulator: upgrade with new data copy=357ms native=1387ms; upgrade with unchanged data copy=skipped native=236ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five stroke keys and 通配 in the nine-key frame. Characters come from a table generated at build time from Rime's stroke dictionary, ranked by the 8105 table's frequencies: exact stroke orders first, then longer ones; 通配 stands for one stroke. Choices are learned locally by stroke code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Homophone replacement is not good enough to ship. The hotword package, its built-in lists, management page and 26-key boost are removed; the code is kept on archive/voice-word-lists (f3bb5cc). Imported list files stay on the phone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…witcher - Nine-key and stroke keyboards get the numeric keyboard's 符号 key under the symbol rail. - 重输 always looks like 删除 and 确定; it does nothing with no input. - The rail shows the user's list (ten common marks by default) and ends in +, which opens RailSymbolsActivity to add, reorder and remove them. The list is part of the user-data archive. - The keyboard switcher uses the 工具 tile grid, one icon per keyboard; stroke candidates the system font cannot draw are dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Eleven pairs as in mainstream IMEs (z/zh c/ch s/sh n/l f/h r/l, an/ang en/eng in/ing ian/iang uan/uang), all off by default. FuzzyRule holds each pair as librime algebra and as the Kotlin mapping; a unit test checks they agree on every syllable. The fuzzy schema patches in openime_fuzzy:/rules; the user dir copy written from the switches shadows the shipped one, and a changed file starts librime with a full check (the quick check works on whole-second mtimes and missed same-second edits). Switches are part of the user-data archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clear-all's surrounding-text fallback ran inside a batch edit. Editors such as Minis (Compose) answer reads in a batch from the state before it, so the loop never saw its deletions, hit its round limit and 'restored' every round's text, repeating the document. The fallback now runs outside the batch, stops when a read shows no change, and only restores text it saw disappear. Two fake-editor tests reproduce both behaviours. English 26-key commits now end in a space, as on Gboard and Sogou. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pinyin, nine-key digits and strokes were also set as the app's composing text, so QQ and WeChat showed '669' or ni'hao in their field and offered stickers for it. Chinese layouts now keep the pre-edit on the keyboard, as Sogou and iFlytek do; English still composes in place. The gateway tracks whether it owns a composing span (a cancel without one could delete a selection) and marks selection updates caused by its own commits, which would otherwise drop the rest of a partially committed pre-edit. scripts/typing_stress_e2e.py taps real key positions to type 50+ characters on every keyboard and a mixed session, and checks the text, that the pre-edit never reaches the field, and that nothing crashed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cancelComposing takes owned=true from voice paths that know a partial of theirs is in the editor. The fuzzy test shuts down a librime session the in-process IME may hold and removes what it staged; the prebuilt test starts from a clean staging dir. Typing stress script: --package for a suffixed debug build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
prebuildRimeData,scripts/build_rime_prebuilt.py): a host build of the vendored librime compilesrime-data; the APK ships the tables asrime-data/buildand drops the compile-only sources (APK −4.0 MB, on-device Rime data 79 → 42 MB). Fresh install to librime ready: 60.1 s → 2.7 s (API 36 emulator), 1.7 s (Xiaomi 15). A content hash (rime-data.revision) skips the copy on upgrades that leave the data unchanged.FuzzyRuleholds librime algebra and Kotlin mapping (unit test checks they agree on every syllable); user rules shadowopenime_fuzzy.yaml, a change starts librime with a full check.RailSymbolsActivity, part of the archive); keyboard switcher uses the 工具 tile grid.hotword), kept onarchive/voice-word-lists.Test plan
scripts/typing_stress_e2e.pywith real touches, emulator and Xiaomi 15: 拼音 26 键 61, 九键 61, 笔画 56, 英文 75, 数字 60, mixed 88 characters; pre-edit never reaches the field; no crash, ANR or process restart🤖 Generated with Claude Code