From 4548845fbf21e49bd0893c9c4136bc0ea1a5658b Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Sun, 1 Feb 2026 04:35:59 -0600 Subject: [PATCH] fix(notification): fail silently when notification system unavailable Systems without a notification daemon (e.g., minimal Linux setups) would crash when the app tried to show notifications. Now we log a warning and continue instead of propagating the error. Fixes #32 --- src-tauri/src/commands/notification.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src-tauri/src/commands/notification.rs b/src-tauri/src/commands/notification.rs index 82f5d15ad..1326024ea 100644 --- a/src-tauri/src/commands/notification.rs +++ b/src-tauri/src/commands/notification.rs @@ -158,9 +158,11 @@ pub fn show_track_notification( } } - notification - .show() - .map_err(|e| format!("Failed to show notification: {}", e))?; + // Show notification, but don't fail if notification system is unavailable + // This handles systems without a notification daemon (issue #32) + if let Err(e) = notification.show() { + log::warn!("Could not show notification (notification system may be unavailable): {}", e); + } Ok(()) } @@ -180,9 +182,11 @@ pub fn show_notification( notification.body(&body_text); } - notification - .show() - .map_err(|e| format!("Failed to show notification: {}", e))?; + // Show notification, but don't fail if notification system is unavailable + // This handles systems without a notification daemon (issue #32) + if let Err(e) = notification.show() { + log::warn!("Could not show notification (notification system may be unavailable): {}", e); + } Ok(()) }