# Fix when agent-powered merge conflict button shows up \(\#54791\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f2e9c5a02596ecb716c75ff06d11e1dbacd10d0e

Requested commit: f2e9c5a02596ecb716c75ff06d11e1dbacd10d0e

Commit: f2e9c5a02596ecb716c75ff06d11e1dbacd10d0e

Tree: f40d3f73946e87a6fa285d95e6e521f8166e8b72

Author: Danilo Leal

Committer: GitHub

## Message

```
Fix when agent-powered merge conflict button shows up (#54791)

This PR fixes the logic to dismiss the "resolve merge conflict with
agent" button. Previously, we were just observing
`merge_heads_by_conflicted_path`, which seems to be intentionally
sticky, preserving the conflicted paths until changes are either
committed or aborted. This would make the button to resolve conflicts
show up even _after_ the changes get resolved. Now, we're checking
whether paths are _currently_ conflicted (`is_conflicted()`), and if
they are not, we don't display the button, even though the resolution
might have not been committed or aborted yet.

As a bonus, in this PR, I'm also putting the resolve conflict button
_before_ the activity indicator, so as to avoid bounciness, and did a
quick polish of the activity indicator button itself, by using the
`Button` component.

Release Notes:

- Fixed a bug with the merge conflict "resolve with agent" button where
it would be displayed even though all conflicts have already been
resolved.
```

## Parents

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

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