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
fix: strip backslashes in FTS5 search queries to prevent syntax errors
Louis Beaumontdc374da03997
diff --git a/.github/workflows/release-enterprise-windows.yml b/.github/workflows/release-enterprise-windows.ymlindex a2497e421..550ff2ca3 100644--- a/.github/workflows/release-enterprise-windows.yml+++ b/.github/workflows/release-enterprise-windows.yml@@ -286,3 +286,15 @@ jobs:name: enterprise-windows-x64path: |apps/screenpipe-app-tauri/src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe++ - name: Notify enterprise build subscribers+ shell: bash+ env:+ ENTERPRISE_NOTIFY_SECRET: ${{ secrets.ENTERPRISE_NOTIFY_SECRET }}+ run: |+ VERSION=$(grep '^version = ' apps/screenpipe-app-tauri/src-tauri/Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')+ curl -sf -X POST "https://screenpi.pe/api/enterprise/builds/notify" \+ -H "Authorization: Bearer $ENTERPRISE_NOTIFY_SECRET" \+ -H "Content-Type: application/json" \+ -d "{\"version\": \"$VERSION\"}"+ echo "Notified subscribers for v$VERSION"diff --git a/Cargo.lock b/Cargo.lockindex 9db67b845..c23369697 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -6358,7 +6358,7 @@ dependencies = [[[package]]name = "screenpipe-audio"-version = "0.3.174"+version = "0.3.175"dependencies = ["anyhow","audiopipe",@@ -6415,7 +6415,7 @@ dependencies = [[[package]]name = "screenpipe-core"-version = "0.3.174"+version = "0.3.175"dependencies = ["accessibility","accessibility-sys",@@ -6457,7 +6457,7 @@ dependencies = [[[package]]name = "screenpipe-db"-version = "0.3.174"+version = "0.3.175"dependencies = ["anyhow","chrono",@@ -6482,7 +6482,7 @@ dependencies = [[[package]]name = "screenpipe-events"-version = "0.3.174"+version = "0.3.175"dependencies = ["anyhow","chrono",@@ -6500,7 +6500,7 @@ dependencies = [[[package]]name = "screenpipe-integrations"-version = "0.3.174"+version = "0.3.175"dependencies = ["anyhow","chrono",@@ -6524,7 +6524,7 @@ dependencies = [[[package]]name = "screenpipe-server"-version = "0.3.174"+version = "0.3.175"dependencies = ["anyhow","async-trait",@@ -6588,7 +6588,7 @@ dependencies = [[[package]]name = "screenpipe-vision"-version = "0.3.174"+version = "0.3.175"dependencies = ["accessibility-sys","anyhow",diff --git a/apps/screenpipe-app-tauri/components/rewind/hooks/use-date-navigation.ts b/apps/screenpipe-app-tauri/components/rewind/hooks/use-date-navigation.tsindex 585ee6078..0d5c26726 100644--- a/apps/screenpipe-app-tauri/components/rewind/hooks/use-date-navigation.ts+++ b/apps/screenpipe-app-tauri/components/rewind/hooks/use-date-navigation.ts@@ -182,8 +182,13 @@ export function useDateNavigation(opts: {navigateToSearchResultRef.current = navigateToSearchResult;const handleDateChange = useCallback(async (newDate: Date) => {- // Guard against double-click / re-entry while navigation is in progress- if (isNavigatingRef.current) return;+ // If a previous navigation is stuck (e.g. frames never arrived),+ // force-clear so the user isn't locked out of date picking.+ if (isNavigatingRef.current) {+ console.warn("[handleDateChange] Clearing stale navigation lock");+ isNavigatingRef.current = false;+ pendingNavigationRef.current = null;+ }// Pause playback and reset filters on date changepausePlayback();diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline-controls.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline-controls.tsxindex e6cd53224..b4cdd8060 100644--- a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline-controls.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline-controls.tsx@@ -214,27 +214,21 @@ export function TimelineControls({align="center"sideOffset={8}>- <div- onClick={(e) => e.stopPropagation()}- onMouseDown={(e) => e.stopPropagation()}- onPointerDown={(e) => e.stopPropagation()}- >- <Calendar- mode="single"- selected={currentDate}- onSelect={(date) => {- console.log("[Calendar] onSelect called with:", date?.toISOString(), "currentDate:", currentDate.toISOString());- if (date) {- onDateChange(date);- setCalendarOpen(false);- }- }}- disabled={(date) =>- isAfter(startOfDay(date), startOfDay(new Date())) ||- isAfter(startOfDay(startAndEndDates.start), startOfDay(date))+ <Calendar+ mode="single"+ selected={currentDate}+ onSelect={(date) => {+ console.log("[Calendar] onSelect called with:", date?.toISOString(), "currentDate:", currentDate.toISOString());+ if (date) {+ onDateChange(date);+ setCalendarOpen(false);}- />- </div>+ }}+ disabled={(date) =>+ isAfter(startOfDay(date), startOfDay(new Date())) ||+ isAfter(startOfDay(startAndEndDates.start), startOfDay(date))+ }+ /></PopoverContent></Popover>diff --git a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsxindex d02ee165c..b98bb2755 100644--- a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx@@ -430,6 +430,7 @@ export function PipesSection() {const [showUpgrade, setShowUpgrade] = useState(false);const [promptDrafts, setPromptDrafts] = useState<Record<string, string>>({});const [saveStatus, setSaveStatus] = useState<Record<string, "saving" | "saved" | "error">>({});+ const [saveErrors, setSaveErrors] = useState<Record<string, string>>({});const [refreshing, setRefreshing] = useState(false);const debounceTimers = useRef<Record<string, ReturnType<typeof setTimeout>>>({});const pendingSaves = useRef<Record<string, string>>({});@@ -776,6 +777,7 @@ export function PipesSection() {const savePipeContent = useCallback(async (name: string, content: string) => {setSaveStatus((prev) => ({ ...prev, [name]: "saving" }));+ setSaveErrors((prev) => { const next = { ...prev }; delete next[name]; return next; });try {const res = await fetch(`http://localhost:3030/pipes/${name}/config`, {method: "POST",@@ -788,8 +790,9 @@ export function PipesSection() {setSaveStatus((prev) => ({ ...prev, [name]: "saved" }));// Don't clear draft or refetch — the 10s poll will sync.setTimeout(() => setSaveStatus((prev) => { const next = { ...prev }; delete next[name]; return next; }), 2000);- } catch (e) {+ } catch (e: any) {console.error("pipe save failed:", e);+ setSaveErrors((prev) => ({ ...prev, [name]: e?.message || "unknown error" }));setSaveStatus((prev) => ({ ...prev, [name]: "error" }));}}, []);@@ -1326,7 +1329,9 @@ export function PipesSection() {</span>)}{saveStatus[pipe.config.name] === "error" && (- <span className="text-[11px] text-destructive">save failed</span>+ <span className="text-[11px] text-destructive" title={saveErrors[pipe.config.name]}>+ save failed: {saveErrors[pipe.config.name] || "unknown error"}+ </span>)}{promptDrafts[pipe.config.name] !== undefined && !saveStatus[pipe.config.name] && (<span className="text-[11px] text-muted-foreground">unsaved</span>diff --git a/crates/screenpipe-db/src/text_normalizer.rs b/crates/screenpipe-db/src/text_normalizer.rsindex 25efd3f2e..e3eca4027 100644--- a/crates/screenpipe-db/src/text_normalizer.rs+++ b/crates/screenpipe-db/src/text_normalizer.rs@@ -48,7 +48,7 @@ pub fn sanitize_fts5_query(query: &str) -> String {query.split_whitespace().filter_map(|token| {- let cleaned = token.replace('"', "");+ let cleaned = token.replace('\\', "").replace('"', "");if cleaned.is_empty() {return None;}@@ -90,7 +90,7 @@ pub fn expand_search_query(query: &str) -> String {let expanded_terms: Vec<String> = query.split_whitespace().flat_map(|word| {- let cleaned = word.replace('"', "");+ let cleaned = word.replace('\\', "").replace('"', "");let split = split_compound(&cleaned);let parts: Vec<&str> = split.split_whitespace().collect();@@ -170,6 +170,18 @@ mod tests {);}+ #[test]+ fn test_sanitize_fts5_strips_backslashes() {+ assert_eq!(sanitize_fts5_query(r#"test\query"#), r#""testquery""#);+ assert_eq!(sanitize_fts5_query(r#"path\to\file"#), r#""pathtofile""#);+ assert_eq!(sanitize_fts5_query(r#"\"#), "");+ assert_eq!(sanitize_fts5_query(r#"hello\ world"#), r#""hello" "world""#);+ assert_eq!(+ sanitize_fts5_query(r#"test\"quoted""#),+ r#""testquoted""#+ );+ }+#[test]fn test_sanitize_fts5_empty() {assert_eq!(sanitize_fts5_query(""), "");