sessions: fix Agents window hang with per-group editor limit of 1 - #327074
Merged
sandy081 merged 4 commits intoJul 23, 2026
Conversation
The single-pane docked tab bar keeps multiple managed tabs open at once
(pinned Changes multi-diff + Files placeholder + file tabs). The user's
`workbench.editor.showTabs` (single/none) and `workbench.editor.limit`
settings break this: with a per-group editor limit of 1 the managed-tab
reconciliation and EditorsObserver enter an infinite open/close loop and
hang the renderer.
Enforce `showTabs: 'multiple'` and `limit: { enabled: false }` on the
single-pane editor part via the existing enforcePartOptions API, scoped
to this part only so the user's settings are untouched elsewhere.
Fixes #327066
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @benibenjMatched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Disables editor-limit eviction for the Agents window’s single-pane editor layout to prevent managed-tab reconciliation loops.
Changes:
- Forces multiple tabs.
- Disables editor limits for the single-pane part.
Show a summary per file
| File | Description |
|---|---|
src/vs/sessions/browser/parts/singlePaneEditorPart.ts |
Enforces editor-part options for managed tabs. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Medium
Address review feedback: the previous fix disabled workbench.editor.limit for the whole Agents window (EditorsObserver reads the aggregate main-part partOptions but evicts across modal/auxiliary parts too). Instead, exempt only the managed docked inputs from the limit via a new EditorInputCapabilities.ExcludeFromEditorLimit set on DockedEditorInput. EditorsObserver skips such editors when counting/evicting, so the managed Changes/Files tabs are never auto-closed (no open/close loop) while every other editor — including modal and auxiliary editor groups — still honors the user's limit. Add regression tests: EditorsObserver keeps excluded editors while still evicting a normal editor at a per-group limit of 1, and DockedEditorInput carries the exclusion capability. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
Addressed review feedback in b823988:
|
dmitrivMS
previously approved these changes
Jul 23, 2026
Address feedback: list the docked inputs' capabilities explicitly (adding only ExcludeFromEditorLimit) instead of deriving Readonly from super, so it is obvious Readonly is retained. DockedEditorInput still carries the exemption by default for any docked input that does not override capabilities. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
DockedEditorInput.capabilities contributes only the limit exemption (no Readonly). Each docked subclass ORs super.capabilities with the exact capabilities it declared before, so Readonly/Singleton/ForceReveal are retained explicitly while the exemption comes from the base. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dmitrivMS
approved these changes
Jul 23, 2026
sandy081
deleted the
sandy081/agents/agents-window-disable-single-tab-mode
branch
July 23, 2026 00:58
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.
Fixes #327066
What
Enforce
showTabs: 'multiple'andlimit: { enabled: false }on the single-pane editor part (SinglePaneMainEditorPart) via the existingenforcePartOptionsAPI.Why
The single-pane docked tab bar keeps several managed editors open at once — the pinned Changes multi-diff tab, the Files placeholder, and any real file tabs (
[Changes][Files][file…]). Two user settings break this layout:workbench.editor.showTabsset tosingle/nonecollapses the docked tab strip.workbench.editor.limit(especiallyperEditorGroup: true, value: 1) makesEditorsObserverauto-evict the least-recently-used tab. Since the managed tabs are pinned (not sticky), they get evicted, the managed-tab reconciliation reopens them, and the observer evicts again — an infinite open/close loop that hangs the renderer (the reported bug).Notes for reviewers
workbench.editor.showTabs/workbench.editor.limitsettings are untouched everywhere else.limit: { enabled: false }is sufficient becauseEditorsObserver.ensureOpenedEditorsLimitreturns early when the limit is disabled, so the other limit fields are never read.showTabsenforcement was already present; this PR adds thelimitenforcement to close the hang.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com