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(dock+tray): stop using Accessory activation policy entirely
Louis Beaumont58c1f242cee6
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rsindex 28581a78f..c0c7c88a9 100755--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs@@ -1394,36 +1394,8 @@ async fn main() {#[cfg(target_os = "macos")]crate::window_api::reset_to_regular_and_refresh_tray(&app_handle);- // Watchdog: periodically ensure dock/tray are visible when no overlay is shown.- // Protects against getting stuck in Accessory mode (hides dock+tray) due to- // panels not properly firing focus-lost events, crashes, etc.- #[cfg(target_os = "macos")]- {- let app_handle_watchdog = app_handle.clone();- tauri::async_runtime::spawn(async move {- use tauri_nspanel::ManagerExt;- let mut interval = tokio::time::interval(tokio::time::Duration::from_secs(5));- loop {- interval.tick().await;- // Check if any panel/overlay is currently visible- let main_visible = app_handle_watchdog- .get_webview_panel("main")- .map(|p| p.is_visible())- .unwrap_or(false);- let chat_visible = app_handle_watchdog- .get_webview_panel("chat")- .map(|p| p.is_visible())- .unwrap_or(false);-- if !main_visible && !chat_visible {- // No panels visible — ensure we're in Regular mode- // (This is a no-op if already Regular)- let _ = app_handle_watchdog- .set_activation_policy(tauri::ActivationPolicy::Regular);- }- }- });- }+ // NOTE: Accessory mode watchdog removed — we no longer toggle activation policy+ // The app stays in Regular mode permanently so dock+tray are always visible.// Initialize global shortcutslet app_handle_clone = app_handle.clone();diff --git a/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs b/apps/screenpipe-app-tauri/src-tauri/src/window_api.rsindex 998453625..129066c2f 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs@@ -54,10 +54,7 @@ pub async fn show_specific_window(}tokio::time::sleep(tokio::time::Duration::from_millis(100)).await;}- #[cfg(target_os = "macos")]- let _ = state- .app_handle- .set_activation_policy(tauri::ActivationPolicy::Accessory);+ // NOTE: Accessory mode removed — it hides dock icon and tray on notched MacBookslet url = format!("http://localhost:{}{}", payload.port, payload.path);let mut builder = tauri::WebviewWindowBuilder::new(&state.app_handle,@@ -318,9 +315,8 @@ impl ShowRewindWindow {info!("showing panel");#[cfg(target_os = "macos")]{- // CRITICAL: Set Accessory activation policy BEFORE showing the panel- // This is required for the panel to appear above fullscreen apps on macOS- let _ = app.set_activation_policy(tauri::ActivationPolicy::Accessory);+ // NOTE: Accessory mode removed — it hides dock icon and tray on notched MacBooks+ // NSPanel should work over fullscreen without itlet app_clone = app.clone();app.run_on_main_thread(move || {@@ -427,7 +423,7 @@ impl ShowRewindWindow {if id.label() == RewindWindowId::Chat.label() {#[cfg(target_os = "macos")]{- let _ = app.set_activation_policy(tauri::ActivationPolicy::Accessory);+ // NOTE: Accessory mode removed — it hides dock icon and tray on notched MacBookslet app_clone = app.clone();app.run_on_main_thread(move || {@@ -476,9 +472,7 @@ impl ShowRewindWindow {// macOS uses fullscreen transparent panel overlay#[cfg(target_os = "macos")]let window = {- // CRITICAL: Set Accessory activation policy BEFORE creating the panel- // This is required for the panel to appear above fullscreen apps on macOS- let _ = app.set_activation_policy(tauri::ActivationPolicy::Accessory);+ // NOTE: Accessory mode removed — it hides dock icon and tray on notched MacBooks// Use cursor position to find the correct monitor (not primary)let (monitor, position) = {@@ -742,8 +736,7 @@ impl ShowRewindWindow {// macOS: use NSPanel for fullscreen support#[cfg(target_os = "macos")]let window = {- // Set Accessory policy so panel can appear above fullscreen apps- let _ = app.set_activation_policy(tauri::ActivationPolicy::Accessory);+ // NOTE: Accessory mode removed — it hides dock icon and tray on notched MacBookslet builder = self.window_builder(app, "/chat").inner_size(500.0, 650.0)