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: Windows shortcuts (Alt+S/Alt+K) now open overlay instead of home window
Louis Beaumont49ba13607609
diff --git a/apps/screenpipe-app-tauri/app/home/page.tsx b/apps/screenpipe-app-tauri/app/home/page.tsxindex 9380d4f3f..1729b4e8b 100644--- a/apps/screenpipe-app-tauri/app/home/page.tsx+++ b/apps/screenpipe-app-tauri/app/home/page.tsx@@ -295,31 +295,6 @@ function SettingsPageContent() {};}, [setActiveSection]);- // On Windows the show/search shortcuts open this Home window.- // Ensure we switch to the timeline tab so the overlay is visible.- useEffect(() => {- const unlistenShow = listen("shortcut-show", () => {- if (activeSection !== "timeline") {- setActiveSection("timeline");- }- });- const unlistenSearch = listen("open-search", () => {- if (activeSection !== "timeline") {- // Switch to timeline first, then re-emit after the Timeline- // component has mounted so its listener can open the search modal.- setActiveSection("timeline");- setTimeout(() => {- window.dispatchEvent(new CustomEvent("open-search-delayed"));- }, 300);- }- // If already on timeline, the Timeline's own tauri listener handles it.- });- return () => {- unlistenShow.then((fn) => fn());- unlistenSearch.then((fn) => fn());- };- }, [activeSection, setActiveSection]);-const isFullHeight = activeSection === "home" || activeSection === "timeline";return (diff --git a/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-keyboard.ts b/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-keyboard.tsindex 108e9b303..c55bfaf6c 100644--- a/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-keyboard.ts+++ b/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-keyboard.ts@@ -295,15 +295,4 @@ export function useTimelineKeyboard(opts: {};}, [showSearchModal]);- // Listen for delayed open-search from Home page tab switch (Windows)- useEffect(() => {- const handler = () => {- if (!showSearchModal) {- setShowSearchModal(true);- resetFilters();- }- };- window.addEventListener("open-search-delayed", handler);- return () => window.removeEventListener("open-search-delayed", handler);- }, [showSearchModal]);}diff --git a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs b/apps/screenpipe-app-tauri/src-tauri/src/commands.rsindex 1111ffe86..2ef3233e8 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs@@ -80,14 +80,7 @@ pub fn set_tray_health_icon(app_handle: tauri::AppHandle) {#[specta::specta]pub fn show_main_window(app_handle: &tauri::AppHandle, _overlay: bool) {info!("show_main_window called");- // macOS: show the overlay panel (NSPanel) on top of fullscreen apps- // Windows: show the settings/home window (embedded timeline, normal window)- #[cfg(target_os = "macos")]let window_to_show = ShowRewindWindow::Main;- #[cfg(not(target_os = "macos"))]- let window_to_show = ShowRewindWindow::Home {- page: Some("timeline".to_string()),- };match window_to_show.show(app_handle) {Ok(window) => {@@ -126,10 +119,7 @@ pub fn hide_main_window(app_handle: &tauri::AppHandle) {// handler in window_api.rs. Do NOT also unregister them here — doing// so races with the focus handler and causes duplicate unregister calls.- #[cfg(target_os = "macos")]let window_to_close = ShowRewindWindow::Main;- #[cfg(not(target_os = "macos"))]- let window_to_close = ShowRewindWindow::Home { page: None };if let Err(e) = window_to_close.close(app_handle) {error!("failed to close window: {}", e);diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rsindex 8771c4cf5..ea89ac62e 100755--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs@@ -407,7 +407,6 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),let app = &app_for_closure;info!("show shortcut triggered - attempting to show/hide main overlay");let _ = app.emit("shortcut-show", ());- #[cfg(target_os = "macos")]{use crate::store::SettingsStore;use crate::window_api::main_label_for_mode;@@ -419,53 +418,22 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),let label = main_label_for_mode(&mode);if let Some(window) = app.get_webview_window(label) {- match window.is_visible() {- Ok(true) => {- info!("window is visible, hiding main window");- hide_main_window(app)- }- _ => {- info!("window is not visible, showing main window");- show_main_window(app, false)- }- }- } else {- info!("main window not found for mode '{}', creating it", mode);- show_main_window(app, false)- }- }- #[cfg(not(target_os = "macos"))]- {- // Windows uses the Home window (embedded timeline) as main UI.- // Check "home" label directly instead of overlay labels.- let label = "home";-- if let Some(window) = app.get_webview_window(label) {- info!("found {} window, checking visibility", label);// On Windows, close() minimizes the window, but is_visible()// still returns true for minimized windows. Check is_minimized()// to correctly detect "hidden" state.let is_minimized = window.is_minimized().unwrap_or(false);match window.is_visible() {Ok(true) if !is_minimized => {- info!("{} window is visible (not minimized), hiding it", label);+ info!("window '{}' is visible (not minimized), hiding it", label);hide_main_window(app)}- Ok(true) if is_minimized => {- info!("{} window is minimized, restoring it", label);- show_main_window(app, false)- }- Ok(false) => {- info!("{} window exists but not visible, showing it", label);- show_main_window(app, false)- }_ => {- info!("showing main window");+ info!("window '{}' not visible or minimized, showing it", label);show_main_window(app, false)}}} else {- info!("{} window not found, creating it", label);+ info!("main window not found for mode '{}', creating it", mode);show_main_window(app, false)}}@@ -574,7 +542,6 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),info!("search shortcut triggered");let mut needed_show = false;// Always show the overlay, then emit search event to focus the search input- #[cfg(target_os = "macos")]{use crate::store::SettingsStore;use crate::window_api::main_label_for_mode;@@ -584,21 +551,6 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),.overlay_mode;let label = main_label_for_mode(&mode);if let Some(window) = app.get_webview_window(label) {- if !window.is_visible().unwrap_or(false) {- show_main_window(app, false);- needed_show = true;- }- } else {- show_main_window(app, false);- needed_show = true;- }- }- #[cfg(not(target_os = "macos"))]- {- // Windows uses "home" window (embedded timeline)- let label = "home";- if let Some(window) = app.get_webview_window(label) {- // On Windows, minimized windows still report is_visible()=truelet needs_show = !window.is_visible().unwrap_or(false)|| window.is_minimized().unwrap_or(false);if needs_show {