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

hide owned browser on sidebar unmount (#3816)

Harsh Kumar390d60853ddc
diff --git a/apps/screenpipe-app-tauri/components/browser-sidebar.tsx b/apps/screenpipe-app-tauri/components/browser-sidebar.tsx
index 593287f15..df028baef 100644
--- a/apps/screenpipe-app-tauri/components/browser-sidebar.tsx
+++ b/apps/screenpipe-app-tauri/components/browser-sidebar.tsx
@@ -256,6 +256,14 @@ export function BrowserSidebar({ conversationId }: BrowserSidebarProps) {
};
}, []);
+ useEffect(() => {
+ return () => {
+ // Route changes like /home -> /settings unmount the React owner, but the
+ // native child webview can remain visible unless we hide it explicitly.
+ commands.ownedBrowserHide().catch(() => {});
+ };
+ }, []);
+
// ---------------------------------------------------------------------------
// Viewport resize tracking — drives both the JS clamp and re-pushing bounds
// ---------------------------------------------------------------------------