desktop icon indicating copy to clipboard operation
desktop copied to clipboard

IME composition Enter is treated as "send" (Japanese/CJK input unusable)

Open dim0627 opened this issue 5 months ago • 0 comments

https://github.com/user-attachments/assets/685b9d7b-8b0c-4f2d-8f0b-d55e443df6eb

Summary

When composing text with an IME (Japanese/Chinese/Korean), pressing Enter to confirm the conversion candidate instead submits the message. The composition is sent half-converted, making the app effectively unusable for CJK input.

Steps to reproduce

  1. Set OS input source to Japanese (or any IME).
  2. Focus the task/chat input.
  3. Type にほんご, press Space to convert to 日本語.
  4. Press Enter to confirm the conversion.

Expected: Enter confirms the IME candidate; text stays in the box. Actual: The message is submitted immediately, often with unconfirmed/partial text.

Environment

  • Git commit: f073b75 (current main HEAD).
  • OS: macOS (Darwin 25.5.0). The buggy handlers live in the renderer, so this is not OS-specific — it reproduces with any IME on any OS (Japanese, Chinese, Korean).
  • Provider: Provider-agnostic. The bug is in the input keydown handlers and does not depend on the agent provider (reproduces with Claude Code, Codex, etc.).

A screen recording of the repro will be attached below.

Root cause

The keydown handlers submit on Enter && !shiftKey without checking whether an IME composition is in progress. Affected inputs:

  • app/src/renderer/hub/TaskInput.tsx
  • app/src/renderer/hub/AgentPane.tsx (FollowUpInput)
  • app/src/renderer/pill/Pill.tsx
  • app/src/renderer/logs/LogsApp.tsx

Fix

Guard each submit-on-Enter branch with !e.nativeEvent.isComposing && e.keyCode !== 229. PR incoming.

dim0627 avatar Jun 13 '26 04:06 dim0627