# thread_view: Only show thread controls at the end of the turn \(\#61362\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/9731561c57014f91a9e8b2dd8d1fd4ccc223714c)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 9731561c57014f91a9e8b2dd8d1fd4ccc223714c

Requested commit: 9731561c57014f91a9e8b2dd8d1fd4ccc223714c

Commit: 9731561c57014f91a9e8b2dd8d1fd4ccc223714c

Tree: 475ee16c13b1c99fb13d9b61a953b57938390ac0

Author: Danilo Leal

Committer: GitHub

## Message

```
thread_view: Only show thread controls at the end of the turn (#61362)

Follow up to https://github.com/zed-industries/zed/pull/61245. That PR
introduced a bug where the thread controls would appear at seemingly
random tool boundaries as opposed to only at the end of each turn. It
caused this sort of behavior, where we'd have many instances of those
buttons showing up:

<img width="500" alt="Screenshot 2026-07-20 at 4  03 2@2x"
src="https://github.com/user-attachments/assets/6e6f716e-adb5-4532-9f89-e955398cda23"
/>

Alongside with fixing it, this PR is also making the "scroll to top"
only show up only at the very last turn. I think that makes more sense
given you'd be most likely interested to go to the top when you're at
the bottom, rather than at every turn, but I could be persuaded
otherwise; not holding that too strongly.

Release Notes:

- N/A
```

## Parents

- [9caf263a9b8d1815ee93229fc15112f7b8fbbc45](https://git.cafe/gitcafe/zed/commit/9caf263a9b8d1815ee93229fc15112f7b8fbbc45?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/9731561c57014f91a9e8b2dd8d1fd4ccc223714c?format=markdown)
