From 431c623eb70ec75aa0ec366203db476d01b256e0 Mon Sep 17 00:00:00 2001
From: Dawid Harat <40028795+deralaxo@users.noreply.github.com>
Date: Mon, 2 Feb 2026 12:25:18 +0100
Subject: [PATCH] workspace: Add copy button to ErrorMessagePrompt popup
(#48107)
My own uncreated issue. Super simple QOL change.
Just needed to copy errors and the only other place I'm aware of is
console.
The text inside the error popup is not selectable (at least on macos)
before:
after:
Release Notes:
- Added `CopyButton` to `ErrorMessagePrompt`
---
crates/workspace/src/notifications.rs | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/crates/workspace/src/notifications.rs b/crates/workspace/src/notifications.rs
index 8480d1276705c50b824b878cf8626e85ea9fcdbe..10437743df39b22722638357976d5a8d6224eaf8 100644
--- a/crates/workspace/src/notifications.rs
+++ b/crates/workspace/src/notifications.rs
@@ -519,8 +519,17 @@ impl Render for ErrorMessagePrompt {
}),
)
.child(
- ui::IconButton::new("close", ui::IconName::Close)
- .on_click(cx.listener(|_, _, _, cx| cx.emit(DismissEvent))),
+ h_flex()
+ .gap_1()
+ .child(
+ CopyButton::new("copy-error-message", self.message.clone())
+ .tooltip_label("Copy Error Message"),
+ )
+ .child(
+ ui::IconButton::new("close", ui::IconName::Close).on_click(
+ cx.listener(|_, _, _, cx| cx.emit(DismissEvent)),
+ ),
+ ),
),
)
.child(