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
debug(windows): add logging to diagnose shortcut opening Settings instead of overlay
Louis Beaumont4d0d8b8ce836
diff --git a/screenpipe-app-tauri/src-tauri/src/commands.rs b/screenpipe-app-tauri/src-tauri/src/commands.rsindex b7335182c..b73ab7fbb 100644--- a/screenpipe-app-tauri/src-tauri/src/commands.rs+++ b/screenpipe-app-tauri/src-tauri/src/commands.rs@@ -27,11 +27,21 @@ pub fn set_tray_health_icon(app_handle: tauri::AppHandle) {#[tauri::command]#[specta::specta]pub fn show_main_window(app_handle: &tauri::AppHandle, _overlay: bool) {- let _window = ShowRewindWindow::Main.show(app_handle).unwrap();- // Don't call set_focus() on macOS as it causes space switching- // The panel's order_front_regardless() already handles visibility- #[cfg(not(target_os = "macos"))]- _window.set_focus().unwrap();+ info!("show_main_window called, attempting to show Main window");+ match ShowRewindWindow::Main.show(app_handle) {+ Ok(window) => {+ info!("ShowRewindWindow::Main.show succeeded, window label: {}", window.label());+ // Don't call set_focus() on macOS as it causes space switching+ // The panel's order_front_regardless() already handles visibility+ #[cfg(not(target_os = "macos"))]+ if let Err(e) = window.set_focus() {+ error!("Failed to set focus on main window: {}", e);+ }+ }+ Err(e) => {+ error!("ShowRewindWindow::Main.show failed: {}", e);+ }+ }}#[tauri::command]diff --git a/screenpipe-app-tauri/src-tauri/src/main.rs b/screenpipe-app-tauri/src-tauri/src/main.rsindex 68600fb8a..c10885a31 100755--- a/screenpipe-app-tauri/src-tauri/src/main.rs+++ b/screenpipe-app-tauri/src-tauri/src/main.rs@@ -174,7 +174,7 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),// Register show shortcutregister_shortcut(app, &config.show, config.is_disabled("show"), |app| {- info!("show shortcut triggered");+ info!("show shortcut triggered - attempting to show/hide main overlay");let _ = app.emit("shortcut-show", ());#[cfg(target_os = "macos")]{@@ -198,21 +198,29 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),}#[cfg(not(target_os = "macos"))]{+ // Debug: list all existing windows+ for (label, _) in app.webview_windows() {+ info!("existing window: {}", label);+ }+if let Some(window) = app.get_webview_window("main") {+ info!("found main window, checking visibility");match window.is_visible() {Ok(true) => {- info!("window is visible, hiding main window");+ info!("main window is visible, hiding it");hide_main_window(app)}- _ => {- info!(- "window is not visible or error checking visibility, showing main window"- );+ Ok(false) => {+ info!("main window exists but not visible, showing it");+ show_main_window(app, false)+ }+ Err(e) => {+ info!("error checking visibility: {}, showing main window anyway", e);show_main_window(app, false)}}} else {- debug!("main window not found, creating it");+ info!("main window not found, creating it");show_main_window(app, false)}}