feat(web): collapsible file diffs in commit diff panel#1157
Merged
brendan-kellam merged 2 commits intomainfrom Apr 29, 2026
Merged
feat(web): collapsible file diffs in commit diff panel#1157brendan-kellam merged 2 commits intomainfrom
brendan-kellam merged 2 commits intomainfrom
Conversation
Hovering the status badge reveals a chevron; clicking it toggles the diff body. Collapsed state is held in the FileDiffList so it survives virtualization unmounts, and on collapse we scroll the row's header to the top of the viewport when it's already been scrolled past. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThis pull request adds collapsible file diffs functionality to the commit diff panel. Files can now be collapsed to display only the status header, with per-file state tracked in the list component, scroll synchronization maintained, and interactive UI affordances provided through an updated status badge. Changes
Sequence DiagramsequenceDiagram
actor User
participant StatusBadge as StatusBadge<br/>(fileStatus.tsx)
participant FileDiffRow as FileDiffRow<br/>(fileDiffRow.tsx)
participant FileDiffList as FileDiffList<br/>(fileDiffList.tsx)
participant Virtualizer as Virtualizer
User->>StatusBadge: Click collapse/expand button
StatusBadge->>FileDiffRow: Call onToggleCollapsed()
FileDiffRow->>FileDiffList: Trigger toggle handler
FileDiffList->>FileDiffList: Update collapsed state Set
FileDiffList->>FileDiffList: Recalculate estimateSize<br/>(compact for collapsed)
FileDiffList->>Virtualizer: Scroll to maintain<br/>row alignment
Virtualizer->>FileDiffRow: Re-render with updated<br/>isCollapsed state
FileDiffRow->>StatusBadge: Pass isCollapsed prop
StatusBadge->>User: Update chevron icon & label
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Review rate limit: 6/8 reviews remaining, refill in 14 minutes and 8 seconds.Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FileDiffList(keyed by file path), so it survives virtualization unmounts when rows scroll out of view.estimateRowHeightnow accounts for collapsed state (returns just the header height when collapsed).🤖 Generated with Claude Code
Summary by CodeRabbit