bug(webchat-v2): Enter sends the message while confirming IME composition
Summary
In WebChat v2, pressing Enter to confirm an IME conversion also sends the chat message. The keypress is intended to finish composing text, not to submit the message, so an unfinished message is sent before I am ready.
This appears to be a recurrence of the user-visible behavior previously addressed in the old web UI. It does not establish that the underlying cause is identical.
Steps to reproduce
- Open the WebChat v2 chat screen and focus the message input.
- Start composing text with an IME, such as Japanese input, and leave the conversion unconfirmed.
- Press Enter to confirm the current conversion.
Actual behavior
The message is submitted when Enter is used to confirm the IME conversion.
Expected behavior
Enter consumed by IME composition should only confirm the conversion and leave the message in the input. A subsequent Enter outside composition should send the message normally. Shift+Enter should continue to insert a newline.
Related history
- #715 added protection against submitting during IME composition in the old web UI.
- #1139 reported the Safari-specific version of this problem and was closed after #1140 was merged.
- The merged WebChat v2 PR #4384 explicitly lists IME Enter sending mid-composition as a known remaining issue under "Out of scope".
This report tracks the behavior in WebChat v2 separately from the closed issue for the old UI.
Current code observation
In the current main implementation, the Enter-to-send branch in chat-input.tsx calls preventDefault() and then handleSend() after checking whether sending is disabled. The keyboard handler has no IME composition guard.
This is a source inspection finding; it has not been verified with a browser event trace.
Reference and validation
GoogleChrome modern-web-guidance: IME-safe enter-to-submit describes this failure mode and the Safari-specific event-ordering caveat.
A fix should ensure that IME confirmation does not submit or interfere with composition, while preserving normal Enter submission and Shift+Enter newlines. Verification should include real IME input in supported browsers, including Safari where applicable.
Environment
- Affected interface: WebChat v2
Source: nearai/ironclaw