Skip to content

Fix editor diff gutter layout and Inbox PR overview diff colors - #758

Closed
EricRasputin wants to merge 2 commits into
hardbeat920:mainfrom
EricRasputin:fix/editor-diff-gutter
Closed

EricRasputin wants to merge 2 commits into
hardbeat920:mainfrom
EricRasputin:fix/editor-diff-gutter

Conversation

@EricRasputin

@EricRasputin EricRasputin commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • In the editor's diff view (the default "(Working Tree)" tab), the +/− marker sits between the line numbers and the code instead of at the far left of the gutter. Changed rows tint their line numbers, removed lines show their old line number, and the two color bars per line are gone, so it matches the unified diff view.
  • Diff tabs put the fold arrows first and size the number column to its digits, so each number sits beside its marker. Ordinary editor tabs are unchanged.
  • The Inbox pull request overview (total and per-file +N -N, and the per-file bar) uses the diff color tokens, so it follows the selected Diff colors palette.

Why

Follow-up to #707, which shipped in 0.7.1. That PR was only checked in the unified diff view. In the editor diff it reused the git gutter, which is the leftmost one, so the marker ended up two columns away from its line, with a color bar on each side of the untinted line numbers. The Inbox PR overview was the one diff surface still on hardcoded emerald/red.

UI

Before

Editor diff before: marker at the far left, a bar on each side of the line numbers

After

Editor diff after: tinted line number, then the marker, then the code

Both are the same file, rendered from the real editor extensions and app CSS in headless Chromium (dark theme, Default palette). No screenshot of the Inbox overview; it is a class swap to the existing tokens.

Notes for review

  • The gutter order is set in two places: editorGit registers its marker gutter at low precedence so it lands next to the code, and FileEditor lists foldGutter() before lineNumbers() in diff tabs.
  • The number gutter reserves width for the original file's largest line number, so old numbers on removed rows don't clip or shift the gutter while scrolling.
  • On changed rows the diff tint replaces the active-line gutter highlight, and the fold arrow takes the diff text color.
  • The scrollbar change overview is untouched.
  • The Inbox change is its own commit, so it can be split into a separate PR if you'd rather keep this to the editor.

Checklist

  • I ran npm run check
  • This PR is small and focused
  • I did not mix unrelated changes

EricRasputin and others added 2 commits October 5, 2026 21:10
hardbeat920#707 put the +/- glyph in the editor's git gutter, which is the leftmost
gutter, so the marker sat two columns away from its line with a color bar
on each side of the line numbers.

The glyph gutter now registers at low precedence so it lands next to the
code, and diff tabs list the fold gutter before the line numbers. Changed
rows tint their gutter cells, removed lines show their old line number, and
the two color bars are gone, matching the unified diff view. The number
gutter reserves room for the original file's widest line number so old
numbers don't clip or shift the gutter while scrolling.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The pull request overview card still used hardcoded emerald and red for its
total and per-file change counts and for the per-file added/removed bar, so
it ignored the Diff colors palette added in hardbeat920#707.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

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