This PR fixes an issue where, sometimes, you couldn't scroll all the way to the bottom of the thread's content. The scrollbar would show up at the bottom of the scrollable container but the content was visibly cut off. Turns out that's a consequence of the top-down thread generation introduced in https://github.com/zed-industries/zed/pull/52440, where changing the list alignment to `Top` made it visible that sometimes, the maximum scroll area would get underestimated because the items in the thread view's list would have a stale height measurement. So, the way this PR fixes the issue is by calling `splice_focusable` in the `EntryUpdated` event, too, so that the height of the items in the overdraw area get marked as unmeasured, triggering a list re-render and re-measuring. We started by writing a test at the list level that would reproduce the regression but then later figured out that this is not an inherent list problem; it was rather a problem with its use within the thread view layer. Then, we explored writing a test that documented the regression, but it turned out to be very hard to simulate this sort of set up in which certain elements would have its height changed during streaming, which would be how you'd get to a mismatched height situation. Therefore, given `AcpThreadEvent::NewEntry` already called `splice_focusable` and don't have a test for it, we figure it'd be safe to move forward without one, too. We then introduced a helper that's now shared between `AcpThreadEvent::NewEntry` and `AcpThreadEvent::EntryUpdated`. Release Notes: - Agent: Fixed an issue where sometimes you couldn't scroll all the way to the bottom of the thread even though there's visibly more content below the fold. Co-authored-by: Eric Holk <eric@zed.dev>
1 file changedLine totals unavailable