agent_ui: Fix message editor not expanding after sending a message#52545
Merged
danilo-leal merged 3 commits intozed-industries:mainfrom Mar 27, 2026
Merged
Conversation
danilo-leal
approved these changes
Mar 27, 2026
Member
danilo-leal
left a comment
There was a problem hiding this comment.
Thank you! I pushed a couple of commits simplifying this a bit as we could treat this completely out of the render and treat it on a dedicated method called from the constructor and event handlers.
This was referenced Mar 28, 2026
MrSubidubi
added a commit
that referenced
this pull request
Mar 30, 2026
Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #52132. *This PR previously also fixes the "expanded message editor not taking up full height" part, but #52545 has already fixed that. Yet it seems to leave a new issue (that was previously not revealed) behind, as follows.* This PR fixes the `Full + ExcludeOverscrollMargin` editor mode (which the agent panel message editor uses in expanded mode), which could jitter while typing because render-time layout and scroll-position updates were clamping against different effective `scroll_beyond_last_line` policies. This PR fixes that inconsistency so the expanded editor stays stable while typing, and adds a regression test covering `ExcludeOverscrollMargin` scroll clamping. https://github.com/user-attachments/assets/86abf04d-c1a1-419b-96d0-8ca097c0acb0 https://github.com/user-attachments/assets/03dbdc3c-f58e-4378-8c6a-4bda1ae425c8 Release Notes: - Fixed the expanded Agent Panel message editor so it no longer jitters while typing. --------- Co-authored-by: MrSubidubi <finn@zed.dev>
|
Referencing this issue #52616 The issue still exists. I am on the latest stable version, and it's still there. |
Contributor
Author
The fix landed in main on March 27 but wasn't backported to v0.230.x, so v0.230.2 doesn't include it. Should be in the next release.doesn't include it. Should be in the next release. |
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.
Context
Tracks the previous
v2_empty_statesoset_mode()only fires on actual state transitions, not every render frame.Closes #52424
Demo
Before:
before_fix_agent.mp4
After:
after_fix_agebt.mp4
How to review
crates/agent_ui/src/conversation_view/thread_view.rs— adds awas_v2_empty_statefield to gate theset_mode()call inrender_message_editor()so it only runs on transitionscrates/agent_ui/src/agent_panel.rs— test verifying that manually setting the editor to Full mode survives a render cycle without being reset back to AutoHeightSelf-review checklist
Release Notes: