Skip to content

Fix blame tint coverage + round intra-line diff highlights#9

Merged
shacharPash merged 1 commit into
mainfrom
fix-blame-tint-and-inline-diff-radius
Jun 4, 2026
Merged

Fix blame tint coverage + round intra-line diff highlights#9
shacharPash merged 1 commit into
mainfrom
fix-blame-tint-and-inline-diff-radius

Conversation

@shacharPash

Copy link
Copy Markdown
Owner

Two small diff-view polish fixes from review feedback.

  1. Blame tint now covers the line number. The blame string is sized to exactly blameWidth chars, the gutter reserved exactly blameWidth chars, and the gutter CSS added 6px of right padding — so the trailing line number got squeezed past the tinted element's right edge onto the bare decorations margin (looked like the color "didn't reach the numbers"). Reserve blameWidth + 2 chars and drop the right padding. Measured live: the number now sits ~10px inside the tint (numberCovered: true).
  2. Intra-line diff highlights are rounded. Added border-radius: 3px to Monaco's .char-insert / .char-delete (the red/green spans on the part of a line that changed) so partial-line edits read like GitHub's token highlights instead of hard rectangles. Whole-line backgrounds stay square.

Verification

  • typecheck + 70 tests + build green
  • Verified live against cli/cli#13510: blame number covered (10px slack, measured), char-insert/delete computed border-radius: 3px.

🤖 Generated with Claude Code

…ighlights

1. Blame gutter: the blame string was sized to exactly blameWidth chars while
   the gutter reserved blameWidth chars AND the CSS added 6px right padding, so
   the trailing line number was pushed past the tinted element's right edge onto
   the bare decorations margin. Reserve blameWidth+2 chars and drop the right
   padding so the whole row — including the line number — stays inside the tint.
   (Measured: number now sits ~10px inside the tint, numberCovered=true.)
2. Round the intra-line (word-level) diff highlights (.char-insert/.char-delete)
   to 3px so partial-line changes read like GitHub's token highlights instead of
   hard rectangles. Whole-line backgrounds stay square.

Verified live against cli/cli#13510. typecheck + 70 tests + build green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shacharPash shacharPash merged commit 5c63fe2 into main Jun 4, 2026
1 check passed
@shacharPash shacharPash deleted the fix-blame-tint-and-inline-diff-radius branch June 4, 2026 09:10
shacharPash added a commit that referenced this pull request Jun 4, 2026
Per feedback, remove the border-radius on .char-insert/.char-delete added in
#9 — keep the highlights square. The blame-tint coverage fix from #9 is
unaffected.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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