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

feat: hot-switch overlay mode without restart, shortcut works in both modes

Louis Beaumont694ce951eedb
diff --git a/apps/screenpipe-app-tauri/components/settings/general-settings.tsx b/apps/screenpipe-app-tauri/components/settings/general-settings.tsx
index f802a521a..a02b302a8 100644
--- a/apps/screenpipe-app-tauri/components/settings/general-settings.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/general-settings.tsx
@@ -214,11 +214,16 @@ export default function GeneralSettings() {
return (
<button
key={option.value}
- onClick={() => {
+ onClick={async () => {
handleSettingsChange({ overlayMode: option.value });
+ // Close existing Main window so it gets recreated with the new mode
+ try {
+ const { commands } = await import("@/lib/utils/tauri");
+ await commands.closeWindow("Main");
+ } catch (_) {}
toast({
title: "overlay mode updated",
- description: `set to ${option.label.toLowerCase()}. reopen timeline to apply.`,
+ description: `press the shortcut to open timeline in ${option.label.toLowerCase()} mode.`,
});
}}
type="button"
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs b/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs
index f935f2b03..a9b3b3135 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs
@@ -312,7 +312,22 @@ impl ShowRewindWindow {
if id.label() == RewindWindowId::Main.label() {
- info!("showing panel");
+ // Check current overlay mode
+ let overlay_mode = SettingsStore::get(app)
+ .unwrap_or_default()
+ .unwrap_or_default()
+ .overlay_mode;
+
+ if overlay_mode == "window" {
+ // Window mode: just show and focus the normal window
+ info!("showing main window (window mode)");
+ window.show().ok();
+ window.set_focus().ok();
+ let _ = app.emit("window-focused", true);
+ return Ok(window);
+ }
+
+ info!("showing panel (overlay mode)");
#[cfg(target_os = "macos")]
{
// NOTE: Accessory mode removed — it hides dock icon and tray on notched MacBooks
@@ -879,6 +894,21 @@ impl ShowRewindWindow {
pub fn close(&self, app: &AppHandle) -> tauri::Result<()> {
let id = self.id();
if id.label() == RewindWindowId::Main.label() {
+ // Check overlay mode to decide close behavior
+ let overlay_mode = SettingsStore::get(app)
+ .unwrap_or_default()
+ .unwrap_or_default()
+ .overlay_mode;
+
+ if overlay_mode == "window" {
+ // Window mode: destroy the window so it gets recreated fresh
+ if let Some(window) = id.get(app) {
+ window.destroy().ok();
+ }
+ return Ok(());
+ }
+
+ // Overlay mode: hide the panel (keep it alive for fast re-show)
#[cfg(target_os = "macos")]
{
let app_clone = app.clone();