Skip to content

fix(ui): improve diff preview for added and deleted files#49

Merged
johannesjo merged 1 commit intojohannesjo:mainfrom
ASRagab:fix/diff-preview-added-deleted-files
Mar 31, 2026
Merged

fix(ui): improve diff preview for added and deleted files#49
johannesjo merged 1 commit intojohannesjo:mainfrom
ASRagab:fix/diff-preview-added-deleted-files

Conversation

@ASRagab
Copy link
Copy Markdown
Contributor

@ASRagab ASRagab commented Mar 30, 2026

Summary

  • Added files no longer trigger broken GapView/TrailingGap context fetches — entire content is already in the diff hunks
  • Deleted files show a "This file was deleted" banner instead of rendering raw removal hunks
  • Status badges for Added/Deleted now render with color-tinted backgrounds (green/red) for better visibility
  • Footer line totals now include uncommitted/untracked file counts (previously only counted committed files)
  • Added .omc/ to .prettierignore to fix pre-commit format check
CleanShot 2026-03-30 at 16 50 30

Test plan

  • Create an untracked file in a worktree, open diff view — all + lines render, green "Added" badge, no broken gaps
  • Delete a tracked file, open diff view — red "This file was deleted" banner, no line-by-line diff, red "Deleted" badge
  • Modify a tracked file — GapView/TrailingGap context expansion works as before
  • Rename a tracked file — behaves like modified (context expansion works)
  • Verify footer totals include untracked file line counts

🤖 Generated with Claude Code

@ASRagab
Copy link
Copy Markdown
Contributor Author

ASRagab commented Mar 31, 2026

bad git merge on my part will fix

@ASRagab ASRagab force-pushed the fix/diff-preview-added-deleted-files branch from ac22d7a to 5520da3 Compare March 31, 2026 01:28
Added files no longer trigger broken GapView/TrailingGap context fetches.
Deleted files show a "This file was deleted" banner instead of raw hunks.
Status badges for Added/Deleted now render with tinted backgrounds.
Footer line totals now include uncommitted/untracked files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ASRagab ASRagab force-pushed the fix/diff-preview-added-deleted-files branch from 5520da3 to 03b5e4c Compare March 31, 2026 01:34
@johannesjo
Copy link
Copy Markdown
Owner

Thank you very much! <3

@johannesjo johannesjo merged commit b944064 into johannesjo:main Mar 31, 2026
2 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.

2 participants