gpui: Fix follow_tail not re-engaging after scrollbar drag (#54570)

Fixes an inconsistency with the way scrolling interacts with the
`follow_tail` GPUI list feature:
- Scrolling normally sets `follow_state` to `FollowState::Tail {
is_following: false }`, so later scrolling to the bottom re-engages
`follow_tail`
- Scrolling by dragging the scrollbar previously set `follow_state` to
`FollowState::Normal`, preventing `follow_tail` from re-engaging after
scrolling to the bottom

As far as I can tell this behavior was unintentional, despite there
being a test that exercised this exact behavior that `follow_tail`
doesn't re-engage after dragging the scrollbar — my best guess is that
that test was derived from the bugged scrollbar handler logic, and not
based on any actual intent for scrollbar drags to prevent `follow_tail`
from re-engaging.

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

Release Notes:

- Fixed agent panel auto-scroll not re-engaging after interacting with
the scrollbar

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2f445d4059Tim Vermeulen committed on 4/23/2026, 6:36:41 PM· committed by GitHubparent0ab64d6
1 file changedLine totals unavailable