Skip to content

agent_ui: Fix expanded message editor jitters while typing#52612

Merged
MrSubidubi merged 4 commits intozed-industries:mainfrom
Charlie-XIAO:fix/agent-panel-expand-message-editor
Mar 30, 2026
Merged

agent_ui: Fix expanded message editor jitters while typing#52612
MrSubidubi merged 4 commits intozed-industries:mainfrom
Charlie-XIAO:fix/agent-panel-expand-message-editor

Conversation

@Charlie-XIAO
Copy link
Copy Markdown
Contributor

@Charlie-XIAO Charlie-XIAO commented Mar 28, 2026

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • 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.

Old.mp4
New.mp4

Release Notes:

  • Fixed the expanded Agent Panel message editor so it no longer jitters while typing.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 28, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team, SomeoneToIgnore and Veykril and removed request for a team March 28, 2026 00:40
@Charlie-XIAO Charlie-XIAO marked this pull request as draft March 28, 2026 00:41
@maxdeviant maxdeviant changed the title agent_ui: fix expanded message editor not taking full height agent_ui: Fix expanded message editor not taking full height Mar 28, 2026
@Charlie-XIAO
Copy link
Copy Markdown
Contributor Author

Seems already fixed in #52545, but this is still meaningful in fixing the jittering in expanded mode, but I will need to reformulate this PR.

@Charlie-XIAO Charlie-XIAO changed the title agent_ui: Fix expanded message editor not taking full height agent_ui: Fix expanded message editor jitters while typing Mar 28, 2026
@Charlie-XIAO
Copy link
Copy Markdown
Contributor Author

Re-scoped the PR.

@Charlie-XIAO Charlie-XIAO marked this pull request as ready for review March 28, 2026 01:37
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested a review from a team March 28, 2026 01:37
@Veykril Veykril assigned MrSubidubi and unassigned Veykril Mar 30, 2026
@SomeoneToIgnore

This comment was marked as outdated.

Copy link
Copy Markdown
Member

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find and fix, thanks for this and adding a test upfront!

@MrSubidubi MrSubidubi enabled auto-merge (squash) March 30, 2026 08:13
@MrSubidubi MrSubidubi merged commit 7f7520b into zed-industries:main Mar 30, 2026
30 checks passed
@Charlie-XIAO Charlie-XIAO deleted the fix/agent-panel-expand-message-editor branch March 30, 2026 14:36
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent Panel: Expanded Message Editor does not take up full height

4 participants