fix(desktop): let IME users confirm text without submitting a chat answer
What & why
Fixes #9624. When someone presses Enter to finish composing a character in a chat question, the desktop can submit the answer or advance to the next question before they finish typing.
Use the existing IME composition guard in the question text input. In the Electron reproduction, confirming the Korean character 각 sent one unintended response before the fix and zero afterward. Pressing Enter again after composition submitted the completed answer exactly once. The test uses the actual question component with a local callback.
Verification: The focused IME regression tests, lint and typecheck passed. The repository checks include the full Linux test and terminal integration suites on the PR commit.
How I tested it
Bun 1.4.3, frozen lockfile install with scripts disabled, source branched from current main at b5da7a52bcdac3f547a08ab148cb13a078612dc3.
Regression and renderer behavior
- Before the fix, both new regression cases fail: composing Enter invokes
onRespondonce instead of zero. - After the fix, the new cases and the existing question-page tests pass: 5 pass, 0 fail, 14 assertions.
- Rendered the actual repository
QuestionFormin a separate Electron 44.10.0 window, using locked Vite 8.3.6, React plugin 6.2.1 and React Compiler 1.0.0. - Chromium CDP
Input.imeSetCompositionproducesㄱ → 가 → 각. The composing Enter reportsisComposing: true: baseline responds 1 time, fixed code responds 0 times. After composition ends, ordinary Enter responds 1 time and preserves각.
| Before: composing Enter submits | After: composing Enter stays in the input |
|---|---|
![]() | ![]() |
Evidence manifest. Images are on a separate evidence branch and add no files to this PR.
Boundary: this is actual-component / Chromium IME verification with a local response callback. No running agent or database was involved. It is not a physical macOS keyboard test or a full installed-app question/answer flow. Repeated Korean character insertion was not reproduced, and this PR does not claim to fix it.
Upstream checks
CLA Assistant passed. The upstream CI run and Deploy Preview still require maintainer approval. The Linux result below is from a local run.
Repository checks
Linux, PR head 7f0f088: all 31 Turbo tasks passed, including terminal integration, with forced execution. I ran the tracked source of this commit in an isolated non-root ARM64 Linux container with Bun 1.4.3, Node 22, a frozen dependency install, and a login-shell PATH modeled on Ubuntu. The focused question suites passed 5/5 (14 assertions). No source changes from other PRs were included in the passing run.
The runner uses Docker --init to reap orphaned subprocesses and --tmpfs /tmp:rw,exec,mode=1777,size=2g for executable temporary fixtures with local filesystem notifications. Run bun x turbo test test:integration:terminal --force --concurrency=4 --log-order=stream.
- With overlay-backed temporary files, 30/31 tasks passed. Two GNU tail session-start tests missed the event. Both passed in isolation on tmpfs; independent fix #9620 also made both pass on overlay.
- With tmpfs but no init reaper, 29/31 tasks passed. Two subprocess-cleanup tests still observed dead children, and the container showed zombie processes parented to PID 1. With init, both passed.
Combined macOS verification
On macOS arm64 (Bun 1.4.3, Node 22.23.4, /bin/zsh), I applied the following seven companion patches locally to IME commit 7f0f088. I verified that applying the published diffs to that commit reproduces the tested source tree exactly.
| Companion PR | Change included in the run |
|---|---|
| #9658 | Compare overnight recurrence slots by their UTC instants. |
| #9659 | Account for the directories macOS adds to the shell PATH. |
| #9662 | Wait for in-flight filesystem watcher release during shutdown. |
| #9664 | Set terminal capabilities explicitly in hyperlink tests and cover plain URLs on a dumb terminal. |
| #9665 | Exercise the session scan limits with small real directory trees. |
| #9666 | Reduce Git subprocesses when setting up test repositories. |
| #9667 | Check direct and aliased error-message use in one source scan. |
TERM=dumb TURBO_FORCE=true bun run test passed 30/30 Turbo tasks in one invocation (zero cache hits, 2m 40.674s), using the repository’s default parallelism and timeouts. All 2,861 host-service tests passed. Repo-wide lint and typecheck also passed on this combination.
The result above applies to the combined checkout. On the IME commit alone, earlier macOS runs encountered locale and PATH assertions, CLI terminal assumptions, intermittent timeouts, and one native FSEvents SIGTRAP. The SIGTRAP did not recur in the passing run; its native cause remains unconfirmed.
No user-facing strings changed; no catalogs were regenerated for submission.
Checklist
- PR title follows conventional commits (
type(scope): subject) -
bun run lintandbun run typecheckpass (CI fails on lint warnings too) - "Allow edits from maintainers" is checked on fork PRs
- I have signed the CLA (existing signature verified)
Summary by CodeRabbit
- Bug Fixes
- Pressing Enter while composing text with an input method editor no longer submits the question prematurely.
- The entered text is preserved during composition, and pressing Enter after composition ends submits the question with the selected custom-field value.

