Wait for a composed character before the desktop question box asks - #508
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
guidovizoso,
mxmzb and
tylerslaton
as code owners
September 12, 2026 22:14
…nter # Conflicts: # CHANGELOG.md
…nter # Conflicts: # CHANGELOG.md
…nter # Conflicts: # CHANGELOG.md
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.
What this changes
On the desktop setup's final screen, the "Your question" box sent the question the instant Enter was pressed. But Enter is also how a character being typed through an input method (Japanese, Chinese, Korean) is confirmed, so a person mid-composition had their question sent with the last character still unconfirmed.
desktop/src/Ask.tsxnow guards the Enter handler on composition state: Chromium marks that keydownisComposing, and the macOS WebKit webview sends it aftercompositionendwith key code 229. Either one waits; an ordinary Enter still asks.Where it runs
Desktop app only. No server, app, worker, or image change.
Proof
desktop/src/App.test.tsxgains a test that an Enter carryingisComposing(Chromium) orkeyCode 229(macOS webview) does not callask_the_bot, while an ordinary Enter still does (covered by the existing ask flow).