From c33d9cfbb795aa9d4273895f61806ba9b74b000a Mon Sep 17 00:00:00 2001 From: Danilo Leal Date: Fri, 24 Apr 2026 16:20:50 +0200 Subject: [PATCH 1/4] Fix when the merge conflict button gets dismissed --- crates/git_ui/src/conflict_view.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/git_ui/src/conflict_view.rs b/crates/git_ui/src/conflict_view.rs index 25175dce481637..d5c5fe02bfe5b5 100644 --- a/crates/git_ui/src/conflict_view.rs +++ b/crates/git_ui/src/conflict_view.rs @@ -418,6 +418,12 @@ fn collect_conflicted_file_paths(project: &Project, cx: &App) -> Vec { for repo in git_store.repositories().values() { let snapshot = repo.read(cx).snapshot(); for (repo_path, _) in snapshot.merge.merge_heads_by_conflicted_path.iter() { + let is_currently_conflicted = snapshot + .status_for_path(repo_path) + .is_some_and(|entry| entry.status.is_conflicted()); + if !is_currently_conflicted { + continue; + } if let Some(project_path) = repo.read(cx).repo_path_to_project_path(repo_path, cx) { paths.push( project_path From 863725bc4f102ea9026a7217e964cb4af7fe52f5 Mon Sep 17 00:00:00 2001 From: Danilo Leal Date: Fri, 24 Apr 2026 16:21:10 +0200 Subject: [PATCH 2/4] Position it before the activity indicator stuff --- crates/zed/src/zed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index f25f20b26baaaa..6d1a9c176f1193 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -573,8 +573,8 @@ pub fn initialize_workspace(app_state: Arc, cx: &mut App) { status_bar.add_left_item(lsp_button, window, cx); status_bar.add_left_item(diagnostic_summary, window, cx); status_bar.add_left_item(active_file_name, window, cx); - status_bar.add_left_item(activity_indicator, window, cx); status_bar.add_left_item(merge_conflict_indicator, window, cx); + status_bar.add_left_item(activity_indicator, window, cx); status_bar.add_right_item(edit_prediction_ui, window, cx); status_bar.add_right_item(active_buffer_encoding, window, cx); status_bar.add_right_item(active_buffer_language, window, cx); From 45d28a80127e6df9827312e8b3c6f2e44e2f8745 Mon Sep 17 00:00:00 2001 From: Danilo Leal Date: Fri, 24 Apr 2026 16:21:20 +0200 Subject: [PATCH 3/4] Bonus: Refine the activity indicator button --- .../src/activity_indicator.rs | 71 +++++++++---------- 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/crates/activity_indicator/src/activity_indicator.rs b/crates/activity_indicator/src/activity_indicator.rs index 5f4e25b5ccd40c..76fc89b4ef609b 100644 --- a/crates/activity_indicator/src/activity_indicator.rs +++ b/crates/activity_indicator/src/activity_indicator.rs @@ -3,8 +3,8 @@ use editor::Editor; use extension_host::{ExtensionOperation, ExtensionStore}; use futures::StreamExt; use gpui::{ - App, Context, CursorStyle, Entity, EventEmitter, InteractiveElement as _, ParentElement as _, - Render, SharedString, StatefulInteractiveElement, Styled, Window, actions, + App, Context, Entity, EventEmitter, InteractiveElement as _, ParentElement as _, Render, + SharedString, Styled, Window, actions, }; use language::{ BinaryStatus, LanguageRegistry, LanguageServerId, LanguageServerName, @@ -22,10 +22,7 @@ use std::{ sync::Arc, time::{Duration, Instant}, }; -use ui::{ - ButtonLike, CommonAnimationExt, ContextMenu, PopoverMenu, PopoverMenuHandle, Tooltip, - prelude::*, -}; +use ui::{CommonAnimationExt, ContextMenu, PopoverMenu, PopoverMenuHandle, Tooltip, prelude::*}; use util::truncate_and_trailoff; use workspace::{StatusItemView, Workspace, item::ItemHandle}; @@ -720,43 +717,39 @@ impl Render for ActivityIndicator { }; let activity_indicator = cx.entity().downgrade(); let truncate_content = content.message.len() > MAX_MESSAGE_LEN; + result.gap_2().child( PopoverMenu::new("activity-indicator-popover") .trigger( - ButtonLike::new("activity-indicator-trigger").child( - h_flex() - .id("activity-indicator-status") - .gap_2() - .children(content.icon) - .map(|button| { - if truncate_content { - button - .child( - Label::new(truncate_and_trailoff( - &content.message, - MAX_MESSAGE_LEN, - )) - .size(LabelSize::Small), - ) - .tooltip(Tooltip::text(content.message)) - } else { - button - .child(Label::new(content.message).size(LabelSize::Small)) - .when_some( - content.tooltip_message, - |this, tooltip_message| { - this.tooltip(Tooltip::text(tooltip_message)) - }, - ) - } + Button::new("activity-indicator-trigger", { + if truncate_content { + truncate_and_trailoff(&content.message, MAX_MESSAGE_LEN).to_string() + } else { + content.message.clone() + } + }) + .label_size(LabelSize::Small) + .when(content.icon.is_some(), |this| { + this.start_icon( + Icon::new(IconName::LoadCircle) + .color(Color::Muted) + .size(IconSize::Small), + ) + }) + .map(|button| { + if truncate_content { + button.tooltip(Tooltip::text(content.message)) + } else { + button.when_some(content.tooltip_message, |this, tooltip_message| { + this.tooltip(Tooltip::text(tooltip_message)) }) - .when_some(content.on_click, |this, handler| { - this.on_click(cx.listener(move |this, _, window, cx| { - handler(this, window, cx); - })) - .cursor(CursorStyle::PointingHand) - }), - ), + } + }) + .when_some(content.on_click, |this, handler| { + this.on_click(cx.listener(move |this, _, window, cx| { + handler(this, window, cx); + })) + }), ) .anchor(gpui::Anchor::BottomLeft) .menu(move |window, cx| { From 044b5a2c3f2a68e4854aa7e8bbd757113d2b8fe7 Mon Sep 17 00:00:00 2001 From: Danilo Leal Date: Fri, 24 Apr 2026 16:29:31 +0200 Subject: [PATCH 4/4] Fix clippy --- crates/activity_indicator/src/activity_indicator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/activity_indicator/src/activity_indicator.rs b/crates/activity_indicator/src/activity_indicator.rs index 76fc89b4ef609b..7aa5b91a4c2f7f 100644 --- a/crates/activity_indicator/src/activity_indicator.rs +++ b/crates/activity_indicator/src/activity_indicator.rs @@ -723,7 +723,7 @@ impl Render for ActivityIndicator { .trigger( Button::new("activity-indicator-trigger", { if truncate_content { - truncate_and_trailoff(&content.message, MAX_MESSAGE_LEN).to_string() + truncate_and_trailoff(&content.message, MAX_MESSAGE_LEN) } else { content.message.clone() }