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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
Push all local changes from parallel agents
Louis Beaumont71af4338ab55
diff --git a/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsxindex d5ce56564..34750e3ae 100644--- a/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx@@ -39,6 +39,10 @@ interface CurrentFrameTimelineProps {searchNavFrame?: boolean;/** Called after the search nav frame has loaded, so subsequent scrolling uses video mode */onSearchNavComplete?: () => void;+ /** When true, skip debounce for instant arrow-key navigation */+ isArrowNav?: boolean;+ /** Adjacent frames for preloading (±PRELOAD_ADJACENT around current) */+ adjacentFrames?: StreamTimeSeriesResponse[];}@@ -102,6 +106,8 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({allDeviceIds,searchNavFrame,onSearchNavComplete,+ isArrowNav,+ adjacentFrames,}) => {const { isMac } = usePlatform();const { settings } = useSettings();@@ -167,7 +173,7 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({const [snapshotAssetUrl, setSnapshotAssetUrl] = useState<string | null>(null);const [snapshotFailed, setSnapshotFailed] = useState(false);- // Debounce frame changes+ // Debounce frame changes — skip debounce for arrow key navigationuseEffect(() => {if (debounceTimerRef.current) clearTimeout(debounceTimerRef.current);if (!frameId || !filePath) {@@ -175,13 +181,14 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({return;}setIsLoading(true);+ const delay = isArrowNav ? FRAME_LOAD_DEBOUNCE_ARROW_MS : FRAME_LOAD_DEBOUNCE_MS;debounceTimerRef.current = setTimeout(() => {setDebouncedFrame({ filePath, offsetIndex, fps: fpsFromServer, frameId });- }, FRAME_LOAD_DEBOUNCE_MS);+ }, delay);return () => {if (debounceTimerRef.current) clearTimeout(debounceTimerRef.current);};- }, [frameId, filePath, offsetIndex, fpsFromServer]);+ }, [frameId, filePath, offsetIndex, fpsFromServer, isArrowNav]);// Clear text selection when frame changes (avoid stale selection from previous frame)useEffect(() => {@@ -701,6 +708,32 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({}}, [debouncedFrame?.filePath, isSnapshotFrame]);+ // Preload adjacent video chunks so crossing chunk boundaries feels instant+ useEffect(() => {+ if (!adjacentFrames?.length) return;+ const seen = new Set<string>();+ if (debouncedFrame?.filePath) seen.add(debouncedFrame.filePath);+ for (const frame of adjacentFrames) {+ const path = frame?.devices?.[0]?.metadata?.file_path;+ if (!path || seen.has(path)) continue;+ const lower = path.toLowerCase();+ if (lower.endsWith('.jpg') || lower.endsWith('.jpeg') || lower.endsWith('.png')) continue;+ seen.add(path);+ // Preload video chunk: create a hidden video element to trigger browser cache+ getVideoUrl(path).then((url) => {+ if (!url) return;+ const v = document.createElement("video");+ v.preload = "auto";+ v.muted = true;+ v.src = url;+ // Load just enough for metadata + first frame, then discard+ v.addEventListener("loadeddata", () => { v.src = ""; }, { once: true });+ v.addEventListener("error", () => { v.src = ""; }, { once: true });+ v.load();+ });+ }+ }, [adjacentFrames, debouncedFrame?.filePath, getVideoUrl]);+if (!frameId) {return (<div className="absolute inset-0 overflow-hidden bg-background">@@ -863,18 +896,22 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({</div>)}- {/* Video element — always visible, no canvas back buffer needed */}+ {/* Video element — crossfades in when frame is ready */}<videoref={videoRef}mutedplaysInlinepreload="auto"className="absolute inset-0 w-full h-full object-contain"- style={{ zIndex: 1 }}+ style={{+ zIndex: 1,+ opacity: !isLoading && useVideoMode && !isSnapshotFrame && !searchNavFrame ? 1 : 0,+ transition: `opacity ${CROSSFADE_MS}ms ease-out`,+ }}onError={() => {const err = videoRef.current?.error;console.warn("Video error:", err?.code, err?.message);-+if (debouncedFrame?.filePath) {markChunkFailed(debouncedFrame.filePath);}@@ -883,25 +920,33 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({}}/>- {/* Snapshot frame: direct local file via asset protocol — no HTTP/DB needed */}+ {/* Snapshot frame: direct local file via asset protocol — crossfades in */}{snapshotAssetUrl && isSnapshotFrame && !snapshotFailed && (// eslint-disable-next-line @next/next/no-img-element<imgsrc={snapshotAssetUrl}className="absolute inset-0 w-full h-full object-contain"- style={{ zIndex: 2 }}+ style={{+ zIndex: 2,+ opacity: !isLoading ? 1 : 0,+ transition: `opacity ${CROSSFADE_MS}ms ease-out`,+ }}alt="Current frame"draggable={false}/>)}- {/* Fallback mode: preloaded <img> via HTTP server (also used for search nav) */}+ {/* Fallback mode: preloaded <img> via HTTP server — crossfades in */}{displayedFallbackUrl && (!useVideoMode || searchNavFrame) && !(snapshotAssetUrl && isSnapshotFrame && !snapshotFailed) && (// eslint-disable-next-line @next/next/no-img-element<imgsrc={displayedFallbackUrl}className="absolute inset-0 w-full h-full object-contain"- style={{ zIndex: 2 }}+ style={{+ zIndex: 2,+ opacity: !isLoading ? 1 : 0,+ transition: `opacity ${CROSSFADE_MS}ms ease-out`,+ }}alt="Current frame"draggable={false}/>diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline.tsxindex c751763c6..2d45dfdea 100644--- a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx@@ -165,6 +165,10 @@ export default function Timeline({ embedded = false }: { embedded?: boolean }) {// for the first frame after a cross-date search navigation (avoids ~5s video load)const [searchNavFrame, setSearchNavFrame] = useState(false);+ // Arrow key navigation flag — disables debounce for instant frame stepping+ const [isArrowNav, setIsArrowNav] = useState(false);+ const arrowNavTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);+const dismissSearchHighlight = useSearchHighlight((s) => s.dismiss);const hasSearchHighlight = useSearchHighlight((s) => s.highlightTerms.length > 0 && !s.dismissed);@@ -926,6 +930,12 @@ export default function Timeline({ embedded = false }: { embedded?: boolean }) {}const isAlt = e.altKey;++ // Signal arrow nav to skip debounce+ setIsArrowNav(true);+ if (arrowNavTimerRef.current) clearTimeout(arrowNavTimerRef.current);+ arrowNavTimerRef.current = setTimeout(() => setIsArrowNav(false), 300);+if (e.key === "ArrowLeft") {e.preventDefault();pausePlayback();@@ -1519,6 +1529,8 @@ export default function Timeline({ embedded = false }: { embedded?: boolean }) {allDeviceIds={allDeviceIds}searchNavFrame={searchNavFrame}onSearchNavComplete={() => setSearchNavFrame(false)}+ isArrowNav={isArrowNav}+ adjacentFrames={frames.slice(Math.max(0, currentIndex - 3), currentIndex + 4).filter(Boolean)}onNavigate={(direction) => {// newer = lower index (-1), older = higher index (+1)const newIndex = direction === "next"diff --git a/apps/screenpipe-app-tauri/components/settings/ai-presets.tsx b/apps/screenpipe-app-tauri/components/settings/ai-presets.tsxindex 620bb1918..34bd5fc2c 100644--- a/apps/screenpipe-app-tauri/components/settings/ai-presets.tsx+++ b/apps/screenpipe-app-tauri/components/settings/ai-presets.tsx@@ -1142,8 +1142,7 @@ export const AIPresets = () => {</div></div>- <div className="flex justify-between items-center pt-2 border-t border-border">- <div className="flex gap-2">+ <div className="flex flex-wrap gap-1 items-center pt-2 border-t border-border"><Buttonvariant="ghost"size="sm"@@ -1156,7 +1155,7 @@ export const AIPresets = () => {>Duplicate</Button>-+<Buttonvariant="ghost"size="sm"@@ -1169,7 +1168,6 @@ export const AIPresets = () => {>{isDefault ? "Current default" : "Set as default"}</Button>- </div><Buttonvariant="ghost"@@ -1179,7 +1177,7 @@ export const AIPresets = () => {setPresetToDelete(preset.id);}}disabled={isLoading || isDefault}- className="text-xs text-destructive hover:text-destructive"+ className="text-xs text-destructive hover:text-destructive ml-auto"><Trash2 className="w-3 h-3 mr-1" />Remove