Skip to content

merge: stack LeanBitLab v4.0.2#124

Merged
AsafMah merged 120 commits into
devfrom
merge/upstream-v4.0.2
Jul 25, 2026
Merged

merge: stack LeanBitLab v4.0.2#124
AsafMah merged 120 commits into
devfrom
merge/upstream-v4.0.2

Conversation

@AsafMah

@AsafMah AsafMah commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

Stack the pinned LeanBitLab/LeanType v4.0.2 release (0477ef83) above the v3.9.9 integration in #122. This PR intentionally targets merge/upstream-v3.9.9, so reviewers see only the v3.9.9 → v4.0.2 delta; after #122 merges, retarget this PR to dev. upstream/main was not merged because it is already one badge-only commit past v4.0.2.

The update brings v4 JNI/lifecycle hardening, pointer and InputConnection stability fixes, first/next-word controls, background-service controls, immediate autospace, translation-history improvements, and restored dictionary/input reliability.

Fixes #123.

Fork decision: retain Java fallback gesture typing

Upstream v4.0.2 removes the Java gesture engine and requires a compatible native gesture library. LeanTypeDual deliberately retains both methods:

  • Fallback remains the default and works with the built-in dictionary JNI library.
  • Native remains selectable when a compatible external/system gesture library is available.
  • Restored lifecycle ownership covers startup initialization, dictionary/keyboard-triggered asynchronous index builds, accepted-word learning, and cancellation on IME destruction.
  • Ported upstream's pre-removal hardening: shared keyboard executor, atomic build suppression, bounded per-letter indexes, OOM protection, cancellation, and serialized learning-data writes.
  • Preserved the fork's script-aware key maps and canonical lowercase fallback candidates.
  • Added an end-to-end regression that runs Suggest.getSuggestedWordsForBatchInput with native unavailable, waits for asynchronous index construction, and returns hello.

Merge decisions

  • Preserve com.asafmah.leantypedual, version 3.10.0 / code 4000, privacy flavors, two-thumb features, README, badges, and Fastlane metadata.
  • Combine v4 immediate autospace with the fork's combining-mode trailing-space precedence; both behaviors have focused tests.
  • Keep Blocklist and new Background Services navigation routes.
  • Move generic gesture autospace controls to Gesture Typing while hiding them when manual two-thumb spacing makes them no-ops.
  • Restore fallback/native selection in Gesture Typing and the Welcome Wizard; show native library download only for the native method.
  • Preserve merge: sync LeanBitLab v3.9.9 #122's snapshot-consistent multilingual suggestion workers and independent JNI weight arrays while accepting v4's 500 ms bounded wait and next-word controls.
  • Remove two catalog rows confirmed HTTP 404; all remaining 268 dictionary URLs returned HTTP 200, including 17 successful timeout retries.

Verification

  • All four gates pass: compileOfflineRunTestsKotlin, compileOfflineliteRunTestsKotlin, compileStandardRunTestsKotlin, and compileStandardfullRunTestsKotlin.

  • Final full Offline debug suite: 309 tests, 10 failed, 1 skipped. No new failing names versus merge: sync LeanBitLab v3.9.9 #122 (294 tests, 11 failed, 1 skipped); upstream fixes remove the previous autocorrect-revert failure and the stale catalog failure is removed.

  • Final Offline runTests suite: 309 tests, 4 failed, 1 skipped, exactly the same four environment-dependent parser failures as merge: sync LeanBitLab v3.9.9 #122 (294 tests, 4 failed, 1 skipped).

  • Focused Java fallback ownership, fallback casing, async dictionary, AppUpgrade, SettingsContainer, Thai immediate-expansion, and immediate/combining autospace tests pass.

  • Merged manifests retain LeanTypeDual package IDs/version, exactly one Startup provider, largeHeap/predictive-back flags, and INTERNET only in Standard/Standard Full.

  • High-effort independent review found no blocker; remaining caveat is an on-device fallback lifecycle smoke before release tagging.

  • GitHub Actions Unit tests run #30169816224 passes for post-retarget commit 0d2b88727.

Release sequencing

  1. Review and merge merge: sync LeanBitLab v3.9.9 #122 into dev.
  2. Retarget this PR from merge/upstream-v3.9.9 to dev; verify the diff remains only v4.0.2.
  3. Merge this PR.
  4. Reconcile draft release PR Release LeanTypeDual 3.11.0 #120 with updated dev, rerun capitalization/signing/device checks, then make 3.11.0 release-ready.

Do not merge #120 before both upstream layers are settled.

LeanBitLab and others added 30 commits July 17, 2026 00:21
- bump version to 4.0.0-beta1 (versionCode 4000)

- add beta/pre-release detection to build-release-apk.yml

- add mock release notes and changelog for 4.0.0
- defer segmentation only for matching immediate shortcuts
- respect per-shortcut prefixes during prefix detection
- commit completed Thai segments individually
- preserve user history and n-gram context
- add regression coverage for expansion and fallback paths
…rd-boundaries

fix(input): segment Thai composing text by word boundaries
… and strip thinking tags from translation outputs
LeanBitLab and others added 23 commits July 20, 2026 23:15
…ord to prevent double text insertion on suggestion pick
…istory, emoji dict, side panel, and backspace revert
@AsafMah
AsafMah changed the base branch from merge/upstream-v3.9.9 to dev July 25, 2026 18:18
@AsafMah
AsafMah merged commit 502b490 into dev Jul 25, 2026
1 check passed
@AsafMah AsafMah mentioned this pull request Jul 25, 2026
14 tasks
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.

3 participants