Skip to content

agent_ui: Set max-width for thread view content#52730

Merged
danilo-leal merged 8 commits intomainfrom
max-width-thread-zoom
Apr 7, 2026
Merged

agent_ui: Set max-width for thread view content#52730
danilo-leal merged 8 commits intomainfrom
max-width-thread-zoom

Conversation

@danilo-leal
Copy link
Copy Markdown
Member

@danilo-leal danilo-leal commented Mar 30, 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.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 30, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 30, 2026
@danilo-leal danilo-leal marked this pull request as ready for review April 6, 2026 22:51
@danilo-leal danilo-leal requested review from eholk, mikayla-maki and rtfeldman and removed request for rtfeldman April 6, 2026 22:51
@danilo-leal danilo-leal self-assigned this Apr 6, 2026
@danilo-leal danilo-leal changed the title agent_ui: Set max-width for centered content when panel is full-screen agent_ui: Set max-width for thread view content Apr 6, 2026
@danilo-leal danilo-leal merged commit 0bde509 into main Apr 7, 2026
47 of 49 checks passed
@danilo-leal danilo-leal deleted the max-width-thread-zoom branch April 7, 2026 12:13
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants