scribe-org / scribe-org/Scribe-Android

Code improvements to make Scribe ready for future features

Open
#426 51 comments 3 reactions 5 assignees View on GitHub

@growabeard is already working on this.

Since Sep 13, 2026.

-priority- hackathon refactor
Dominant language
C++
Stars
99
Forks
121
Avg merge
4d 7h
Merged PRs (30d)
16

Description

Terms
Description

After working on Add invalid state to keyboard commands and show localized Not in Wikidata and app crashing at startup on api 30 I've noticed some issues, which could lead to maintenance problems in future, and also push away potential maintainers.

Specifically, I see problems with GeneralKeyboardIME and and classes inheriting it.

Main things that, in my opinion, should be addressed:

  • GeneralKeyboardIME mixes view management, database access, state handling, and business logic in ~2,100 lines. The suppression of TooManyFunctions and LargeClass hints at maintainability issues. This makes it difficult for potential contributors to understand or extend the code.
  • isTablet duplicates in every subclass
  • heavy use of non-null assertions (!!) in the subclasses when setting up the keyboard view
  • fuzzy state management without stateholder
  • base class knows about classes inheriting it (i.e baseKeyboardOfAnyLanguage function and many others)
  • languages logic is based on strings comparison instead enums or sealed classes (i.e getLanguageAlias function)
  • various code style issues (like using "when" in setupCommandBarTheme function), invalid log tags (like "my-tag") and so on
Contribution

I would like to discuss if necessary and fix some of listed problems in one (or multiple) separate PR's
Let me know, if you ok with it

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.