Skip to content

Only unmaximize auxiliary side bar on explicit user action#314111

Merged
benibenj merged 3 commits intomainfrom
benibenj/magnificent-lynx
May 4, 2026
Merged

Only unmaximize auxiliary side bar on explicit user action#314111
benibenj merged 3 commits intomainfrom
benibenj/magnificent-lynx

Conversation

@benibenj
Copy link
Copy Markdown
Contributor

@benibenj benibenj commented May 4, 2026

Copilot Generated Description: Introduce a new flag to indicate whether editor visibility changes result from explicit user actions. Adjust layout behavior to only unmaximize the auxiliary side bar when the change is initiated by the user.

fixes #303794

Copilot AI review requested due to automatic review settings May 4, 2026 14:41
@benibenj benibenj enabled auto-merge May 4, 2026 14:41
@benibenj benibenj self-assigned this May 4, 2026
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 “explicit vs automatic” signal to editor-opening/visibility-change flows and uses it in the workbench layout to avoid unmaximizing the auxiliary side bar (e.g. maximized chat sessions view) when editors are opened programmatically (notably by chat editing).

Changes:

  • Introduces isExplicit metadata in editor open options and propagates it through active/visible editor change events.
  • Updates chat editing to open edited files with isExplicit: false when using accessibility.openChatEditedFiles.
  • Updates layout logic to only unmaximize the auxiliary side bar on explicit user-initiated editor visibility changes.
Show a summary per file
File Description
src/vs/workbench/test/browser/workbenchTestServices.ts Updates test editor service event typing to match the new visible-editors change event payload.
src/vs/workbench/services/editor/common/editorService.ts Adds IVisibleEditorsChangeEvent and updates onDidVisibleEditorsChange to carry an explicitness signal.
src/vs/workbench/services/editor/browser/editorService.ts Emits onDidVisibleEditorsChange with { isExplicit } derived from active editor change events.
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts Marks automatically opened “chat edited files” editors as non-explicit.
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.ts Marks chat-driven editor openings as non-explicit.
src/vs/workbench/common/editor.ts Extends IActiveEditorChangeEvent with optional isExplicit.
src/vs/workbench/browser/parts/editor/editorGroupView.ts Propagates options.isExplicit into the active editor change event.
src/vs/workbench/browser/layout.ts Gates auxiliary bar unmaximize behavior on explicit user action.
src/vs/platform/editor/common/editor.ts Adds isExplicit?: boolean to IEditorOptions to flow explicitness through editor opening APIs.

Copilot's findings

  • Files reviewed: 9/9 changed files
  • Comments generated: 2

Comment thread src/vs/workbench/services/editor/common/editorService.ts Outdated
Comment thread src/vs/workbench/browser/layout.ts Outdated
benibenj and others added 2 commits May 4, 2026 16:48
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Screenshot Changes

Base: ebfbb71d Current: 561516e6

Changed (1)

agentSessionsViewer/NeedsInput/Light
Before After
before after

@benibenj benibenj merged commit 92d1d8d into main May 4, 2026
26 checks passed
@benibenj benibenj deleted the benibenj/magnificent-lynx branch May 4, 2026 15:32
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 4, 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.

Programmatically opening an editor should not impact a maximized chat sessions view

3 participants