Repository navigation
Add expandUnchanged setting to show full files in diffs - #176
Merged
Merged
Conversation
cpojer
approved these changes
Oct 6, 2026
cpojer
left a comment
Member
There was a problem hiding this comment.
Not loving this too much but I'm happy to merge it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the project I work on, we keep files small and focused. That makes the full file context crucial for understanding the effect of a change, so I end up expanding every hunk by hand. A setting to auto expand all unchanged lines would make that a lot nicer.
This adds an opt-in
expandUnchangedsetting. Enable it withView > Diff > Expand Unchanged Linesor"expandUnchanged": trueinsettings. It defaults tofalse, so current behavior is unchanged.How it works
expandUnchangedoption of the@pierre/diffsCodeView. Patch-only diffs load their full contents through the existingloadDiffFilesloader as they render, so nothing extra loads up front.showWhitespace: config defaults, schema,electron/config.cjsnormalization and a View > Diff menu checkbox.Tests
Adds a
ReviewCodeViewtest that the option reaches CodeView when contents can be loaded and stays off in read-only views.vp checkandvp testpass.AI assistance
This PR was written primarily with Claude Code.