Skip to content

merge: sync LeanBitLab/LeanType v4.1.8 - #149

Merged
AsafMah merged 181 commits into
devfrom
asafmah-merge-upstream-v4-1-8
Sep 3, 2026
Merged

merge: sync LeanBitLab/LeanType v4.1.8#149
AsafMah merged 181 commits into
devfrom
asafmah-merge-upstream-v4-1-8

Conversation

@AsafMah

@AsafMah AsafMah commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • merge LeanBitLab/LeanType v4.1.8 into LeanTypeDual dev with a real two-parent merge, covering v4.1.3-v4.1.8 (178 upstream commits)
  • integrate the post-sync fork-invariant gate from dev as a separate follow-up merge
  • preserve LeanTypeDual's fork identity, privacy tiers, bundled offline AI, fallback gesture engine, and two-thumb input/settings behavior

Conflict and audit decisions

  • kept com.asafmah.leantypedual, version 0.3.0 / 4300, and all four flavors; offline remains minSdk 26 with bundled llama.cpp/GGUF, while offlinelite remains minSdk 21 with no AI
  • kept INTERNET only in standard and standardfull; restored offlinelite toolbar/settings exclusions and browser/import-only handling for network-backed dictionary/translation assets
  • kept offline/offlinelite bundled dictionaries; standard/standardfull continue excluding downloadable dictionary assets
  • retained SwipeGestureEngine initialize/cancel/index rebuild behavior, two-thumb SettingsContainer/navigation/search wiring, blacklist/graduated-trust behavior, and whole-word backspace composing-span cleanup
  • kept fork README, FEATURES, badges, release workflow, versioning, and changelog history; omitted upstream 4103-4108 fastlane notes and v4.1.3-v4.1.8 release-note files
  • accepted upstream SYSTEM_ALERT_WINDOW for floating mode: requesting the special permission remains user-driven through ACTION_MANAGE_OVERLAY_PERMISSION, and docked operation/restoration does not require the grant
  • audited all files changed on both parents. In addition to explicit conflicts, this caught Mergiraf/auto-merge regressions that would have replaced bundled offline AI with plugin-only behavior, exposed AI/network UI in offlinelite, duplicated a scoring constant, and suppressed contextual autocorrect

Validation

  • python tools/check_fork_invariants.py
  • python -m unittest tools.tests.test_check_fork_invariants tools.tests.test_check_apk_invariants (22 tests)
  • ./gradlew compileOfflineRunTestsKotlin
  • ./gradlew :app:assembleStandardDebug :app:assembleStandardfullDebug :app:assembleOfflineDebug :app:assembleOfflineliteDebug
  • APK audit: expected fork package IDs/minSdk values; INTERNET only standard/standardfull; SYSTEM_ALERT_WINDOW all flavors; offline/offlinelite each include 18 main dictionaries including main_en-US.dict; standard/standardfull include none
  • hot-path unit tests: SuggestTest, DictionaryGroupTest, InputLogicTest, SettingsContainerTest
  • authoritative full unit gate: 364 tests, only the four baseline Windows ParserTest failures, no new failures

github-actions Bot and others added 30 commits August 20, 2026 01:19
…ure typing screen, remove duplicate gesture lib loader
LeanBitLab and others added 28 commits August 28, 2026 04:59
…gate

translateAsync() gated the built-in-AI fallback on
ProofreadService.getApiKey(), which reads only the Gemini key
(KEY_API_KEY = "gemini_api_key"). With provider OPENAI (custom
OpenAI-compatible endpoint) or GROQ, that check returned false even
when the provider was fully configured, so every AI-fallback branch
short-circuited to Result.failure("Translation plugin not available")
with a misleading "Offline model not downloaded" toast - before any
network request was made.

Proofreading was unaffected because performAsyncOperation() performs a
provider-aware token check, and GGUF translation on the offline flavor
checks getModelPath() instead.

Fix: check the active provider's token (Gemini key / Groq token /
HuggingFace token) the same way.

Fixes LeanBitLab#459
Ref LeanBitLab#456
…er-key-check

fix(translation): check active provider's token in translateAsync AI gate
Preserve LeanTypeDual's four-flavor privacy model, fork release identity, bundled offline AI, two-thumb typing, and fallback gesture engine while integrating upstream v4.1.3-v4.1.8.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@AsafMah
AsafMah merged commit 94fc08a into dev Sep 3, 2026
2 checks passed
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