Avoid unnecessary layouts while typing in chat input#286935
Merged
roblourens merged 2 commits intomainfrom Jan 10, 2026
Merged
Conversation
Fix #286531 This was added to rerender the working set to show file attachments in it, but we don't do that anymore
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes chat widget performance by removing unnecessary layout operations that were triggered while typing in the chat input. The changes eliminate redundant calls to renderChatEditingSessionState() and a layout operation that was originally added for rendering file variables in the working set, which is no longer needed.
Changes:
- Removed
onDidChangeParsedInputlistener that unnecessarily triggered editing session state renders on every input change - Removed redundant
autorunthat re-rendered editing session state when the session changed (already handled by existing autorun) - Removed explicit layout call after
renderChatEditingSessionState()(layout is properly triggered viaonDidChangeHeightevent mechanism)
TylerLeonhardt
approved these changes
Jan 10, 2026
eli-w-king
pushed a commit
that referenced
this pull request
Jan 14, 2026
* Don't relayout the chat widget when typing in the input Fix #286531 This was added to rerender the working set to show file attachments in it, but we don't do that anymore * Possibly more ambitious change but both of these seem redundnat
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 #286531
Rendering the chat edit session state when input changes was added for rendering file variables in the working set, in 92df7b6, which we don't do anymore anyway.
The second commit is a bit more aggressive but I'm pretty sure that it's safe.
just fyi @justschen