Skip to content

fix: improve chat input UX and IME composition handling#195

Closed
JiahaoZhu11 wants to merge 0 commit intodifferent-ai:devfrom
JiahaoZhu11:fix/chat-input-ime-and-ux
Closed

fix: improve chat input UX and IME composition handling#195
JiahaoZhu11 wants to merge 0 commit intodifferent-ai:devfrom
JiahaoZhu11:fix/chat-input-ime-and-ux

Conversation

@JiahaoZhu11
Copy link
Copy Markdown
Contributor

@JiahaoZhu11 JiahaoZhu11 commented Jan 22, 2026

Summary

This PR improves the chat input component with two main enhancements:

  1. Better UX for the input bubble - The entire input bubble now behaves as a cohesive input component
  2. Fixed IME composition handling - Enter key now works correctly for Chinese/Japanese/Korean input

Changes

Chat Input UX

  • Entire input bubble is now clickable to focus the textarea (not just the textarea itself)
  • Added cursor-text cursor style to indicate the bubble is interactive
  • Send button no longer shows tooltip or responds to hover when hidden (empty input)
  • Removed focus outline from textarea since the outer bubble already shows focus state via focus-within

IME Composition Fix

  • Added compositionstart/compositionend event handlers to track IME state
  • Implemented skipNextEnter flag to differentiate between:
    • Enter to confirm character selection (should not send)
    • Enter to send message (should send)
  • Fixes the issue where pressing Enter during IME composition would send the incomplete text instead of confirming the selected characters

Testing

  • Click anywhere on input bubble → textarea focuses
  • Empty input → send button hidden, no tooltip on hover
  • With text → send button visible, tooltip shows on hover
  • Type Chinese/Japanese/Korean with IME → Enter confirms selection
  • After confirming IME selection → Enter sends message
  • Click to select IME candidate → next Enter sends message correctly

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@Golenspade
Copy link
Copy Markdown
Contributor

can you deliver a snapshot,so we can align the visual design

@benjaminshafii
Copy link
Copy Markdown
Member

Automated message: IME handling + click-to-focus UX looks good and matches the polished input behavior we want.

Two items:

  • PR is currently CONFLICTING with dev; please rebase.
  • Please double-check skipNextEnter doesn’t swallow a real Enter when there was no composition event (should be covered, but worth a quick test with IME + normal typing).

I can’t provide a snapshot from here; a short gif/screenshot of the updated input would help design review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants