sessions: speed up split chat tab closing - #333014
Merged
Connor Peet (connor4312) merged 3 commits intoAug 27, 2026
Merged
Conversation
Reduce synchronous UI work when a user closes a chat tab in a split Agents window. - Remove an orphaned split group before its empty chat assignment creates a temporary new-chat view. - Update active-chat, visibility, and session-action state without rebuilding all chat tabs. - Cache the observed tab bar height instead of reading layout during each group layout. - Preserve active tab ARIA state and atomic split-chat replacement behavior. - Add focused regression tests for the optimized paths. Performance trace comparison: | Measurement | Original | Updated | Improvement | | --- | ---: | ---: | ---: | | Close 1 click handler | 242.1 ms | 1.07 ms | 99.6% | | Close 1 complete input task | 243.2 ms | 5.12 ms | 97.9% | | Close 2 click handler | 298.1 ms | 0.95 ms | 99.7% | | Close 2 complete input task | 298.8 ms | 4.54 ms | 98.5% | Style recalculations fell from 182/151 to 1/1, and layout passes fell from 188/156 to 0/0. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…plit-chat-tab-closing
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Benjamin Christopher Simmonds (@benibenj)Matched files:
|
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
src/vs/sessions/browser/parts/chatCompositeBar.ts — This optimized session-action update is not covered by the new DOM-identity regression. The… |
|
src/vs/sessions/browser/parts/chatCompositeBar.ts — The new cached-height path is not covered by the regression tests. A stale or zero _height now… |
What changed in this PR
Optimizes split-chat tab closing in the Agents window.
Changes:
- Removes orphaned chat groups before reconciliation.
- Updates tab state without unnecessary rebuilding.
- Caches tab-bar height and adds regression coverage.
| File | Description |
|---|---|
chatGroupsView.ts |
Removes orphaned groups efficiently. |
chatCompositeBar.ts |
Optimizes tab updates and height measurement. |
chatGroupsView.test.ts |
Tests split-group removal and replacement. |
chatCompositeBar.test.ts |
Tests tab identity and ARIA state. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Add focused coverage for the optimized state and height update paths. - Verify that session-action visibility changes preserve existing chat tab elements. - Inject a ResizeObserver test seam into the chat composite bar. - Verify changed and repeated observed heights and border-box observation. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Anthony Kim (anthonykim1)
approved these changes
Aug 27, 2026
Connor Peet (connor4312)
deleted the
connor4312/optimize-split-chat-tab-closing
branch
August 27, 2026 19:59
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.


sessions: speed up split chat tab closing
Reduce synchronous UI work when a user closes a chat tab in a split Agents window.
Performance trace comparison:
Style recalculations fell from 182/151 to 1/1, and layout passes fell from 188/156 to 0/0.
(Commit message generated by Copilot)
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com