From e1505316e0906337e6b9d75aa53ab3471033afc8 Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Fri, 12 Jun 2026 10:48:27 +0200 Subject: [PATCH] workspace: Fix overflow in error popup (#59185) Release Notes: - Fixed an issue where the close button could overflow within a workspace error popup. --------- Co-authored-by: Lukas Wirth Co-authored-by: Lukas Wirth --- crates/workspace/src/notifications.rs | 11 ++++++----- crates/zed/src/zed.rs | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/crates/workspace/src/notifications.rs b/crates/workspace/src/notifications.rs index 74ac4bd38f..7441cf391d 100644 --- a/crates/workspace/src/notifications.rs +++ b/crates/workspace/src/notifications.rs @@ -977,6 +977,7 @@ pub mod simple_message_notification { let copy_text = self.copy_text.clone(); let header_actions = h_flex() + .flex_shrink_0() .gap_1() .when_some(copy_text, |el, text| { el.child( @@ -1157,6 +1158,8 @@ pub mod simple_message_notification { .items_start() .child( v_flex() + .flex_1() + .min_w_0() .gap_0p5() .when_some(self.title.clone(), |div, title| { div.child(Label::new(title)) @@ -1270,13 +1273,11 @@ pub mod simple_message_notification { struct LanguageServerError; impl WorkspaceError for LanguageServerError { fn primary_message(&self) -> SharedString { - "Couldn't reach the language server.".into() + "Error: Prepare rename via rust-analyzer failed: No references found at position" + .into() } fn secondary_message(&self) -> Option { - Some( - "Make sure the server is installed and your network connection is working." - .into(), - ) + None } fn primary_action(&self) -> ErrorAction { ErrorAction::dismiss() diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 37521ae704..e396a4b301 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -1324,7 +1324,9 @@ fn register_actions( impl WorkspaceError for DebugError { fn primary_message(&self) -> SharedString { - SharedString::new_static("This is an error.") + SharedString::new_static( + "Error: Prepare rename via rust-analyzer failed: No references found at position", + ) } fn severity(&self) -> ErrorSeverity {