fix: Prevent accidental IME submission and add bottom padding for Kanban cards #121
+11
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
Summary
This PR fixes two UI issues:
IME Composition Bug: When using Japanese (or other language) IME input, pressing Enter to confirm character conversion would accidentally submit the message instead of just confirming the IME selection.
Content Clipping: Kanban cards at the bottom of the viewport were being cut off when the debug panel was closed.
Problem
IME Issue
Users typing in Japanese (or Chinese, Korean, etc.) use an Input Method Editor (IME) that requires pressing Enter to confirm character selection. Without checking
isComposing, the Enter keypress would both confirm the IME selection AND submit the form, causing incomplete or garbled messages to be sent.Padding Issue
When the debug panel is closed,
paddingBottomwas set toundefined, which caused the main content area to extend to the very bottom of the viewport. This resulted in Kanban cards being partially hidden behind the browser chrome or cut off.before
After
Solution
IME Fix
Added
!e.nativeEvent.isComposingcheck to allhandleKeyDownfunctions that submit on Enter:Padding Fix
Set a minimum bottom padding of 48px when the debug panel is closed:
Files Changed
ui/src/components/AssistantChat.tsxui/src/components/ExpandProjectChat.tsxui/src/components/SpecCreationChat.tsxui/src/components/FolderBrowser.tsxui/src/components/TerminalTabs.tsxui/src/App.tsxTesting
IME Test:
Padding Test:
D)Browser Compatibility
KeyboardEvent.isComposingis supported in all modern browsers:Summary by CodeRabbit
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.