Skip to content

fix(web): restore backspace-input token reconstruction 🚂 - #16290

Merged
jahorton merged 3 commits into
epic/autocorrectfrom
fix/web/bksp-reconstruction
Aug 4, 2026
Merged

fix(web): restore backspace-input token reconstruction 🚂#16290
jahorton merged 3 commits into
epic/autocorrectfrom
fix/web/bksp-reconstruction

Conversation

@jahorton

Copy link
Copy Markdown
Contributor

Before epic/autocorrect, input of a pure backspacing transform would perform special operations within the predictive-text worker, reconstructing the remainder of the token and erasing fat-finger data. This PR fixes the regression.

This is notably useful when attempting to erase part of an applied suggestion, as applied suggestions wholesale-replace the original versions of affected tokens with a single transform input. Backspacing into the transform will then break that unitary transform into pieces better suited for ongoing predictive-text operations.

Build-bot: skip build:web build:android

User Testing

TEST_SUGGESTION_ERASURE: Using Keyman for Android...

  • apply a suggestion for a long word
  • progressively erase it with backspace inputs
  • verify that reasonable suggestions are displayed after each backspace.

TEST_SMOKE: Using Keyman for Android, play around with a keyboard-model pair supporting predictive text for two minutes. If any odd, unusual, or unexpected behaviors occur, fail this test and report them here.

  • Do not use a Khmer-script keyboard for this, as there are separate known issues for such keyboards.

Before epic/autocorrect, input of a pure backspacing transform would perform special operations within the predictive-text worker, reconstructing the remainder of the token and erasing fat-finger data.  This PR fixes the regression.

This is notably useful when attempting to erase part of an applied suggestion, as applied suggestions wholesale-replace the original versions of affected tokens with a single transform input.  Backspacing into the transform will then break that unitary transform into pieces better suited for ongoing predictive-text operations.

Build-bot: skip build:web build:android
@jahorton
jahorton requested a review from ermshiperete July 29, 2026 21:31
@github-project-automation github-project-automation Bot moved this to Todo in Keyman Jul 29, 2026
@keymanapp-test-bot keymanapp-test-bot Bot added has-user-test user-test-required User tests have not been completed labels Jul 29, 2026
@keymanapp-test-bot

keymanapp-test-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

User Test Results

Test specification and instructions

Test Artifacts

  • Android
    • KeyboardHarness apk - build : all tests passed (no artifacts on BuildLevel "build")
    • KMSample1 apk - build : all tests passed (no artifacts on BuildLevel "build")
    • KMSample2 apk - build : all tests passed (no artifacts on BuildLevel "build")
  • Web
    • KeymanWeb Test Home - build : all tests passed (no artifacts on BuildLevel "build")

@keymanapp-test-bot keymanapp-test-bot Bot changed the title fix(web): restore backspace-input token reconstruction fix(web): restore backspace-input token reconstruction 🚂 Jul 29, 2026
@keymanapp-test-bot keymanapp-test-bot Bot added this to the A19S34 milestone Jul 29, 2026
@Meng-Heng

Copy link
Copy Markdown
Contributor

Test Specs

  1. Android 15.0 Pixel 9a API 35
  2. Keyman for Android 19.0.252-alpha-test-16290

Test Results

  • TEST_SUGGESTION_ERASURE (PASSED):
  1. Launch Keyman and Dismiss the "Get Started" screen
  2. Apply And and and from the default suggestions
  3. Text result: And and
  4. Type sug, Apply suggestions
  5. Text result: And and suggestions
  6. Continue typing with approx, Apply approximately
  7. Text result: And and suggestions approximately
  8. Backspace once
  9. Text result: And and suggestions approximately
    • Predictions: approximately
  10. Keep backspacing until reaching the typed text of And and suggestions appro
    • Predictions: "approach appropriate approved approval" ...etc.
  11. Backspace once, text result And and suggestions appr
    • Predictions: "appreciate approach appropriate approved" ...etc.
  12. Backspace once, text result And and suggestions app
    • Predictions: "app apparently appreciate apply" ...etc.
  13. Backspace once, text result And and suggestions ap
    • Predictions: "app apparently appreciate apply" ...etc.
  14. Backspace once, text result And and suggestions a
    • Predictions: "and are as at" ...etc.
  15. Backspace once, text result And and suggestions
    • Predictions: "and are as at" ...etc.
  16. Backspace once, text result And and suggestions
    • Predictions: suggestions
  17. Backspace once, text result And and suggestion
    • Predictions: "suggestion suggestions"
  18. Backspace twice, text result And and suggesti
    • Predictions: "suggestions suggestion suggesting" ...etc.
  19. VERIFIED: The suggestions are working to predict the current typed text.
  • TEST_SMOKE (PASSED):
  1. Continue to the next line after TEST_SUGGESTION_ERASURE
  2. Type percisel (typing in correctly)
  3. Predictions: precisely
  4. Apply suggestion
  5. Text result precisely
  6. Backspace one at a time over the word precisely
  7. The word suggested are acceptable
  8. Retype and Reapply precisely
  9. Insert the next line
  10. Apply the and the from the default suggestions
  11. Type prett
  12. Apply prettier
  13. Backspace over each character of prettier
  14. VERIFIED: The prediction works correctly.

Base automatically changed from fix/web/empty-prediction-cases to epic/autocorrect July 30, 2026 16:24
@keyman-server keyman-server modified the milestones: A19S34, A19S35 Aug 3, 2026
@jahorton
jahorton merged commit c6b55c5 into epic/autocorrect Aug 4, 2026
9 of 10 checks passed
@jahorton
jahorton deleted the fix/web/bksp-reconstruction branch August 4, 2026 13:07
@github-project-automation github-project-automation Bot moved this from Todo to Done in Keyman Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants