Skip to content

agent_ui: Refine the thinking block display design#52608

Merged
danilo-leal merged 2 commits intomainfrom
thinking-block-upgrade
Mar 30, 2026
Merged

agent_ui: Refine the thinking block display design#52608
danilo-leal merged 2 commits intomainfrom
thinking-block-upgrade

Conversation

@danilo-leal
Copy link
Copy Markdown
Member

Follow up to #51525
Closes #52452

This PR further refines the behavior of thinking blocks in the agent panel. In the PR linked above, I had previously made it auto-expand while running but then auto-collapse when finished. Although that reduced the sense of staleness when the model is thinking for too long, it caused layout shift that many found jarring.

Therefore, this PR changes the behavior so that, by default, thinking blocks render "almost" fully expanded. They will have a max-height and will auto-scroll as content streams in. Therefore, this design fully removes layout shift and still allows you to sort of follow along the generated thinking content, even though sometimes it can be fast, in which case you can always fully expand it. Lastly, I'm also adding a "thinking display" setting that allows to choose between the "automatic" behavior (what I just described, the default), always expanded, or always collapsed.

Here's a preview:

Screenshot.2026-03-27.at.7.04.mp4

Release Notes:

  • Agent: Refined thinking block display, removing layout shift while still allowing it to be readable while it streams in. It comes together with a "Thinking Display" setting to control the behavior

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 27, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team, osyvokon and rtfeldman and removed request for a team March 27, 2026 22:09
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 27, 2026
@danilo-leal danilo-leal merged commit 28b73a1 into main Mar 30, 2026
41 checks passed
@danilo-leal danilo-leal deleted the thinking-block-upgrade branch March 30, 2026 10:34
danilo-leal added a commit that referenced this pull request Apr 1, 2026
Follow-up to #52608

This PR adds a new iteration to the thinking block display design after
some internal round of feedback. It turns out, we had some people
appreciating the auto-collapse when thinking is done; thinking content
isn't too useful afterwards and it is just more content _to to he
model_, not the user. I also liked the one old but it definitely has the
issue of being a jarring layout shift when it wraps up. So that's why
I'm keeping what I introduced in the PR linked above as a setting, so
that anyone who feels strongly about the default (auto-expand, and
auto-collapse) can change that.

Release Notes:

- N/A
@zed-zippy zed-zippy bot added the PR state:needs review Used to label PRs that are in need of a post-merge approval label Apr 6, 2026
@cole-miller
Copy link
Copy Markdown
Member

@zed-industries/approved

@dinocosta dinocosta removed the PR state:needs review Used to label PRs that are in need of a post-merge approval label Apr 8, 2026
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.

Agent panel text streaming resets mid-stream

3 participants