Render content-identical renames using the previous file path - #8907
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix rename file issue showing as new file in PR diff
Render content-identical renames using the previous file path
Aug 27, 2026
Alex Ross (alexr00)
approved these changes
Aug 27, 2026
Alex Ross (alexr00)
marked this pull request as ready for review
August 27, 2026 12:02
Alex Ross (alexr00)
enabled auto-merge (squash)
August 27, 2026 12:02
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes rendering of content-identical renames in the PR diff by resolving base-side file content from the previous path (so the base pane isn’t empty and the rename doesn’t appear as a 100% new file).
Changes:
- Update
GitFileChangeModel.showBase()to load base content forRENAMEchanges frompreviousFileName(forInMemFileChange/SlimFileChange) instead of the destination path. - Add a regression test ensuring
repository.show()is called with the previous filename for rename base content. - Update the proposed VS Code chat API type definition for
ChatResponseAutoModeResolutionPart(appears unrelated to the rename fix).
Show a summary per file
| File | Description |
|---|---|
| src/view/fileChangeModel.ts | Resolves base-content lookup for renames using previousFileName when applicable. |
| src/test/view/fileChangeModel.test.ts | Adds regression coverage for base-content resolution on content-identical renames. |
| src/@types/vscode.proposed.chatParticipantAdditions.d.ts | Updates proposed API types/doc for auto-model routing resolution part. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/3 changed files
- Comments generated: 0
- Review effort level: Lite
Dirk Bäumer (dbaeumer)
approved these changes
Aug 27, 2026
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.
Content-identical renames rendered as new files because base content was requested from the destination path, leaving the base pane empty.
previousFileNameat the base commit.