Skip to content

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

Merged
danilo-leal merged 5 commits into
mainfrom
merge-conflict-button-ref
Apr 24, 2026
Merged

Fix when agent-powered merge conflict button shows up#54791
danilo-leal merged 5 commits into
mainfrom
merge-conflict-button-ref

Conversation

@danilo-leal

@danilo-leal danilo-leal commented Apr 24, 2026

Copy link
Copy Markdown
Member

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.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 24, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Apr 24, 2026

@ConradIrwin ConradIrwin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fabulous, thank you!

@danilo-leal
danilo-leal added this pull request to the merge queue Apr 24, 2026
Merged via the queue into main with commit f2e9c5a Apr 24, 2026
32 checks passed
@danilo-leal
danilo-leal deleted the merge-conflict-button-ref branch April 24, 2026 14:44
@aviatesk

Copy link
Copy Markdown
Collaborator

Looks like the activity indicator polish in this PR introduced a regression: the spinner no longer animates. content_to_render still produces Content::icon values with .with_rotate_animation(...) for several cases (LSP $/progress, debug session startup, long-running git/fs ops), but the new render path only checks content.icon.is_some() and then always renders a static IconName::LoadCircle:

.when(content.icon.is_some(), |this| {
    this.start_icon(
        Icon::new(IconName::LoadCircle)
            .color(Color::Muted)
            .size(IconSize::Small),
    )
})

The previous ButtonLike-based code rendered content.icon directly via .children(content.icon), preserving both the icon kind (Warning / Download / ArrowCircle) and the rotate animation. After this PR everything collapses to a non-animated LoadCircle, so LSP progress no longer spins in the status bar.

ebaah46 pushed a commit to ebaah46/zed that referenced this pull request May 6, 2026
…#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.
ebaah46 pushed a commit to ebaah46/zed that referenced this pull request May 6, 2026
Quick fix for a little regression I introduced in
zed-industries#54791 accidentally removing
the rotating spinner icon in the activity indicator.

Release Notes:

- N/A
kathbigra pushed a commit to kathbigra/zed that referenced this pull request May 10, 2026
…#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.
kathbigra pushed a commit to kathbigra/zed that referenced this pull request May 10, 2026
Quick fix for a little regression I introduced in
zed-industries#54791 accidentally removing
the rotating spinner icon in the activity indicator.

Release Notes:

- N/A
pull Bot pushed a commit to esinanturan/zed that referenced this pull request May 11, 2026
Follow-up to zed-industries#54791 with some fixes to the activity indicator which
resulted in

- the button no longer being clickable when it should
- the indicator showing a spinner instead of the proper symbol when
downloading or when it should show a warning symbol

Release Notes:

- Fixed some issues where the activity indicator would show the wrong
icon and not be clickable on errors present.
zed-zippy Bot added a commit that referenced this pull request May 11, 2026
#56471)

Cherry-pick of #56469 to stable

----
Follow-up to #54791 with some fixes to the activity indicator which
resulted in

- the button no longer being clickable when it should
- the indicator showing a spinner instead of the proper symbol when
downloading or when it should show a warning symbol

Release Notes:

- Fixed some issues where the activity indicator would show the wrong
icon and not be clickable on errors present.

Co-authored-by: Finn Evers <finn@zed.dev>
zed-zippy Bot added a commit that referenced this pull request May 11, 2026
…w) (#56470)

Cherry-pick of #56469 to preview

----
Follow-up to #54791 with some fixes to the activity indicator which
resulted in

- the button no longer being clickable when it should
- the indicator showing a spinner instead of the proper symbol when
downloading or when it should show a warning symbol

Release Notes:

- Fixed some issues where the activity indicator would show the wrong
icon and not be clickable on errors present.

Co-authored-by: Finn Evers <finn@zed.dev>
jasonsmithio pushed a commit to paddleboarddev/paddleboard that referenced this pull request May 31, 2026
Quick fix for a little regression I introduced in
zed-industries/zed#54791 accidentally removing
the rotating spinner icon in the activity indicator.

Release Notes:

- N/A
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…#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.
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
Quick fix for a little regression I introduced in
zed-industries#54791 accidentally removing
the rotating spinner icon in the activity indicator.

Release Notes:

- N/A
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
Follow-up to zed-industries#54791 with some fixes to the activity indicator which
resulted in

- the button no longer being clickable when it should
- the indicator showing a spinner instead of the proper symbol when
downloading or when it should show a warning symbol

Release Notes:

- Fixed some issues where the activity indicator would show the wrong
icon and not be clickable on errors present.
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…#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.
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
Follow-up to zed-industries#54791 with some fixes to the activity indicator which
resulted in

- the button no longer being clickable when it should
- the indicator showing a spinner instead of the proper symbol when
downloading or when it should show a warning symbol

Release Notes:

- Fixed some issues where the activity indicator would show the wrong
icon and not be clickable on errors present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants