gpui: Fix material list unstable scrollbar position (#55808)

Before this PR, `ListState` always used a proportional pending scroll
fraction to preserve the relative scroll position when list items were
resized. This caused text to creep in the agent panel when the scrollbar
was in the middle of the list while the agent was generating text,
because streaming updates changed the logical scroll top slightly.

This PR fixes that behavior by using an absolute offset when only a
subset of items is remeasured, added, or deleted, keeping the logical
top position stable.

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 #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
dfd8328f7bAnthony Eid committed on 5/6/2026, 8:05:53 PM· committed by GitHubparenta4005b6
1 file changedLine totals unavailable