fix(input): don't submit on Enter during IME composition

Closed
DI
2mo ago
+4-4

Summary

Pressing Enter to confirm an IME conversion (Japanese/CJK) was being treated as "send", submitting half-converted text and making the app unusable for IME input.

Fix

Guard the Enter-to-submit handlers with !e.nativeEvent.isComposing && e.keyCode !== 229 across all prompt inputs:

  • TaskInput.tsx
  • AgentPane.tsx (FollowUpInput)
  • Pill.tsx
  • LogsApp.tsx

isComposing is the standard signal; keyCode === 229 covers IMEs/browsers that fire a synthetic key during composition. ChatTurn.tsx uses Cmd/Ctrl+Enter and is unaffected.

Test plan

  • With a Japanese IME: type + convert + Enter → conversion is confirmed, message is NOT sent.
  • Press Enter on confirmed text → message sends as before.
  • Shift+Enter still inserts a newline.

Closes #445


Summary by cubic

Stop submitting on Enter during IME composition so conversion confirms without sending. Fixes #445.

  • Bug Fixes
    • Guard Enter-to-submit with !e.nativeEvent.isComposing && e.keyCode !== 229.
    • Applied to TaskInput, AgentPane FollowUpInput, Pill, and LogsApp.
    • Shift+Enter still inserts a newline; ChatTurn’s Cmd/Ctrl+Enter remains unchanged.