Skip to content

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

fix(search): ensure panel is key window before focusing search input

Louis Beaumont1f2681e34c8a
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
index dc7056291..b9369ff35 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
@@ -727,6 +727,8 @@ pub fn register_window_shortcuts(app_handle: tauri::AppHandle) -> Result<(), Str
if matches!(event.state, ShortcutState::Pressed) {
if let Err(e) = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
info!("Search shortcut triggered");
+ // Ensure the panel is key window so the search input can receive focus
+ show_main_window(app, false);
let _ = app.emit("open-search", ());
})) {
tracing::error!("panic in search shortcut handler: {:?}", e);