Fix inline diff view, comment labels, and diff stats accuracy#68
Merged
amandal0903 merged 3 commits intomainfrom Apr 5, 2026
Merged
Fix inline diff view, comment labels, and diff stats accuracy#68amandal0903 merged 3 commits intomainfrom
amandal0903 merged 3 commits intomainfrom
Conversation
added 3 commits
April 5, 2026 21:57
- Remove forced side-by-side mode that blocked inline diff view
- Restore useInlineViewWhenSpaceIsLimited default to true
- Add GitHub-style line labels: L{n} for original, R{n} for modified
- Fix race condition in getDocumentComments via EditorOption.inDiffEditor fallback
- Show comments from both sides in inline mode on the modified editor
- Refresh widgets when user toggles between split and inline view
- Use diff computation result for consistent labels between creation and restoration
- Add 18 unit tests for controller side/label detection logic
- Remove unused CommentSide import - Add missing updatedAt field to mock getThread return - Use Pick<DisposableStore, 'add'> to match ensureNoDisposablesAreLeakedInTestSuite return type
The old logic used an either/or approach: show committed-against-base stats OR local working-tree changes, never both. This meant uncommitted edits were invisible when the branch had commits ahead. Replace with a single `git diff --numstat baseRef` that compares the base ref directly to the working tree, capturing committed + staged + unstaged changes in one accurate numstat without double-counting. Untracked files are still added separately. Also document the diff stats calculation in CLAUDE.md/copilot-instructions.md and add 6 new test cases covering: .claude/ exclusion, large untracked files, file deletions, staged+unstaged overlap, and the full combined scenario.
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.
Summary
useInlineViewWhenSpaceIsLimited, and add GitHub-style L{n}/R{n} line labels for
original/modified sides. Fix race condition in getDocumentComments and refresh widgets on
view toggle.
diff --numstat baseRef pass that captures committed + staged + unstaged changes accurately
without double-counting.
for diff stats (.claude/ exclusion, large untracked files, deletions, staged+unstaged
overlap, combined scenario). Fix type errors in existing comment controller tests.
Changes
Test plan