IME conversion Enter still submits prematurely in dialogs and long-running (HITL) response input — chat-input fix from #44/#80 not applied
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 267
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 9
Description
**[Description of issue]**
PR #44 and #80 fixed premature submission with CJK IMEs for the **main chat textarea** by ignoring Enter while composing (`event.isComposing || event.keyCode === 229`) in `handleChatInput`.
However, every other `(keydown.enter)` binding in the app still submits immediately when pressing Enter to confirm an IME conversion candidate, because the handlers are invoked without the event and never check `isComposing`:
- `long-running-response.html` — response input for long-running function calls (HITL): `(keydown.enter)="onSend()"` (2 occurrences)
- `add-item-dialog.component.html` — "Create a new app" dialog: `(keydown.enter)="createNewApp()"`
- `add-tool-dialog.component.html`
- `add-callback-dialog.component.html`
- `add-eval-session-dialog.component.html`
- `new-eval-set-dialog-component.component.html`
The long-running-response input is especially painful: for agents built around human-in-the-loop (request-input) flows, every Japanese response gets submitted half-composed.
**[How to re-produce]**
1. Run `adk web` with a Japanese (or Chinese/Korean) IME.
2. Open any input above — e.g. a long-running function asking for user input, or the "Create a new app" dialog.
3. Type Japanese text and press Enter to confirm the conversion candidate.
4. The form submits with half-composed text instead of confirming the conversion.
**[Proposal]**
Apply the same guard as #44/#80 to these handlers (pass `$event` and early-return when `$event.isComposing || $event.keyCode === 229`). Extracting it into a shared directive would prevent this bug from reappearing in future dialogs.
Related: #6, #51, #81 (chat input; fixed by #44 / #80).
Contributor guide
Research direction
Start by comparing the existing IME guard in the main chat textarea with the Enter bindings in long-running-response.html and the listed add-item, add-tool, add-callback, add-eval-session, and new-eval-set dialog templates. Reproduce the Japanese, Chinese, or Korean IME flow, then verify that each listed input confirms composition before submitting and that ordinary Enter submission still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100