Improved visual clarity in multi-file diffs in Agents window - #333775
Merged
Conversation
Henning Dieterichs (hediet)
enabled auto-merge (squash)
September 1, 2026 14:53
Copilot started reviewing on behalf of
Henning Dieterichs (hediet)
September 1, 2026 14:53
View session
Ladislau Szomoru (lszomoru)
previously approved these changes
Sep 1, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
src/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.ts — Header/toolbar focus is tracked for styling but is not included in… |
|
src/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.ts — The new API exposes separate left and right insets, but this only subtracts their sum from the… |
|
src/vs/sessions/contrib/changes/browser/changesActions.ts — This new expansion-before-action behavior has no regression coverage: the existing… |
What changed in this PR
Refines the Agents Changes multi-file diff for clearer file separation, interaction states, and scrolling.
Changes:
- Adds flat headers with hover, focus, active, and action-reveal states.
- Makes diff sizing, insets, and trailing padding configurable.
- Expands collapsed rows before full-file actions execute.
| File | Description |
|---|---|
agentsDiffEditor.fixture.ts |
Mirrors Agents diff presentation settings. |
sessionChangesEditor.ts |
Configures sizing and bottom padding. |
multiFileDiffEditor.css |
Implements revised entry styling. |
changesActions.ts |
Expands rows before file actions. |
workbench.css |
Adjusts panel spacing and separators. |
multiDiffEditorWidget.test.ts |
Tests trailing scroll content. |
workbenchUIElementFactory.ts |
Adds layout customization options. |
multiDiffEditorWidgetImpl.ts |
Adds virtualized bottom padding. |
multiDiffEditorWidget.ts |
Exposes bottom-padding configuration. |
multiDiffEditorViewModel.ts |
Tracks active and first entries. |
diffEditorItemTemplate.ts |
Applies sizing and interaction state. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+170
to
+175
| const headerFocus = this._register(trackFocus(this._elements.header)); | ||
| this._register(headerFocus.onDidFocus(() => { | ||
| this._elements.root.classList.add('header-focused'); | ||
| activateItem(); | ||
| })); | ||
| this._register(headerFocus.onDidBlur(() => this._elements.root.classList.remove('header-focused'))); |
Comment on lines
440
to
445
| globalTransaction(tx => { | ||
| this.editor.layout({ | ||
| width: width - 2 * 8 - 2 * 1, | ||
| width: width - this._itemHorizontalInsets.left - this._itemHorizontalInsets.right, | ||
| height: verticalRange.length - this._outerEditorHeight, | ||
| }); | ||
| }); |
| return codeEditor?.diffEditor instanceof DiffEditorWidget ? codeEditor.diffEditor : undefined; | ||
| } | ||
|
|
||
| function getExpandedChangesDiffEditor(pane: IEditorPane | undefined, resource: URI): DiffEditorWidget | undefined { |
Contributor
Screenshot ChangesBase: Changed (20) |
Avoid preserving a scroll anchor when replacing trailing padding and make the regression test deterministic. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 52046b61-1856-4a7d-9e41-6edd926637d2
Ladislau Szomoru (lszomoru)
approved these changes
Sep 1, 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.



Closes #330482