Skip to content

feat: GitHub-style diff expand controls with gutter icons#343

Merged
tomasz-tomczyk merged 4 commits intomainfrom
github-style-expand
Apr 24, 2026
Merged

feat: GitHub-style diff expand controls with gutter icons#343
tomasz-tomczyk merged 4 commits intomainfrom
github-style-expand

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Replace flat expand spacers with GitHub's two-column layout: narrow icon gutter on the left, @@ hunk header text on the right
  • Large gaps (>20 lines) show stacked down/up buttons; small gaps show a single bidirectional unfold icon
  • Skip standalone hunk headers when contiguous with previous hunk after incremental expansion
  • Leading spacer arrow points up, trailing points down

Review

  • Code review: passed (fresh frontend-expert agent, no blockers)
  • Parity audit: N/A (crit-web doesn't have expand spacers)

Test plan

  • Verified expand down/up on large gaps
  • Verified expand-all on small gaps
  • Verified leading/trailing spacers
  • Verified contiguous hunk headers suppressed after expansion

🤖 Generated with Claude Code

tomasz-tomczyk and others added 4 commits April 24, 2026 08:38
Replace flat expand spacers with GitHub's two-column layout: a narrow
gutter on the left with stacked expand icons (down/up for large gaps,
bidirectional unfold for small gaps) and the @@ hunk header text on
the right. Skip standalone hunk headers when contiguous with a
previous hunk after incremental expansion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update selectors and assertions to match the new two-column spacer
layout: buttons inside .expand-gutter, hunk header in .spacer-hunk-text,
no more "unchanged lines" text content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After expanding 20 lines, the remaining gap may be ≤ 20 lines,
switching from 2 buttons (down+up) to 1 (expand-all). Assert
≥1 instead of exactly 2.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 2152c2d into main Apr 24, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the github-style-expand branch April 24, 2026 08:26
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