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): stop clearing frames during navigation to prevent jumping

Louis Beaumont2529367d5116
diff --git a/apps/screenpipe-app-tauri/lib/hooks/use-timeline-store.tsx b/apps/screenpipe-app-tauri/lib/hooks/use-timeline-store.tsx
index 073b85356..15e1a0656 100644
--- a/apps/screenpipe-app-tauri/lib/hooks/use-timeline-store.tsx
+++ b/apps/screenpipe-app-tauri/lib/hooks/use-timeline-store.tsx
@@ -136,15 +136,14 @@ export const useTimelineStore = create<TimelineState>((set, get) => ({
clearTimeout(flushTimer);
flushTimer = null;
}
- // Clear frames and timestamps so cross-day navigation starts fresh.
- // Keeping stale frames from the old day causes the pendingNavigation
- // effect to see mixed-day data and potentially jump to the wrong frame.
- set(() => ({
- frames: [],
- frameTimestamps: new Set<string>(),
+ // DON'T clear frames - keep showing current data while loading new date.
+ // Clearing causes visible "jumping" as frames stream in one-by-one.
+ // The pendingNavigation effect in timeline.tsx filters by target date
+ // when selecting the correct frame after navigation completes.
+ set((state) => ({
sentRequests: new Set<string>(),
isLoading: true,
- loadingProgress: { loaded: 0, isStreaming: false },
+ loadingProgress: { loaded: state.frames.length, isStreaming: false },
error: null,
message: "loading...",
}));