Skip to content

Prevent hidden chats from rendering during custom view swaps - #333789

Merged
Benjamin Christopher Simmonds (benibenj) merged 1 commit into
mainfrom
benibenj/fix-automation-chat-freeze
Sep 1, 2026
Merged

Prevent hidden chats from rendering during custom view swaps#333789
Benjamin Christopher Simmonds (benibenj) merged 1 commit into
mainfrom
benibenj/fix-automation-chat-freeze

Conversation

@benibenj

Copy link
Copy Markdown
Contributor

Summary

  • suspend mounted session chat content before custom view grid transitions
  • skip hidden chat group layouts and catch up after the session becomes visible
  • cover custom view swaps, startup, and hidden layout behavior

Fixes #333294

Validation

  • 134 targeted Sessions tests passing
  • client typecheck passed in the source worktree

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

Sandeep Somavarapu (@sandy081)

Matched files:

  • src/vs/sessions/services/sessions/browser/sessionsPartService.ts

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/sessions/services/sessions/browser/sessionsPartService.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.

Copilot review overview

Review tier: Balanced
Findings: 2 Medium severity

New issues introduced by this change (2)
Severity Finding
Medium severity src/​vs/​sessions/​browser/​workbench.ts — Suspend the session content before unmaximizing the editor. setEditorMaximized(false) restores…
Medium severity src/​vs/​sessions/​browser/​workbench.ts — Resume the chats only after removing the hidden layout classes. While closing a custom view,…
What changed in this PR

Prevents hidden Sessions chats from laying out during custom-view transitions.

Changes:

  • Adds an independent session-content visibility gate.
  • Defers hidden chat layouts and catches up when shown.
  • Adds transition, startup, and hidden-layout tests.
File Description
src/​vs/​sessions/​browser/​workbench.ts Suspends chat content during custom-view transitions.
src/​vs/​sessions/​browser/​parts/​sessionsPart.ts Combines grid and content visibility.
src/​vs/​sessions/​browser/​parts/​sessionsParts.ts Forwards content visibility changes.
src/​vs/​sessions/​browser/​parts/​chatGroupView.ts Skips hidden child layouts.
src/​vs/​sessions/​services/​sessions/​browser/​sessionsPartService.ts Exposes content visibility control.
src/​vs/​sessions/​test/​browser/​workbench.test.ts Tests transition ordering and startup.
src/​vs/​sessions/​test/​browser/​sessionsPart.test.ts Tests combined visibility state.
src/​vs/​sessions/​test/​browser/​chatGroupsView.test.ts Tests hidden layout suppression.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

}

// Suspend chat content before any custom view transition can trigger layout.
this.sessionsPartService.setContentVisible(false);
}
});
} finally {
this.sessionsPartService.setContentVisible(!visible);
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 9f9213b4 Current: 5e3268fd

Changed (1)

chat/aiCustomizations/aiCustomizationManagementEditor/McpServersSearch/Light
Before After
before after

1 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details.

@benibenj
Benjamin Christopher Simmonds (benibenj) merged commit 959f7db into main Sep 1, 2026
41 checks passed
@benibenj
Benjamin Christopher Simmonds (benibenj) deleted the benibenj/fix-automation-chat-freeze branch September 1, 2026 16:08
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 1, 2026
Bhavya U (bhavyaus) pushed a commit that referenced this pull request Sep 1, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Navigating to Automations can recursively rerender a long chat and freeze the renderer

3 participants