Skip to content

Agents - improve multi-file diff editor actions - #343368

Merged
Ladislau Szomoru (lszomoru) merged 3 commits into
mainfrom
lszomoru/agents/toggle-details-action-multi-file-diff
Oct 22, 2026
Merged

Ladislau Szomoru (lszomoru) merged 3 commits into
mainfrom
lszomoru/agents/toggle-details-action-multi-file-diff

Conversation

@lszomoru

Copy link
Copy Markdown
Member

This pull request moves the Word Wrap and Diff View actions from the header's "..." menu to the tab row's "..." menu for better accessibility and usability.

Changes made:

  • Word Wrap Action:

    • Moved for the Changes tab and multi-file diff editors to the tab row's 1_diff group, alongside the existing Word Wrap for text files.
  • Diff View Submenu:

    • Relocated for the Changes tab, text diff, and multi-file diff editors to the same group in the tab row, following the Word Wrap action.
  • Context Handling:

    • Updated both Word Wrap actions to correctly read their first argument as the editor context, ensuring they reset the temporary wrap state properly.
  • Tests:

    • Adjusted tests in changesViewActions.test.ts to verify the new locations of the Diff View and Word Wrap actions, ensuring they are no longer present in the header menu.

Additional Notes:

  • The placement of the Collapse/Expand All Diffs actions remains unchanged as they were not specified for relocation.
  • The changes improve the visibility of these actions in the tab row, aligning with user expectations for easier access.

Copilot AI balanced review requested due to automatic review settings October 21, 2026 22:16
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/sessions/contrib/layout/browser/desktop/desktopExistingSessionStrategy.ts
  • src/vs/sessions/contrib/layout/test/browser/desktopLayoutController.test.ts

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open issues
What changed in this PR

Moves Sessions “Word Wrap” and “Diff View” actions from the editor header overflow into the tab row overflow, and adjusts command/context handling so the actions behave correctly when invoked from editor title menus.

Changes:

  • Relocates “Word Wrap” and “Diff View” menu contributions to the editor title (tab row) overflow groups.
  • Updates command handlers to extract IEditorCommandsContext from variadic args (accounting for resource-first invocation).
  • Extends Sessions/Agents window behavior and tests around multi-diff file list controls and Toggle Details behavior.
File Description
src/​vs/​workbench/​contrib/​multiDiffEditor/​test/​browser/​actions.test.ts Updates assertions to validate refined preconditions for multi-diff file list submenu actions.
src/​vs/​workbench/​contrib/​multiDiffEditor/​browser/​multiDiffEditorAccessibilityHelp.ts Adjusts accessibility help text for Sessions/Agents window behavior.
src/​vs/​workbench/​contrib/​multiDiffEditor/​browser/​actions.ts Exports submenu/context expressions so Sessions UI can reuse them; broadens action preconditions.
src/​vs/​sessions/​contrib/​layout/​test/​browser/​desktopLayoutController.test.ts Adds coverage ensuring “Toggle Details” targets multi-diff file list when appropriate.
src/​vs/​sessions/​contrib/​layout/​browser/​desktop/​desktopExistingSessionStrategy.ts Modifies Toggle Details toggled state + run behavior to toggle multi-diff file list based on group context.
src/​vs/​sessions/​contrib/​changes/​test/​browser/​changesViewActions.test.ts Updates menu-location assertions and adds test for Files View & Position availability.
src/​vs/​sessions/​contrib/​changes/​browser/​changesViewActions.ts Moves Sessions Diff View / Word Wrap contributions to editor title overflow; adds Files View & Position submenu.
src/​vs/​sessions/​DESKTOP.md Documents updated Toggle Details semantics for multi-diff file list.

Review effort: Lite

…dule

Address review feedback: the Agents window imported the file list context
expression and submenu id from the multi diff editor actions module, which
registers menus and actions at load time. Move them to the common module and
share the editor id constant with MultiDiffEditor.ID.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lszomoru
Ladislau Szomoru (lszomoru) marked this pull request as draft October 22, 2026 06:13
@lszomoru
Ladislau Szomoru (lszomoru) marked this pull request as ready for review October 22, 2026 06:14
@lszomoru
Ladislau Szomoru (lszomoru) merged commit 496d79a into main Oct 22, 2026
59 checks passed
@lszomoru
Ladislau Szomoru (lszomoru) deleted the lszomoru/agents/toggle-details-action-multi-file-diff branch October 22, 2026 06:14
@vs-code-engineering vs-code-engineering Bot added this to the 1.144.0 milestone Oct 22, 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.

5 participants