chat: avoid session switch height flicker#319227
Open
roblourens wants to merge 2 commits into
Open
Conversation
Only schedule first-measurement chat row height updates when the measured row would otherwise exceed the list's allocated height. This preserves the cutoff fix from PR 318385 without reintroducing first-measurement relayouts for rows that already fit. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts chat list row height scheduling to avoid unnecessary first-measurement updates that can cause session-switch flicker, while retaining updates when the initial render would clip content.
Changes:
- Adds a helper for deciding whether an initial chat row height change should be scheduled.
- Tracks the list-allocated row height during rendering.
- Adds focused browser unit coverage for the scheduling decision.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts |
Adds allocated-height tracking and gates first-measurement height updates. |
src/vs/workbench/contrib/chat/test/browser/widget/chatListRenderer.test.ts |
Adds unit tests for the initial height scheduling helper. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
Compare initial chat row measurements against the actual allocated height instead of the ceiled allocation so fractional row heights still schedule a corrective update when they would clip content. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bhavyaus
approved these changes
Jun 1, 2026
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.
Summary
Validation
(Written by Copilot)