Skip to content

Collapse work log groups by default#1345

Open
shivamhwp wants to merge 2 commits intopingdotgg:mainfrom
shivamhwp:collapsible-reasoning-sections
Open

Collapse work log groups by default#1345
shivamhwp wants to merge 2 commits intopingdotgg:mainfrom
shivamhwp:collapsible-reasoning-sections

Conversation

@shivamhwp
Copy link
Collaborator

@shivamhwp shivamhwp commented Mar 24, 2026

What Changed

Added collapsible headers to timeline work-log groups in the chat view. Tool calls and Work log cards now always render a header with a chevron, start collapsed by default, and expand/collapse when the header is clicked.

This change is scoped to grouped work rows in apps/web/src/components/chat/MessagesTimeline.tsx. It does not change chat messages, proposed plan cards, or the assistant changed-files diff card. I also added test coverage for the default-collapsed and expanded states in apps/web/src/components/chat/MessagesTimeline.test.tsx.

Fixes: #287

Why

The work-log cards could take up a lot of vertical space and were always visually open, which made the timeline noisier than necessary. Collapsing them by default keeps the main conversation easier to scan while preserving access to tool activity when needed.

This approach is small and contained because it reuses the existing expandedWorkGroups state, applies only at the group level, and leaves the existing row content untouched once expanded. It also replaces the previous overflow-only disclosure behavior with one consistent expand/collapse interaction.

UI Changes

Before:
image

After:
image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Collapse work log groups by default in MessagesTimeline

  • Work log groups in MessagesTimeline now render as collapsible sections, collapsed by default, showing no entries until the user expands them.
  • A group header with entry count and a rotating ChevronDownIcon replaces the previous "Show more/Show less" text button.
  • Expanding a group shows all entries regardless of count; the old MAX_VISIBLE_WORK_LOG_ENTRIES slice logic is removed.
  • Behavioral Change: The previous behavior of showing the last N entries when collapsed is gone; groups now show nothing until explicitly expanded.

Macroscope summarized 51aacbf.


Note

Low Risk
UI-only behavior change in MessagesTimeline that hides work-log contents until expanded; low risk aside from potential discoverability/accessibility regressions in the collapsible interaction.

Overview
Work log/tool call timeline groups are now collapsible and collapsed by default. MessagesTimeline wraps grouped work rows in a Collapsible with a header showing the entry count and a rotating ChevronDownIcon, and removes the previous overflow-based “show more/less” slicing so entries render only when expanded.

Tests updated/added in MessagesTimeline.test.tsx to reuse shared baseProps and to assert default-collapsed rendering (header + chevron, no entry details) and expanded rendering (all grouped entries visible).

Written by Cursor Bugbot for commit 51aacbf. This will update automatically on new commits. Configure here.

@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ed38b25a-d3e6-4932-8dd1-83531ae9f302

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 24, 2026
@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Collapsible thinking output

2 participants