Skip to content

fix #307574. support opening scm diff in modal.#307575

Draft
rebornix wants to merge 2 commits intomainfrom
rebornix/hilarious-frog
Draft

fix #307574. support opening scm diff in modal.#307575
rebornix wants to merge 2 commits intomainfrom
rebornix/hilarious-frog

Conversation

@rebornix
Copy link
Copy Markdown
Member

@rebornix rebornix commented Apr 3, 2026

When using VS Code on a relatively small monitor (e.g., a laptop), if we have agents view, and file explorer open, it leaves really little space for editor group. This makes it really hard to review changes from time to time since the diff editor is opened in the editor group.

I'd love to propose we allow diff editor (for now limit to sim) to be opened in modal

#307574

Screen.Recording.2026-04-02.at.9.25.02.PM.mov

Copilot AI review requested due to automatic review settings April 3, 2026 04:40
@rebornix rebornix self-assigned this Apr 3, 2026
@rebornix rebornix requested review from bpasero and lszomoru April 3, 2026 04:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an experimental setting to open Source Control diff editors in a modal editor overlay, and wires it into SCM view interactions to address issue #307574.

Changes:

  • Added scm.allowOpenInModalEditor experimental setting.
  • Updated SCM view and SCM history view to open diff editors in MODAL_GROUP when the setting is enabled.
  • Adjusted an SCM editor menu when clause related to Chat setup context keys.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/vs/workbench/contrib/scm/browser/scmViewPane.ts Special-cases SCM diff open to use modal editor overlay when configured.
src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.ts Opens history diff editors in modal group when configured.
src/vs/workbench/contrib/scm/browser/scm.contribution.ts Registers the new setting and updates an editor menu condition.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an opt-in way to open Source Control diff editors in the modal editor overlay, addressing limited editor space on smaller screens when reviewing SCM changes.

Changes:

  • Added a new SCM setting (scm.allowOpenInModalEditor) to toggle opening diffs in the modal editor overlay.
  • Routed SCM resource diff opens to a new internal command that forces the diff into MODAL_GROUP when the setting is enabled.
  • Updated SCM history diff opens to optionally target MODAL_GROUP directly via IEditorService.openEditor.
Show a summary per file
File Description
src/vs/workbench/contrib/scm/browser/scmViewPane.ts Switches SCM diff opens to a modal-specific diff command when the new setting is enabled.
src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.ts Optionally opens SCM history diffs in MODAL_GROUP based on the new setting.
src/vs/workbench/contrib/scm/browser/scm.contribution.ts Registers the new experimental setting controlling modal diff behavior in SCM.
src/vs/workbench/browser/parts/editor/editorCommands.ts Adds _workbench.diffInModal and factors diff-opening logic into a shared helper with a column override.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new

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.

2 participants