Skip to content

feat(diff): color file headers - #124

Merged
RestartFU merged 2 commits into
masterfrom
xd/https-github-com-restartfu-xd-issues-115-0f82250c
Jul 28, 2026
Merged

feat(diff): color file headers#124
RestartFU merged 2 commits into
masterfrom
xd/https-github-com-restartfu-xd-issues-115-0f82250c

Conversation

@RestartFU

@RestartFU RestartFU commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • render Git diff file headers in orange so file boundaries stand out
  • paint each file-header row black across the full diff width
  • keep addition, deletion, and hunk colors distinct
  • assert file-header text and row colors in unified diff tests

Testing

  • ./scripts/test.sh (20/20 suites pass)

Closes #115

Co-authored-by: Codex <codex@openai.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The unified-diff file-title markup now applies a bold #ffbe6f foreground color. The corresponding test verifies that the generated markup styles src/a.c with the expected span.

Changes

Unified-diff title styling

Layer / File(s) Summary
Title color and markup validation
src/util/unified-diff.c, tests/test-unified-diff.c
File titles retain bold styling and now use #ffbe6f; the test asserts the expected markup for src/a.c.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR adds a colored foreground to git diff file headers, matching issue #115's request to differentiate files in the diff panel.
Out of Scope Changes check ✅ Passed The changes are limited to diff header coloring and a matching test, with no unrelated code paths introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding color to diff file headers.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch xd/https-github-com-restartfu-xd-issues-115-0f82250c

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.

Co-authored-by: Codex <codex@openai.com>
@RestartFU
RestartFU merged commit 61b5d66 into master Jul 28, 2026
4 checks passed
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.

add colored foreground to differenciate files in git diff panel

1 participant