From ec598bd3c169d1581d33e40d17e114e00466e845 Mon Sep 17 00:00:00 2001 From: oxoxDev Date: Fri, 17 Jul 2026 21:17:12 +0530 Subject: [PATCH 1/6] fix(tauri): drop needless returns in macos window command tails (#5018) --- app/src-tauri/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src-tauri/src/lib.rs b/app/src-tauri/src/lib.rs index ee15b7897e..b597458325 100644 --- a/app/src-tauri/src/lib.rs +++ b/app/src-tauri/src/lib.rs @@ -1195,7 +1195,7 @@ fn mascot_window_show(app: AppHandle) -> Result<(), String> { log::info!("[mascot-window] show requested"); #[cfg(target_os = "macos")] { - return mascot_native_window::show(&app); + mascot_native_window::show(&app) } #[cfg(not(target_os = "macos"))] { @@ -1258,11 +1258,11 @@ fn notch_window_show(app: AppHandle) -> Result<(), String> { log::info!("[notch-window] show requested"); #[cfg(target_os = "macos")] { - return dispatch_notch_on_main(app, |app| { + dispatch_notch_on_main(app, |app| { if let Err(e) = notch_window::show(app) { log::warn!("[notch-window] show failed: {e}"); } - }); + }) } #[cfg(not(target_os = "macos"))] { @@ -1277,7 +1277,7 @@ fn notch_window_hide(app: AppHandle) -> Result<(), String> { log::info!("[notch-window] hide requested"); #[cfg(target_os = "macos")] { - return dispatch_notch_on_main(app, |_app| notch_window::hide()); + dispatch_notch_on_main(app, |_app| notch_window::hide()) } #[cfg(not(target_os = "macos"))] { From 783416a0709271f150cd6ab44a608e2b327fa1ee Mon Sep 17 00:00:00 2001 From: oxoxDev Date: Fri, 17 Jul 2026 21:17:12 +0530 Subject: [PATCH 2/6] fix(tauri): drop needless return in macos claude-login launch (#5018) --- app/src-tauri/src/claude_code.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src-tauri/src/claude_code.rs b/app/src-tauri/src/claude_code.rs index c70f960cc0..7ff7a98ed3 100644 --- a/app/src-tauri/src/claude_code.rs +++ b/app/src-tauri/src/claude_code.rs @@ -43,7 +43,7 @@ end tell"#; .args(["-e", script]) .spawn() .map_err(|e| format!("failed to open Terminal.app: {e}"))?; - return Ok("Terminal.app".into()); + Ok("Terminal.app".into()) } #[cfg(target_os = "linux")] From 07038ca5fdbb3c69a59f0af8cf836495930922cc Mon Sep 17 00:00:00 2001 From: oxoxDev Date: Fri, 17 Jul 2026 21:17:12 +0530 Subject: [PATCH 3/6] fix(tauri): drop needless returns in macos notification permission commands (#5018) --- app/src-tauri/src/native_notifications/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src-tauri/src/native_notifications/mod.rs b/app/src-tauri/src/native_notifications/mod.rs index 7fb5281e7d..18e23669a7 100644 --- a/app/src-tauri/src/native_notifications/mod.rs +++ b/app/src-tauri/src/native_notifications/mod.rs @@ -37,7 +37,7 @@ use crate::AppRuntime; pub fn notification_permission_state() -> Result { #[cfg(target_os = "macos")] { - return macos::permission_state(); + macos::permission_state() } #[cfg(not(target_os = "macos"))] { @@ -51,7 +51,7 @@ pub fn notification_permission_state() -> Result { pub fn notification_permission_request() -> Result { #[cfg(target_os = "macos")] { - return macos::request_permission(); + macos::request_permission() } #[cfg(not(target_os = "macos"))] { From aa06e51910af2793fecb826f4ecf502c1cd59f2a Mon Sep 17 00:00:00 2001 From: oxoxDev Date: Fri, 17 Jul 2026 21:17:12 +0530 Subject: [PATCH 4/6] fix(tauri): use slice contains over iter().any() in imessage scanner (#5018) --- app/src-tauri/src/imessage_scanner/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src-tauri/src/imessage_scanner/mod.rs b/app/src-tauri/src/imessage_scanner/mod.rs index 289fd7cac0..e8cefd9929 100644 --- a/app/src-tauri/src/imessage_scanner/mod.rs +++ b/app/src-tauri/src/imessage_scanner/mod.rs @@ -372,7 +372,7 @@ fn extract_text_from_attributed_body(blob: &[u8]) -> Option { .filter_map(|r| String::from_utf8(r).ok()) .filter(|s| { let trimmed = s.trim(); - trimmed.len() >= 2 && !ignored_markers.iter().any(|m| trimmed == *m) + trimmed.len() >= 2 && !ignored_markers.contains(&trimmed) }) .max_by_key(|s| s.len()) .map(|s| s.trim().to_string()) From 100d343dc173cd429e38de446e911fd1c3798498 Mon Sep 17 00:00:00 2001 From: oxoxDev Date: Fri, 17 Jul 2026 21:17:12 +0530 Subject: [PATCH 5/6] fix(tauri): allow dead RAII webview field and drop redundant deref in mascot window (#5018) --- app/src-tauri/src/mascot_native_window.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src-tauri/src/mascot_native_window.rs b/app/src-tauri/src/mascot_native_window.rs index 063361a356..5c27a36ea2 100644 --- a/app/src-tauri/src/mascot_native_window.rs +++ b/app/src-tauri/src/mascot_native_window.rs @@ -52,6 +52,9 @@ const DRAG_POLL_SECONDS: f64 = 0.016; /// dropped webview. struct MascotPanel { panel: Retained, + // RAII keep-alive: never read, but dropping it deallocates the WKWebView and + // blanks the panel. Must outlive the show/hide cycle — do not remove. + #[allow(dead_code)] webview: Retained, drag_timer: Retained, } @@ -389,7 +392,7 @@ unsafe fn build_webview( let _: () = msg_send![&*webview, setAutoresizingMask: 18u64]; // width|height // Make the webview the panel's content view so it fills the frame. - let webview_ref: &objc2::runtime::AnyObject = &*webview; + let webview_ref: &objc2::runtime::AnyObject = &webview; let webview_view: *mut objc2::runtime::AnyObject = webview_ref as *const _ as *mut objc2::runtime::AnyObject; let _: () = msg_send![panel, setContentView: webview_view]; From a35bb78a4047c1f5c29a996957a7e589559d9a1a Mon Sep 17 00:00:00 2001 From: oxoxDev Date: Fri, 17 Jul 2026 21:17:12 +0530 Subject: [PATCH 6/6] fix(tauri): remove unused is_open and drop redundant deref in notch window (#5018) --- app/src-tauri/src/notch_window.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src-tauri/src/notch_window.rs b/app/src-tauri/src/notch_window.rs index 78653688cb..4fc3f7202a 100644 --- a/app/src-tauri/src/notch_window.rs +++ b/app/src-tauri/src/notch_window.rs @@ -61,10 +61,6 @@ thread_local! { static NOTCH: RefCell> = const { RefCell::new(None) }; } -pub(crate) fn is_open() -> bool { - NOTCH.with(|cell| cell.borrow().is_some()) -} - pub(crate) fn hide() { NOTCH.with(|cell| { if let Some(existing) = cell.borrow_mut().take() { @@ -262,7 +258,7 @@ unsafe fn build_webview( // Auto-resize to fill the panel content view. let _: () = msg_send![&*webview, setAutoresizingMask: 18u64]; // width|height - let webview_ref: &objc2::runtime::AnyObject = &*webview; + let webview_ref: &objc2::runtime::AnyObject = &webview; let webview_view = webview_ref as *const _ as *mut objc2::runtime::AnyObject; let _: () = msg_send![panel, setContentView: webview_view];