Skip to content

Fix/issue 337524 multidiff order - #337565

Merged
Dmitriy Vasyura (dmitrivMS) merged 10 commits into
microsoft:mainfrom
codelovingcat:fix/issue-337524-multidiff-order
Oct 5, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 10 commits into
microsoft:mainfrom
codelovingcat:fix/issue-337524-multidiff-order

Conversation

@codelovingcat

Copy link
Copy Markdown
Contributor

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.ts
  • env.ts
  • githubUri.ts

The test verifies that SCM multi-diff resources are returned in path order.

Changes

  • Sort SCM multi-diff resources using comparePaths.
  • Add regression coverage for SCM multi-diff resource ordering.

Copilot AI balanced review requested due to automatic review settings September 23, 2026 22:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 High severity

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.

@codelovingcat

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@lszomoru

Copy link
Copy Markdown
Member

Ürem Sancaktutan (@codelovingcat), thank you very much for your contribution!

roblourens
roblourens previously approved these changes Sep 27, 2026
@dmitrivMS

Copy link
Copy Markdown
Collaborator

CI failures:
Error: [core-ci ] [18:42:23] src/vs/workbench/contrib/multiDiffEditor/test/browser/scmMultiDiffSourceResolver.test.ts(52,22): error TS4112: This member cannot have an 'override' modifier because its containing class '(Anonymous class)' does not extend another class.
Error: [core-ci ] [18:42:23] src/vs/workbench/contrib/multiDiffEditor/test/browser/scmMultiDiffSourceResolver.test.ts(53,13): error TS4112: This member cannot have an 'override' modifier because its containing class '(Anonymous class)' does not extend another class.
Error: [core-ci ] [18:42:23] src/vs/workbench/contrib/multiDiffEditor/test/browser/scmMultiDiffSourceResolver.test.ts(55,63): error TS2740: Type '(Anonymous class)' is missing the following properties from type 'IActivityService': _serviceBrand, showViewContainerActivity, showViewActivity, showAccountsActivity, and 2 more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

build break

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit 1e72bb9 into microsoft:main Oct 5, 2026
35 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.142.0 milestone Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File list order differs from multi-diff editor

7 participants