YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(tray): remove set_autosave_name - was causing crash at boot
Louis Beaumontf9da3721d8c0
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/tray.rs b/apps/screenpipe-app-tauri/src-tauri/src/tray.rsindex b8dabd4ac..48fcbc2fc 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/tray.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/tray.rs@@ -125,43 +125,10 @@ pub fn recreate_tray(app: &AppHandle) {});}-/// Set autosaveName on the NSStatusItem so macOS remembers the user's-/// preferred position (after they Cmd+drag it). Without this, the tray-/// icon position resets every launch.-#[cfg(target_os = "macos")]fn set_autosave_name() {- use cocoa::base::{id, nil};- use cocoa::foundation::NSString;- use objc::{class, msg_send, sel, sel_impl};-- unsafe {- let status_bar: id = msg_send![class!(NSStatusBar), systemStatusBar];- let items: id = msg_send![status_bar, items];- let count: usize = msg_send![items, count];-- for i in 0..count {- let item: id = msg_send![items, objectAtIndex: i];- // Check if this is our item by looking at the button title or length- let autosave: id = msg_send![item, autosaveName];- let has_autosave = !autosave.is_null() && {- let len: usize = msg_send![autosave, length];- len > 0- };-- if !has_autosave {- // This is likely our newly created item (no autosave yet)- let name = NSString::alloc(nil).init_str("screenpipe_tray");- let _: () = msg_send![item, setAutosaveName: name];- debug!("Set autosaveName on NSStatusItem");- break;- }- }- }+ // no-op: removed due to crash from objc interop}-#[cfg(not(target_os = "macos"))]-fn set_autosave_name() {}-fn create_dynamic_menu(app: &AppHandle,_state: &MenuState,