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
Bump app to v2.2.38 — fix transcribing caption on old silent chunks
Louis Beaumont54a550f4efef
diff --git a/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-filters.ts b/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-filters.tsindex df0b0a15a..6cf6edf07 100644--- a/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-filters.ts+++ b/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-filters.ts@@ -20,7 +20,6 @@ export function useTimelineFilters(opts: {const [selectedDomain, setSelectedDomain] = useState<string>("all");const [selectedSpeaker, setSelectedSpeaker] = useState<string>("all");const [selectedTag, setSelectedTag] = useState<string>("all");- const [selectedMachineId, setSelectedMachineId] = useState<string>("all");const resetFilters = useCallback(() => {setSelectedDeviceId("all");@@ -28,7 +27,6 @@ export function useTimelineFilters(opts: {setSelectedDomain("all");setSelectedSpeaker("all");setSelectedTag("all");- setSelectedMachineId("all");}, []);// Track filter state in refs so event listeners can read fresh values@@ -48,27 +46,6 @@ export function useTimelineFilters(opts: {return [...ids].sort();}, [frames]);- // collect unique machine ids across all frames (for machine filter)- // Local frames (machine_id absent) are represented as "__local__"- const LOCAL_MACHINE = "__local__";- const allMachineIds = useMemo(() => {- const ids = new Set<string>();- let hasLocal = false;- for (const frame of frames) {- for (const d of frame.devices) {- if (d.machine_id) {- ids.add(d.machine_id);- } else {- hasLocal = true;- }- }- }- const sorted = [...ids].sort();- // Put local machine first so it's the most prominent dot- if (hasLocal) sorted.unshift(LOCAL_MACHINE);- return sorted;- }, [frames]);-// Navigation helpers for monitor filter — skip non-matching framesconst frameMatchesDevice = useCallback((frame: StreamTimeSeriesResponse) => {if (selectedDeviceId === "all" || allDeviceIds.length <= 1) return true;@@ -83,8 +60,7 @@ export function useTimelineFilters(opts: {const filterDomain = selectedDomain !== "all";const filterSpeaker = selectedSpeaker !== "all";const filterTag = selectedTag !== "all";- const filterMachine = selectedMachineId !== "all" && allMachineIds.length > 1;- if (!filterDevice && !filterApp && !filterDomain && !filterSpeaker && !filterTag && !filterMachine) return null;+ if (!filterDevice && !filterApp && !filterDomain && !filterSpeaker && !filterTag) return null;const indices: number[] = [];for (let i = 0; i < frames.length; i++) {const f = frames[i];@@ -100,15 +76,12 @@ export function useTimelineFilters(opts: {const frameTags = frameId ? (tags[frameId] || []) : [];return frameTags.includes(selectedTag);})();- const matchesMachine = !filterMachine || f.devices.some((d) =>- selectedMachineId === LOCAL_MACHINE ? !d.machine_id : d.machine_id === selectedMachineId- );- if (matchesDevice && matchesApp && matchesDomain && matchesSpeaker && matchesTag && matchesMachine) {+ if (matchesDevice && matchesApp && matchesDomain && matchesSpeaker && matchesTag) {indices.push(i);}}return indices.length > 0 ? indices : null;- }, [frames, selectedDeviceId, allDeviceIds.length, selectedAppName, selectedDomain, selectedSpeaker, selectedTag, tags, selectedMachineId, allMachineIds.length]);+ }, [frames, selectedDeviceId, allDeviceIds.length, selectedAppName, selectedDomain, selectedSpeaker, selectedTag, tags]);// Find next frame index matching active filters in a given directionconst findNextDevice = useCallback((fromIndex: number, dir: 1 | -1): number => {@@ -232,15 +205,6 @@ export function useTimelineFilters(opts: {if (snapped !== currentIndex) { setCurrentIndex(snapped); setCurrentFrame(frames[snapped]); }}, [currentIndex, frames, snapToMatch, setCurrentFrame]);- const handleMachineChange = useCallback((machineId: string) => {- setSelectedMachineId(machineId);- if (machineId === "all") return;- const snapped = snapToMatch(currentIndex, (f) =>- f.devices.some((d) => machineId === LOCAL_MACHINE ? !d.machine_id : d.machine_id === machineId)- );- if (snapped !== currentIndex) { setCurrentIndex(snapped); setCurrentFrame(frames[snapped]); }- }, [currentIndex, frames, snapToMatch, setCurrentFrame]);-const handleTagChange = useCallback((tag: string) => {setSelectedTag(tag);if (tag === "all") return;@@ -258,18 +222,15 @@ export function useTimelineFilters(opts: {selectedDomain,selectedSpeaker,selectedTag,- selectedMachineId,matchingIndices,resetFilters,allDeviceIds,- allMachineIds,frameMatchesDevice,handleDeviceChange,handleAppChange,handleDomainChange,handleSpeakerChange,handleTagChange,- handleMachineChange,findNextDevice,selectedDeviceIdRef,selectedAppNameRef,diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline.tsxindex f70ecb96c..665bf8f06 100644--- a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx@@ -189,9 +189,6 @@ export default function Timeline({ embedded = false }: { embedded?: boolean }) {handleDomainChange,handleSpeakerChange,handleTagChange,- selectedMachineId,- allMachineIds,- handleMachineChange,findNextDevice,selectedDeviceIdRef,selectedAppNameRef,@@ -1259,9 +1256,6 @@ export default function Timeline({ embedded = false }: { embedded?: boolean }) {onSpeakerChange={handleSpeakerChange}selectedTag={selectedTag}onTagChange={handleTagChange}- selectedMachineId={selectedMachineId}- allMachineIds={allMachineIds}- onMachineChange={handleMachineChange}/>) : (<div className="bg-card/80 backdrop-blur-sm p-4 border-t border-border">diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsxindex e4f82e42f..2984761b7 100644--- a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx@@ -6,7 +6,7 @@ import { useTimelineSelection } from "@/lib/hooks/use-timeline-selection";import { getStore, type ChatConversation } from "@/lib/hooks/use-settings";import { isAfter, subDays, format } from "date-fns";import { motion } from "framer-motion";-import { ZoomIn, ZoomOut, Mic, Monitor, AppWindow, Globe, Hash, Laptop } from "lucide-react";+import { ZoomIn, ZoomOut, Mic, Monitor, AppWindow, Globe, Hash } from "lucide-react";import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";import { createPortal } from "react-dom";import posthog from "posthog-js";@@ -132,9 +132,6 @@ interface TimelineSliderProps {onSpeakerChange?: (speaker: string) => void;selectedTag?: string; // "all" or a tag nameonTagChange?: (tag: string) => void;- selectedMachineId?: string; // "all" or a specific machine_id- allMachineIds?: string[]; // All unique machine IDs for machine filter- onMachineChange?: (machineId: string) => void;}interface AppGroup {@@ -285,9 +282,6 @@ export const TimelineSlider = ({onSpeakerChange,selectedTag = "all",onTagChange,- selectedMachineId = "all",- allMachineIds = [],- onMachineChange,}: TimelineSliderProps) => {const containerRef = useRef<HTMLDivElement>(null);const observerTargetRef = useRef<HTMLDivElement>(null);@@ -1098,57 +1092,6 @@ export const TimelineSlider = ({</div></div>)}- {/* Machine row */}- {allMachineIds.length > 1 && onMachineChange && (- <div- className="flex items-center gap-0 group/filter"- onMouseEnter={() => setExpandedFilterSection("machine")}- >- <button- className={cn(- "p-1.5 rounded-l-md transition-colors shrink-0",- "bg-background/80 backdrop-blur-sm border border-border border-r-0",- expandedFilterSection === "machine" && "bg-foreground/10",- selectedMachineId !== "all" && "ring-1 ring-primary/50",- )}- title="Machines"- >- <Laptop className="w-3.5 h-3.5 text-foreground/70" />- </button>- <div- className={cn(- "flex items-center gap-1.5 overflow-hidden transition-all duration-200 ease-out",- "bg-background/80 backdrop-blur-sm border border-border border-l-0 rounded-r-md",- expandedFilterSection === "machine" ? "max-w-[300px] px-2 py-1.5 opacity-100" : "max-w-0 px-0 py-1.5 opacity-0 border-transparent",- )}- >- {allMachineIds.map((id) => {- const label = id === "__local__" ? "This Mac" : id.slice(0, 8) + "…";- return (- <button- key={id}- onClick={() => onMachineChange(selectedMachineId === id ? "all" : id)}- className="rounded-full transition-all duration-200 hover:scale-125 shrink-0"- style={{- width: selectedMachineId === id ? 8 : 6,- height: selectedMachineId === id ? 8 : 6,- backgroundColor: selectedMachineId === id- ? appNameToColor(id)- : selectedMachineId === "all"- ? appNameToColor(id, 0.6)- : "hsl(var(--foreground) / 0.15)",- }}- onMouseEnter={(e) => {- const rect = e.currentTarget.getBoundingClientRect();- setHoveredFilterDot({ name: label, x: rect.right + 8, y: rect.top + rect.height / 2 });- }}- onMouseLeave={() => setHoveredFilterDot(null)}- />- );- })}- </div>- </div>- )}{/* Tag row */}{viewportTags.length > 0 && onTagChange && (<div@@ -1426,10 +1369,7 @@ export const TimelineSlider = ({const frameIdForTag = frame.devices?.[0]?.frame_id || '';const frameTagsForFilter = frameIdForTag ? (tags[frameIdForTag] || []) : [];const matchesTag = selectedTag === "all" || frameTagsForFilter.includes(selectedTag);- const matchesMachine = selectedMachineId === "all" || frame.devices.some((d) =>- selectedMachineId === "__local__" ? !d.machine_id : d.machine_id === selectedMachineId- );- const matchesFilter = matchesDevice && matchesApp && matchesDomain && matchesSpeaker && matchesTag && matchesMachine;+ const matchesFilter = matchesDevice && matchesApp && matchesDomain && matchesSpeaker && matchesTag;// Show time marker on first frame of each hourconst showTimeMarker = timeMarkers.some(diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.tomlindex bf65a3cfb..a1345c31a 100644--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "screenpipe-app"-version = "2.2.37"+version = "2.2.38"description = "24/7 memory for your desktop. 100% local."authors = ["you"]license = ""diff --git a/crates/screenpipe-db/src/db.rs b/crates/screenpipe-db/src/db.rsindex c22b35ed4..bb7f17048 100644--- a/crates/screenpipe-db/src/db.rs+++ b/crates/screenpipe-db/src/db.rs@@ -3180,6 +3180,7 @@ impl DatabaseManager {FROM frames fLEFT JOIN video_chunks vc ON f.video_chunk_id = vc.idWHERE f.timestamp >= ?1 AND f.timestamp <= ?2+ AND COALESCE(vc.file_path, f.snapshot_path, '') NOT LIKE 'cloud://%'ORDER BY f.timestamp DESC, f.offset_index DESCLIMIT 10000"#;