fix: keep backspace acceleration consistent across composing states - #503
Draft
Dvredin wants to merge 2 commits into
Draft
fix: keep backspace acceleration consistent across composing states#503Dvredin wants to merge 2 commits into
Dvredin wants to merge 2 commits into
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.
Problem
In 4.2.2, accelerated Backspace performs a second deletion only in the committed-text branch. The composing-word branch performs one deletion per event even after the same acceleration threshold. Deleting a space can resume the previous word, so a held Backspace changes its deletion budget as it crosses between the two states.
This is a narrowly scoped consistency fix, related to the held-Backspace part of #439. It does not implement that issue's vertical selection gestures or new acceleration curves and should not close the whole issue.
Change
WordComposer's back.No dictionary/scoring changes, swipe-library changes, settings, translations or dependency upgrades.
Verification
InputLogicTest(not a standalone reimplementation of the logic).InputLogicTestpasses: 86 tests, zero failures.:app:testStandardfullRunTestsUnitTest: 218 tests discovered, 5 skipped, zero failures/errors.:app:compileOfflineRunTestsKotlin(the current PR workflow command): passes locally.git diff --check: passes../gradlew clean :app:testStandardfullRunTestsUnitTest :app:assembleStandardfullDebug :app:compileOfflineRunTestsKotlinpasses. Test totals remain 218 discovered, 5 skipped, zero failures/errors. APK signature and 16 KiB ZIP alignment checks pass. The debug package is separate from the release installation. Physical-device installation/behavior are not yet tested.:app:lintStandardfullDebug: fails on both unchanged 4.2.2 and this patch with 1018 errors, 623 warnings and 11 hints. A normalized report comparison on follow-upca5bd73found identical diagnostics, with no additions or removals. This is not a green-lint claim.34386995467isaction_required(fork workflow requires maintainer approval), not a CI pass.The initial offline unit-test variant failed during test-manifest merging because its minSdk is 21 and
androidx.graphics:graphics-path:1.1.0requires 23. Standard Full uses minSdk 23; the test source and fix are shared. No SDK/dependency workaround was added to this PR. The offline compile task above passes.Review follow-up
The first revision (
6862fbe) was found to unlearn multiple intermediate prefixes during one accelerated committed deletion and skip suggestion resumption when the defensive selection query found a selection. Follow-upca5bd73preserves the baseline's successful-unlearning guard and restores the selection branch's post-delete handling without an extra deletion.Two additional regression tests pass on unchanged 4.2.2, fail on the first revision, and pass with the follow-up. The original test APK has been withdrawn and replaced; use only the follow-up build. Clean tests, APK build and the offline compile task were repeated after the follow-up.
Draft / device validation
Physical-device validation is pending with the reporter. The reproducible unit tests establish the number of deletion steps and state consistency, not a measured UI latency improvement. The reported intermittent slowdown may also involve InputConnection latency or other independent causes, which this PR does not attempt to fix.
Please review the approach before merging; this remains a draft until manual checks cover holding across word boundaries, ordinary taps, selected text, autocorrection undo and emoji.
AI-assisted implementation; automated evidence and remaining device-validation limits are stated above.