Skip to content

feat: add collapsible user messages with 3-line clamp#816

Merged
miurla merged 1 commit intomainfrom
feat/user-message-collapsible
Apr 11, 2026
Merged

feat: add collapsible user messages with 3-line clamp#816
miurla merged 1 commit intomainfrom
feat/user-message-collapsible

Conversation

@miurla
Copy link
Copy Markdown
Owner

@miurla miurla commented Apr 11, 2026

Summary

  • Truncate long user messages to 3 lines using CSS line-clamp-3
  • Add Show more / Show less toggle with chevron icons
  • Use callback ref for DOM overflow detection (avoids unnecessary useEffect)
  • Toggle only appears when message content exceeds 3 lines

Test plan

  • Send a long message (5+ lines) — message is truncated to 3 lines with "Show more" toggle
  • Click "Show more" — full message is displayed with "Show less" toggle
  • Click "Show less" — message collapses back to 3 lines
  • Send a short message (1-2 lines) — no toggle is shown
  • Copy and edit buttons still work correctly on collapsed/expanded messages

Long user messages are now truncated to 3 lines with a Show more/less
toggle. Uses callback ref for DOM measurement to detect overflow,
avoiding unnecessary useEffect usage.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
morphic Ready Ready Preview, Comment Apr 11, 2026 1:37am

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bae9794e5e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread components/user-text-section.tsx
@miurla miurla merged commit 157fd88 into main Apr 11, 2026
8 checks passed
@miurla miurla deleted the feat/user-message-collapsible branch April 11, 2026 01:42
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.

1 participant