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: stop cursor-left-screen spam on Windows (closeWindow called once, not every 500ms)

Louis Beaumont6fbba10bda9f
diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
index 91aae9705..8014f8592 100644
--- a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
@@ -195,8 +195,9 @@ export default function Timeline() {
};
// Check cursor position periodically
+ let alreadyHidden = false;
checkInterval = setInterval(async () => {
- if (!initialScreenBounds) return;
+ if (!initialScreenBounds || alreadyHidden) return;
try {
const cursor = await cursorPosition();
@@ -208,6 +209,7 @@ export default function Timeline() {
if (isOutside) {
console.log("Cursor left screen, hiding timeline");
+ alreadyHidden = true;
commands.closeWindow("Main");
}
} catch (e) {