fix: reduce IME composition end Enter tail window from 80ms to 20ms - #387
Open
Is14w wants to merge 1 commit into
Open
fix: reduce IME composition end Enter tail window from 80ms to 20ms#387Is14w wants to merge 1 commit into
Is14w wants to merge 1 commit into
Conversation
The 80ms unconditional suppression window after compositionend was too aggressive — it blocked Enter when users selected IME candidates with non-Enter keys (e.g. number keys) and immediately pressed Enter to send. 20ms is tight enough to still catch the inseparable compositionend→Enter keydown pairs in problematic IME implementations, while avoiding false positives from fast typists. Co-Authored-By: Claude <noreply@anthropic.com>
StackCairn
marked this pull request as draft
August 6, 2026 07:17
Contributor
|
PR governance checks passed. Awaiting human review. |
Is14w
marked this pull request as ready for review
August 6, 2026 07:26
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.
Linked issue
Closes #21
Summary
The 80ms unconditional suppression window after compositionend was too aggressive — it blocked Enter when users selected IME candidates with non-Enter keys (e.g. number keys) and immediately pressed Enter to send.
20ms is tight enough to still catch the inseparable compositionend→Enter keydown pairs in problematic IME implementations, while avoiding false positives from fast typists.
Change scope
crates/agent-gui/src/components/chat/MentionComposer.tsxcrates/agent-gateway/web/src/components/chat/MentionComposer.tsxScreenshots / preview
N/A — this is a single-constant timing change (80ms → 20ms) with no visual effect. The behavior difference is only perceptible by fast typists using IME number-key selection followed immediately by Enter.
Verification
git diff --check— clean, no trailing whitespacenode scripts/check-mirror.mjs— 115 files pass, GUI/WebUI mirrors byte-identicalcargo check --manifest-path crates/agent-gui/src-tauri/Cargo.toml --tests— pass (no new warnings)pnpm test:frontend— 2 pre-existing failures unrelated to this change (mention-refetch, presets sync)pnpm lint— pre-existing errors, none introduced by this changePre-submit checklist