Conversation
… gradient tooltip - Add expand button with Maximize2/Minimize2 icons - Implement 3-state height management (normal/50%/80%) - Smart double-click detection with 300ms delay - Height calculation based on session-view - 200px message space - Custom CSS tooltip with dark gradient background and backdrop blur - Send button anchored at bottom via margin-top: auto - Smooth CSS transitions throughout - Double-click at 80% now reduces to 50% (not normal) - Removed all debug console.log statements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
feat: Implement expandable chat input with double-click detection and gradient tooltip
Summary
This PR adds an expand/minimize button to the chat input that allows users to toggle between 3 height states: normal (default/original), 50%, and 80% of available space. The feature includes smart double-click detection for quick navigation between states and a polished tooltip with gradient background for better visibility.
Changes
1. Expand Button Component (
packages/ui/src/components/expand-button.tsx)2. Prompt Input Enhancements (
packages/ui/src/components/prompt-input.tsx)expandStatesignal with 3 states:"normal" | "fifty" | "eighty"calculateExpandedHeight()function:.session-viewheightexpandedHeightmemo for reactive height updateshandleExpandToggle()function with textarea focus preservation.prompt-input-field-containerto use reactive height3. Styling (
packages/ui/src/styles/messaging/prompt-input.css).prompt-expand-toppositioning (top: 0.3rem, right: 3.5rem).prompt-expand-buttonstyles with hover/active stateslinear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%).prompt-input-actionsfromjustify-betweentojustify-startmargin-top: autoto.send-buttonto anchor at bottom.prompt-input-field-containerTechnical Details
Height Calculation Logic
Double-Click Detection Algorithm
State Transitions
Tooltip Text by State
Behavior Notes
Send button anchoring: The Send button stays at the bottom of the action bar using
margin-top: auto. Stop and Arrow buttons move with height changes (accepted behavior).Scrollbar support: When expanded, the textarea gets
overflow-y: autoto handle content overflow gracefully.Focus preservation: Expanding/collapsing keeps focus on the textarea for seamless typing.
Smooth transitions: All height changes animate over 250ms; tooltip fade-in is 200ms.
Tooltip positioning: The tooltip uses CSS
::afterpseudo-element withdata-tooltipattribute for instant hover feedback (no 1-2s delay like nativetitle).Testing Instructions
Basic expansion:
Double-click navigation:
Tooltip testing:
Content testing:
Keyboard shortcuts:
Cmd+Enterto send while expandedEscto exit shell mode (if applicable)↑↓for history navigation still worksBrowser Compatibility
This implementation uses standard CSS features:
backdrop-filterfor blur effect (supported in Chrome 76+, Firefox 103+, Safari 9+)Screenshots
Checklist
Related Issues
Breaking Changes
None. This is a new feature that doesn't modify existing behavior.