Skip to content

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

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

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

Conversation

@danilo-leal
Copy link
Copy Markdown
Member

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

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
Copy link
Copy Markdown
Member

@ConradIrwin ConradIrwin left a comment

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
Contributor

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.

GitGlimpse895 pushed a commit to GitGlimpse895/zed that referenced this pull request Apr 27, 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
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
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