Skip to content

feat: add separator, line numbers and view toggle#41

Closed
shatrughantwt wants to merge 3 commits intomasterfrom
feat-improve-diff-ux
Closed

feat: add separator, line numbers and view toggle#41
shatrughantwt wants to merge 3 commits intomasterfrom
feat-improve-diff-ux

Conversation

@shatrughantwt
Copy link
Contributor

Description

Follow-up PR to further enhance the diff viewer with improved layout and usability.

Changes

  • Added centered vertical separator
  • Implemented properly aligned line numbers
  • Added keybinding to toggle between split and unified views
  • Unified view remains the fallback below splitViewThreshold

Result

Cleaner split layout, improved readability and better overall user experience.

Signed-off-by: shatrughan mishra <shatrughanm485@gmail.com>
@shatrughantwt shatrughantwt requested a review from bakayu February 18, 2026 16:56
Copy link
Member

@bakayu bakayu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feedback from QA:

Image
  • The line numbers are too close to the actual text, there should be a gap
  • When a line becomes too long (check the screenshot attached) it seems to be wrapping around and breaking the vertical divider
  • The color of the divider does not match the color of the panel borders
  • You have to press ctrl+d twice while in split diff view mode to change to unified currently, it should only take one click, probably some issue with how the update function was modified
  • Also the colors of text in split diff view and unified diff view are not consistent

@shatrughantwt
Copy link
Contributor Author

feedback from QA:

Image * The line numbers are too close to the actual text, there should be a gap * When a line becomes too long (check the screenshot attached) it seems to be wrapping around and breaking the vertical divider * The color of the divider does not match the color of the panel borders * You have to press `ctrl`+`d` twice while in split diff view mode to change to unified * Also the colors of text in split diff view and unified diff view are not consistent

okayy. I'll fix it

Signed-off-by: shatrughan mishra <shatrughanm485@gmail.com>
@shatrughantwt
Copy link
Contributor Author

help me with the vertical divider issue

@bakayu
Copy link
Member

bakayu commented Feb 20, 2026

help me with the vertical divider issue

I'll get to this by this weekend.

Copy link
Member

@bakayu bakayu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vertical separator still appears broken when the app to see big diffs (tested it on the diffs of this branch)

Image

It works fine for smaller diffs, although there is some spacing issue, I left a comment for it in view.go

Signed-off-by: shatrughan mishra <shatrughanm485@gmail.com>
@shatrughantwt
Copy link
Contributor Author

shatrughantwt commented Feb 23, 2026

The vertical separator still appears broken when the app to see big diffs (tested it on the diffs of this branch)

Image It works fine for smaller diffs, although there is some spacing issue, I left a comment for it in view.go

i fixed it. still broken

@bakayu
Copy link
Member

bakayu commented Feb 23, 2026

could you explain why

The vertical separator still appears broken when the app to see big diffs (tested it on the diffs of this branch)
Image
It works fine for smaller diffs, although there is some spacing issue, I left a comment for it in view.go

i fixed it. still broken

Does it appear not broken in your local? For me it looks broken like in the image I attached.

@shatrughantwt
Copy link
Contributor Author

i fixed strings.Fields issue after that still shows broken in big diff

@shatrughantwt
Copy link
Contributor Author

could you explain why

The vertical separator still appears broken when the app to see big diffs (tested it on the diffs of this branch)
Image
It works fine for smaller diffs, although there is some spacing issue, I left a comment for it in view.go

i fixed it. still broken

Does it appear not broken in your local? For me it looks broken like in the image I attached.

it does

@shatrughantwt
Copy link
Contributor Author

when will you review c9b50ba

@bakayu
Copy link
Member

bakayu commented Feb 24, 2026

when will you review c9b50ba

I'll get to this by tomorrow!

EDIT: I did a quick QA and looked up the code, its probably that lipgloss's layout management is just not reliable for our usecase. Also, I just noticed github's split view diff when handling soft wrap cap is already similar to ours, so we just need to fix the broken vertical spacer issue. Since you are having trouble with this one I'll try to push a fix for this.

@bakayu
Copy link
Member

bakayu commented Feb 24, 2026

marking this PR as a draft, split view feature is to be abandoned for now, will look into this later.

@bakayu bakayu marked this pull request as draft February 24, 2026 19:41
@bakayu bakayu closed this Mar 9, 2026
@bakayu bakayu added the wontfix This will not be worked on label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants