Skip to content

Comments

fix: make Collapse All button collapse all expandable elements in timeline#104

Merged
everpcpc merged 1 commit intodatabendlabs:mainfrom
everpcpc:atlanta-wgg5n38g
Feb 10, 2026
Merged

fix: make Collapse All button collapse all expandable elements in timeline#104
everpcpc merged 1 commit intodatabendlabs:mainfrom
everpcpc:atlanta-wgg5n38g

Conversation

@everpcpc
Copy link
Member

Summary

The "Collapse All" button in the timeline view was not working properly — it only collapsed tool calls but ignored diffs, command outputs, expanded commands, and thinking blocks.

This fix makes the button collapse all expandable elements:

  • Inline diffs (via diff collapse trigger)
  • Tool call expansions
  • Command sections and expanded outputs in agent responses
  • Thinking blocks

Changes:

  • TimelineView.tsx: "Collapse All" button now triggers both diff and tool collapse. AgentResponse listens to the tool collapse context to collapse showCommands, expandedOutputs, and expandedCommands.
  • ThinkingMessage.tsx: Added module-level collapse hook (same pattern as ToolCallMessage and InlineDiffViewer) so thinking blocks respond to the collapse-all trigger.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - UI behavior change verified by type-checking; visual verification needed

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

@everpcpc everpcpc marked this pull request as ready for review February 10, 2026 09:27
@everpcpc everpcpc merged commit f1181c7 into databendlabs:main Feb 10, 2026
3 checks passed
@everpcpc everpcpc deleted the atlanta-wgg5n38g branch February 10, 2026 09:28
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