agent_ui: Set max-width for thread view content#52730
Merged
danilo-leal merged 8 commits intomainfrom Apr 7, 2026
Merged
Conversation
eholk
approved these changes
Apr 6, 2026
danilo-leal
added a commit
that referenced
this pull request
Apr 7, 2026
I was testing out the changes in #52730 and realized that the agent panel, when full screen, would be auto-dismissed if I toggled the sidebar off. Turns out this happens because we were "hard-coding" the focus back to the center pane, which was automatically dismissing zoomed items. So, in this PR, I essentially am copying the ModalLayer approach of storing whatever was focused before so we can return focus back to it if possible. Release Notes: - N/A
MasoudAlali
pushed a commit
to MasoudAlali/zed-ide
that referenced
this pull request
Apr 7, 2026
This PR adds a configurable max-width to the agent panel. This will be particularly useful when opting into an agentic-first layout where the thread will be at the center of the UI (with the panel most likely full-screen'ed, which is why I'm also adding here the button to make it full screen in the toolbar). The default max-width is 850, which is a bit bigger than the one generally considered as a standard (~66 characters wide, which usually sums up to 750 pixels). Release Notes: - Agent: Added a max-width to the thread view for better readability, particularly when the panel is zoomed in.
MasoudAlali
pushed a commit
to MasoudAlali/zed-ide
that referenced
this pull request
Apr 7, 2026
…ies#53283) I was testing out the changes in zed-industries#52730 and realized that the agent panel, when full screen, would be auto-dismissed if I toggled the sidebar off. Turns out this happens because we were "hard-coding" the focus back to the center pane, which was automatically dismissing zoomed items. So, in this PR, I essentially am copying the ModalLayer approach of storing whatever was focused before so we can return focus back to it if possible. Release Notes: - N/A
danilo-leal
added a commit
that referenced
this pull request
Apr 8, 2026
Quick follow up to #52730 with some adjustments. Ended up cleaning some unused UI elements already (i.e., the "Recent" history items in the agent panel's empty state). Release Notes: - N/A
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.
This PR adds a configurable max-width to the agent panel. This will be particularly useful when opting into an agentic-first layout where the thread will be at the center of the UI (with the panel most likely full-screen'ed, which is why I'm also adding here the button to make it full screen in the toolbar). The default max-width is 850, which is a bit bigger than the one generally considered as a standard (~66 characters wide, which usually sums up to 750 pixels).
Release Notes: