Skip to content

feat: auto-expand small unchanged gaps between diff hunks#337

Merged
tomasz-tomczyk merged 1 commit intomainfrom
agent-a76602e0
Apr 23, 2026
Merged

feat: auto-expand small unchanged gaps between diff hunks#337
tomasz-tomczyk merged 1 commit intomainfrom
agent-a76602e0

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • When the gap between two adjacent diff hunks is ≤8 lines, automatically expand the context and merge the hunks at render time
  • Eliminates visual noise from trivially small "Expand N unchanged lines" spacers
  • Adds routes.go test fixture with a large gap (>8 lines) to keep spacer tests viable

Test plan

  • 10 new E2E tests in auto-expand-gaps.spec.ts covering split/unified modes, small gap auto-expansion, large gap spacer preservation, and commentability
  • Existing expanded-comments, diff-rendering, file-tree, scope-toggle, syntax-highlighting tests updated and passing
  • All 35 affected tests pass locally

Closes #336

🤖 Generated with Claude Code

When the gap between two adjacent diff hunks is ≤8 lines, automatically
expand the context and merge the hunks at render time instead of showing
an "Expand N unchanged lines" spacer. This reduces visual noise for
trivially small gaps.

Closes #336

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk changed the title Auto-expand small unchanged gaps between diff hunks feat: auto-expand small unchanged gaps between diff hunks Apr 23, 2026
@tomasz-tomczyk tomasz-tomczyk merged commit fb2f206 into main Apr 23, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the agent-a76602e0 branch April 23, 2026 21:31
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.

Auto-expand small unchanged gaps between diff hunks

1 participant