Skip to content

fix(autocorrect): remember every reverted correction for a word - #980

Merged
LeanBitLab merged 1 commit into
mainfrom
fix/remember-reverted-corrections
Nov 28, 2026
Merged

LeanBitLab merged 1 commit into
mainfrom
fix/remember-reverted-corrections

Conversation

@LeanBitLab

Copy link
Copy Markdown
Owner

Problem

  • Only one rejected correction was kept per typed word, so undoing a second candidate allowed the first one again.
  • Picking any suggestion by hand forgot the entry, even when picking the typed word.

Change

  • Keep a set of rejected candidates per typed word (still limited to 30 words).
  • A manual pick removes only the picked candidate.

Verification

  • RevertedCorrectionHistoryTest (4), InputLogicTest (155, 1 skipped) and SuggestTest (33) pass.
  • The new input test fails when the old clearing behaviour is simulated.
  • Waydroid (earlier debug build): thier stayed unchanged after undoing both thierry and thi er.
  • Not device tested: picking a suggestion by hand.

Rejected corrections were stored one per typed word, so undoing a second
candidate allowed the first one again. Picking any suggestion by hand also
forgot the entry, even when the picked word was the typed one.

Keep a set of rejected candidates per typed word and only remove the
candidate that is picked by hand.
@LeanBitLab
LeanBitLab merged commit 40a8a19 into main Nov 28, 2026
1 check passed
@LeanBitLab
LeanBitLab deleted the fix/remember-reverted-corrections branch November 28, 2026 06:30
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.

1 participant