fix: align icons and fix text overflow in chat messages#1682
Open
reverb256 wants to merge 4 commits intoPostHog:mainfrom
Open
fix: align icons and fix text overflow in chat messages#1682reverb256 wants to merge 4 commits intoPostHog:mainfrom
reverb256 wants to merge 4 commits intoPostHog:mainfrom
Conversation
- Add pl-3 and min-w-0 to ThoughtView for consistent left padding with AgentMessage and ToolCallBlock - Add align="center" to outer Flex in ToolCallView and ExecuteToolView replacing the fragile pt-px hack for icon vertical alignment - Add truncate and min-w-0 to tool titles preventing overflow on long tool names, descriptions, and commands - Fix ExpandableIcon layout shift on hover by wrapping in a fixed-size container with absolute positioning for the hover icon - Add unit tests verifying alignment and overflow patterns
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.
Problem
Chat message components have inconsistent icon alignment and text overflow:
ThoughtViewmissing left padding (pl-3) — misaligned with AgentMessage/ToolCallBlockpt-pxhack instead of properalign=centerExpandableIconcaused layout shift on hover (two icons in flow, swapping)Closes #1193
Fix
ThoughtView.tsxpl-3+min-w-0to root BoxToolCallView.tsxalign=centerto outer Flex,truncateon titleExecuteToolView.tsxalign=centerto outer Flex,truncateon descriptiontoolCallUtils.tsxExpandableIconwith absolute positioning to prevent layout shiftTests
9 new tests across 3 test files verifying alignment and overflow behavior.