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 timeline load

Louis Beaumont17186a553532
diff --git a/screenpipe-app-tauri/app/timeline/page.tsx b/screenpipe-app-tauri/app/timeline/page.tsx
index f669d25b5..e89b51081 100644
--- a/screenpipe-app-tauri/app/timeline/page.tsx
+++ b/screenpipe-app-tauri/app/timeline/page.tsx
@@ -202,7 +202,10 @@ export default function Timeline() {
eventSource.onmessage = (event) => {
try {
const data = JSON.parse(event.data);
- if (data === "keep-alive-text") return;
+ if (data === "keep-alive-text") {
+ setIsLoading(false);
+ return;
+ }
if (data.timestamp && data.devices) {
setFrames((prev) => {
@@ -248,8 +251,6 @@ export default function Timeline() {
console.error("eventsource error:", error);
setError("connection lost. retrying...");
-
- eventSource.close();
};
eventSource.onopen = () => {
@@ -269,6 +270,8 @@ export default function Timeline() {
if (retryTimeoutRef.current) {
clearTimeout(retryTimeoutRef.current);
}
+ setIsLoading(false);
+ setError(null);
};
}, []);
@@ -656,6 +659,7 @@ export default function Timeline() {
const handleRefresh = () => {
posthog.capture("timeline_refresh");
+ window.location.reload();
setFrames([]);
setCurrentFrame(null);
setCurrentIndex(0);