Repository navigation
Fix/issue 337524 multidiff order - #337565
Dmitriy Vasyura (dmitrivMS) merged 10 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The regression test has a critical type incompatibility and a cross-platform assertion issue.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Aligns SCM multi-diff ordering with the SCM file list’s path-based order.
Changes:
- Sorts resources using
comparePaths. - Adds regression coverage for resource ordering.
| File | Review |
|---|---|
src/vs/workbench/contrib/multiDiffEditor/test/browser/scmMultiDiffSourceResolver.test.ts |
Requires fixes for incompatible event mock types (critical) and platform-dependent fsPath assertions (moderate). |
src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.ts |
Sorts SCM resources by path before creating diff items. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@microsoft-github-policy-service agree |
|
Ürem Sancaktutan (@codelovingcat), thank you very much for your contribution! |
|
CI failures: |
Dmitriy Vasyura (dmitrivMS)
left a comment
There was a problem hiding this comment.
build break
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fda6c34

Description
The SCM file list and the multi-diff editor can display the same changed files in different orders.
The SCM file list sorts resources by path, while the SCM multi-diff source uses the resource group order directly. This can make corresponding files appear at different positions in the two views.
This change makes the SCM multi-diff source use the same path ordering as the SCM file list.
Related Issue
Fixes #337524
How to Test
Added a regression test covering the reported file ordering using:
githubServer.tsenv.tsgithubUri.tsThe test verifies that SCM multi-diff resources are returned in path order.
Changes
comparePaths.