From f1d15aee4b2be45f1da7466b1cca0886ad519a90 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Tue, 27 Oct 2026 19:47:10 +0100 Subject: [PATCH] :sparkles: Keep toast for file reparation open until user closes it (#12662) --- frontend/src/app/main/data/workspace/notifications.cljs | 5 ++++- .../frontend_tests/data/workspace_notifications_test.cljs | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/notifications.cljs b/frontend/src/app/main/data/workspace/notifications.cljs index c733337e2a..6945fb00a9 100644 --- a/frontend/src/app/main/data/workspace/notifications.cljs +++ b/frontend/src/app/main/data/workspace/notifications.cljs @@ -279,7 +279,10 @@ :redo-changes (vec changes) :undo-changes []})) (if (:repaired msg) - (rx/of (ntf/info (tr "workspace.notifications.file-repaired"))) + (rx/of (ntf/show {:content (tr "workspace.notifications.file-repaired") + :type :toast + :level :info + :timeout nil})) (rx/empty)))))) (defn handle-file-deleted diff --git a/frontend/test/frontend_tests/data/workspace_notifications_test.cljs b/frontend/test/frontend_tests/data/workspace_notifications_test.cljs index 95872a0034..aceafe6bed 100644 --- a/frontend/test/frontend_tests/data/workspace_notifications_test.cljs +++ b/frontend/test/frontend_tests/data/workspace_notifications_test.cljs @@ -42,6 +42,8 @@ state (ptk/update show {})] (t/is (= [::dch/commit ::ntf/show] types)) (t/is (= :info (get-in state [:notification :level]))) + (t/is (nil? (get-in state [:notification :timeout])) + "the toast stays until the user closes it") (t/is (= (i18n/tr "workspace.notifications.file-repaired") (get-in state [:notification :content])))))