Skip to content

Wait for a composed character before the desktop question box asks - #508

Merged
davidmckayv merged 4 commits into
mainfrom
fix/desktop-ask-ime-enter
Sep 12, 2026
Merged

Wait for a composed character before the desktop question box asks#508
davidmckayv merged 4 commits into
mainfrom
fix/desktop-ask-ime-enter

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

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.tsx now guards the Enter handler on composition state: Chromium marks that keydown isComposing, and the macOS WebKit webview sends it after compositionend with 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.tsx gains a test that an Enter carrying isComposing (Chromium) or keyCode 229 (macOS webview) does not call ask_the_bot, while an ordinary Enter still does (covered by the existing ask flow).

@davidmckayv
davidmckayv merged commit 19fdcbb into main Sep 12, 2026
@davidmckayv
davidmckayv deleted the fix/desktop-ask-ime-enter branch September 12, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant