Reject late suggestions after hardware keyboard suppression - #22
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a hardware keyboard suppresses the IME, the immediate cleanup path retired local input while leaving already-running suggestion requests valid. A late decoder could repopulate the retired UI. Invalidate through the existing batch-lock boundary before the composition-finish attempt, preserve the active framework session, and clear transient state in finally. The existing subtype path uses the extracted helper with unchanged behavior.
Validation: specialist implementation plus independent Terra review; 12 JVM / 121 API 35 x86-64 emulator tests passed, followed by both final-source focused regressions; lint zero errors (4,021 warnings, one hint), unsigned release assembly and 18-document notice checks passed. Controlled queues prove old pending and late results reject, a current request still completes, the existing single host finish call is retained, and a closed session is not reopened. The transient-cleanup spy verifies invocation only. No physical keyboard-attachment acceptance or new signed APK publication is claimed.
Remote acceptance: https://github.com/RioPlay/utterleaf/actions/runs/34616357289 passed at b75526a. Downloaded XML confirms 121 tests, zero failures/errors/skips; external IME process recovery and all six dictionary publication crash cases report pass. Merged as 4165ce0.