gpui: Refactor follow_tail implementation to fix scroll snapping bugs#53101
Merged
mikayla-maki merged 1 commit intomainfrom Apr 3, 2026
Merged
gpui: Refactor follow_tail implementation to fix scroll snapping bugs#53101mikayla-maki merged 1 commit intomainfrom
mikayla-maki merged 1 commit intomainfrom
Conversation
thread view Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
mikayla-maki
approved these changes
Apr 3, 2026
rtfeldman
pushed a commit
that referenced
this pull request
Apr 4, 2026
…#53101) Follow up to #53017 This PR does some significant refactoring of the `follow_tail` feature in the GPUI list. That's only used by the agent panel's thread view and given to the height-changing nature of streaming agent responses, we were seeing some scroll snapping bugs upon scrolling while the thread is generating. In the process of fixing it, we introduced a `remeasure_items` method as an alternative to `splice` so that we could get the remeasurement fix without scroll position changes. We already had a `remeasure` method that did that for all of the indexes, but we needed something more scoped out for the agent panel case, so as to not remeasure the entire list's content on every new streamed token. Effectively, this ends up reverting what the PR linked above introduced, but it improved the API in the process. Release Notes: - N/A Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
osyvokon
added a commit
that referenced
this pull request
Apr 6, 2026
Refactoring in #53101 broke manual scrolling in many ways. This change restores it, accounting for the new FollowMode enum.
5 tasks
danilo-leal
added a commit
that referenced
this pull request
Apr 6, 2026
Follow-up to #53101 In the process of fixing the thread view's scroll experience, we for got to turn off the follow state tail for functions that power the scroll buttons in the agent panel. Release Notes: - N/A
MasoudAlali
pushed a commit
to MasoudAlali/zed-ide
that referenced
this pull request
Apr 7, 2026
Follow-up to zed-industries#53101 In the process of fixing the thread view's scroll experience, we for got to turn off the follow state tail for functions that power the scroll buttons in the agent panel. Release Notes: - N/A
KlausUllrich
added a commit
to KlausUllrich/zed
that referenced
this pull request
Apr 8, 2026
…tion Port upstream follow_tail refactor (Zed PRs zed-industries#53101, zed-industries#53232) as fresh feature addition: - Add FollowMode (pub) + FollowState (internal) enums - Migrate ListItem::Unmeasured estimated_height → size_hint: Option<Size<Pixels>> - Add remeasure_items(range) — scoped remeasure preserving size hints - Add set_follow_mode(), is_following_tail(), scroll_to_end() - Add follow_state logic to scroll/scroll_by/scroll_to/set_offset_from_scrollbar - Add auto-scroll + re-engagement in layout_items() - Add is_following_tail field to ListScrollEvent Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Follow up to #53017
This PR does some significant refactoring to the
follow_tailfeature in the GPUI list. That's only used by the agent panel's thread view and given the height-changing nature of streaming agent responses, we were seeing some scroll snapping bugs upon scrolling while the thread is generating. In the process of fixing it, we introduced aremeasure_itemsmethod as an alternative tospliceso that we could get the remeasurement fix without scroll position changes. We already had aremeasuremethod that did that for all of the indexes, but we needed something more scoped out for the agent panel case, so as to not remeasure the entire list's content on every new streamed token.Effectively, this ends up reverting what the PR linked above introduced, but it improved the API in the process.
Release Notes: