Repository navigation
sessions: Keep pane visibility stable across shown chats - #341141
Merged
Sandeep Somavarapu (sandy081) merged 3 commits intoOct 12, 2026
Merged
Sandeep Somavarapu (sandy081) merged 3 commits into
Sandeep Somavarapu (sandy081) merged 3 commits into
Conversation
Keep side and bottom pane visibility window-global while multiple chat surfaces are shown, while preserving per-chat restoration for single-surface tab switches. Co-authored-by: Copilot <[email protected]>
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Benjamin Christopher Simmonds (@benibenj)Matched files:
Ladislau Szomoru (@lszomoru)Matched files:
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Maximized multi-session layouts still use session count in side-pane restoration paths, violating the new rendered-surface ownership contract.
3 open findings
What changed in this PR
Updates Agents Window pane ownership to depend on simultaneously rendered chat surfaces rather than tab/session counts.
Changes:
- Adds observable rendered-chat counting across session views.
- Keeps pane visibility global when multiple chat surfaces are shown.
- Expands documentation and regression coverage.
| File | Description |
|---|---|
src/vs/sessions/services/sessions/browser/sessionsPartService.ts |
Exposes shown-chat count. |
src/vs/sessions/LAYOUT.md |
Documents visibility ownership. |
src/vs/sessions/LAYOUT_CONTROLLER.md |
Details restoration behavior. |
src/vs/sessions/contrib/layout/test/browser/layoutControllerTestUtils.ts |
Adds shown-chat test state. |
src/vs/sessions/contrib/layout/test/browser/desktopStrategies.test.ts |
Updates multi-chat expectations. |
src/vs/sessions/contrib/layout/test/browser/chatLayoutOwnership.test.ts |
Adds ownership regressions. |
src/vs/sessions/contrib/layout/browser/desktopLayoutController.ts |
Connects rendered-chat state. |
src/vs/sessions/contrib/layout/browser/desktop/desktopLayoutStrategy.ts |
Extends strategy context. |
src/vs/sessions/contrib/layout/browser/desktop/desktopExistingSessionStrategy.ts |
Adjusts existing-session visibility. |
src/vs/sessions/contrib/layout/browser/desktop/desktopDraftSessionStrategy.ts |
Adjusts draft composition capture. |
src/vs/sessions/contrib/layout/browser/baseSessionLayoutController.ts |
Uses shown-chat count for panel ownership. |
src/vs/sessions/browser/parts/sessionView.ts |
Counts rendered chat groups. |
src/vs/sessions/browser/parts/sessionsParts.ts |
Forwards shown-chat count. |
src/vs/sessions/browser/parts/sessionsPart.ts |
Aggregates visible chat surfaces. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Select the multi-owner predicate by layout mode so maximized chats restore their saved composition even when other sessions remain mounted. Cover rendered chat aggregation across splits, maximization, and part visibility. Co-authored-by: Copilot <[email protected]>
Michael Lively (Yoyokrazy)
previously approved these changes
Oct 12, 2026
Only force-reveal saved compositions when they belong to a specific chat. Keep shared-layout profile capture based on simultaneously shown chats so switching sessions does not reopen a globally suppressed pane. Co-authored-by: Copilot <[email protected]>
Bhavya U (bhavyaus)
approved these changes
Oct 12, 2026
Sandeep Somavarapu (sandy081)
deleted the
sandy081/agents/global-pane-visibility-fix
branch
October 12, 2026 20:28
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.


Related to #340890
What changed
chatrestores its saved composition even when other sessions remain mounted but hidden.Why
Multiple chat tabs do not necessarily mean multiple chats are simultaneously shown, while split chat groups can show multiple chats within one session. Basing visibility ownership on rendered chat surfaces avoids layout jumps without breaking per-chat visibility when switching between ordinary tabs or when maximizing one of several mounted sessions.
Validation
npm run compile— passednpm run hygiene— passednpm run build-fast -- --client-only— passed./scripts/test.sh --reporter dot --run src/vs/sessions/contrib/layout/test/browser/desktopStrategies.test.ts --run src/vs/sessions/contrib/layout/test/browser/chatLayoutOwnership.test.ts --run src/vs/sessions/test/browser/sessionsPart.test.ts— 146 passingnpm run typecheck-client— passedgit diff --check— passed