Collapse long user messages by default#2180
Conversation
- Add expand/collapse controls for long user prompts - Preserve copy and revert actions in the footer - Add tests for collapsed, expanded, and short messages
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved Self-contained UI enhancement that adds collapse/expand functionality for long user messages. Changes are purely presentational with CSS-based height limiting and toggle button, with no impact on message data or processing. Extensive test coverage included. You can customize Macroscope's approvability policy. Learn more. |
…user-messages # Conflicts: # apps/web/src/components/chat/MessagesTimeline.tsx
Dismissing prior approval to re-evaluate 86ef8ad
- Adjust the collapsed user message action to a compact pill button - Improve hover affordance while preserving the existing expand/collapse behavior
Dismissing prior approval to re-evaluate 946a764
What Changed
Why
Big user messages can take up way too much vertical space.
UI Changes
Before:

After:
Checklist
Note
Collapse long user messages by default in chat timeline
CollapsibleUserMessageBodycomponent inMessagesTimeline.tsxthat wraps user message content in a collapsible container with a bottom fade mask.Macroscope summarized 946a764.
Note
Low Risk
Low risk UI behavior change in
MessagesTimelinethat adds local expand/collapse state for long user messages; main risk is minor layout/interaction regressions around message actions and scrolling.Overview
Long user messages in
MessagesTimelinenow start collapsed by default (when over 8 lines or 600 chars), showing a fade/masked overflow and a Show full message / Show less toggle.User-message footer actions (e.g. copy link and revert) are preserved by moving the message body + footer into a new
CollapsibleUserMessageBodywrapper, and new browser/SSR tests cover collapsed/expanded behavior and ensure short messages remain uncollapsed.Reviewed by Cursor Bugbot for commit 946a764. Bugbot is set up for automated code reviews on this repo. Configure here.