Skip to content

fix: match text and image attachment heights in conversation timeline#23593

Merged
kylecarbs merged 1 commit intomainfrom
fix/attachment-height-mismatch
Mar 25, 2026
Merged

fix: match text and image attachment heights in conversation timeline#23593
kylecarbs merged 1 commit intomainfrom
fix/attachment-height-mismatch

Conversation

@kylecarbs
Copy link
Copy Markdown
Member

Problem

Text attachments (InlineTextAttachmentButton) and image thumbnails (ImageThumbnail) rendered at different heights when displayed side by side in user messages. Text cards had no explicit height (content-driven), while images used h-16 (64px).

Changes

ConversationTimeline.tsx

  • Added h-16 to InlineTextAttachmentButton to match ImageThumbnail
  • Added isPlaceholder prop: when the content hasn't been fetched yet (file_id path), renders "Pasted text" in sans-serif text-sm with items-center alignment instead of monospace text-xs
  • Once real content loads, it still renders in font-mono text-xs with formatTextAttachmentPreview()

ConversationTimeline.stories.tsx

  • Added UserMessageWithMixedAttachments story showing a text attachment and image side by side as a visual regression guard

Text attachments rendered by InlineTextAttachmentButton had no explicit
height, while image thumbnails used h-16 (64px). When both appeared side
by side in the sent message view, they were visibly different heights.

- Add h-16 to InlineTextAttachmentButton to match ImageThumbnail
- Switch placeholder ("Pasted text") to sans-serif text-sm with
  items-center alignment instead of monospace text-xs
- Use isPlaceholder prop so real content still renders in font-mono
- Add UserMessageWithMixedAttachments story as visual regression guard
@kylecarbs kylecarbs enabled auto-merge (squash) March 25, 2026 14:36
@kylecarbs kylecarbs merged commit fdc9b3a into main Mar 25, 2026
29 checks passed
@kylecarbs kylecarbs deleted the fix/attachment-height-mismatch branch March 25, 2026 14:37
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants