Skip to content

Improved visual clarity in multi-file diffs in Agents window - #333775

Merged
Henning Dieterichs (hediet) merged 2 commits into
mainfrom
hediet/b/subsequent-stoat
Sep 1, 2026
Merged

Improved visual clarity in multi-file diffs in Agents window#333775
Henning Dieterichs (hediet) merged 2 commits into
mainfrom
hediet/b/subsequent-stoat

Conversation

@hediet

@hediet Henning Dieterichs (hediet) commented Sep 1, 2026

Copy link
Copy Markdown
Member

Closes #330482

Copilot AI balanced review requested due to automatic review settings September 1, 2026 14:53

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

Review tier: Balanced
Findings: 1 High severity · 1 Medium severity · 1 Low severity

New issues introduced by this change (3)
Severity Finding
High severity src/​vs/​editor/​browser/​widget/​multiDiffEditor/​diffEditorItemTemplate.ts — Header/toolbar focus is tracked for styling but is not included in…
Medium severity 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…
Low severity 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 {
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 670698ea Current: 30cb53c2

Changed (20)

sessions/changes/agentsDiffEditor/CompactDiffWithFeedback/Dark
Before After
before after
sessions/changes/agentsDiffEditor/CompactDiffWithFeedback/Light
Before After
before after
sessions/changes/agentsDiffEditor/CompactDiffWithSubmitOverlay/Dark
Before After
before after
sessions/changes/agentsDiffEditor/CompactDiffWithSubmitOverlay/Light
Before After
before after
sessions/editorHeader/editorHeader/FullHeader/Dark
Before After
before after
sessions/editorHeader/editorHeader/FullHeader/Light
Before After
before after
sessions/editorHeader/editorHeader/BreadcrumbsAndAction/Dark
Before After
before after
sessions/editorHeader/editorHeader/BreadcrumbsAndAction/Light
Before After
before after
sessions/editorHeader/editorHeader/BreadcrumbsAndSecondaryAction/Dark
Before After
before after
sessions/editorHeader/editorHeader/BreadcrumbsAndSecondaryAction/Light
Before After
before after
sessions/editorHeader/editorHeader/BreadcrumbsOnly/Dark
Before After
before after
sessions/editorHeader/editorHeader/BreadcrumbsOnly/Light
Before After
before after
sessions/editorHeader/editorHeader/PrimaryActionOnly/Dark
Before After
before after
sessions/editorHeader/editorHeader/PrimaryActionOnly/Light
Before After
before after
sessions/editorHeader/editorHeader/SecondaryActionOnly/Dark
Before After
before after
sessions/editorHeader/editorHeader/SecondaryActionOnly/Light
Before After
before after
sessions/editorHeader/editorHeader/LayoutActionsOnly/Dark
Before After
before after
sessions/editorHeader/editorHeader/LayoutActionsOnly/Light
Before After
before after
sessions/editorHeader/editorHeader/SingleTabFullHeader/Dark
Before After
before after
sessions/editorHeader/editorHeader/SingleTabFullHeader/Light
Before After
before after

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
@hediet
Henning Dieterichs (hediet) merged commit c89cda6 into main Sep 1, 2026
40 checks passed
@hediet
Henning Dieterichs (hediet) deleted the hediet/b/subsequent-stoat branch September 1, 2026 20:00
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 1, 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.

3 participants