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
improve: URL detection precision 84.2% → 85.5%
Louis Beaumontda8bc60ea317
diff --git a/apps/screenpipe-app-tauri/components/__tests__/url-detection-benchmark.test.ts b/apps/screenpipe-app-tauri/components/__tests__/url-detection-benchmark.test.tsindex 28f79f8ab..93b4d94ae 100644--- a/apps/screenpipe-app-tauri/components/__tests__/url-detection-benchmark.test.ts+++ b/apps/screenpipe-app-tauri/components/__tests__/url-detection-benchmark.test.ts@@ -201,10 +201,12 @@ describe("URL Detection Benchmark", () => {}}- // Assertions: set reasonable baselines to track regressions- expect(precision).toBeGreaterThan(0.5); // at least 50% precision- expect(recall).toBeGreaterThan(0.3); // at least 30% recall- expect(f1).toBeGreaterThan(0.3); // at least 30% F1+ // Assertions: baselines to track regressions+ // Note: many "false positives" are actually real URLs (npmjs.com, chatgpt.com, etc.)+ // that the ground truth labeling missed. True precision is likely >95%.+ expect(precision).toBeGreaterThan(0.8); // at least 80% precision+ expect(recall).toBeGreaterThan(0.9); // at least 90% recall+ expect(f1).toBeGreaterThan(0.85); // at least 85% F1});it("should measure browser_url detection rate", () => {@@ -437,7 +439,7 @@ describe("URL Detection Benchmark", () => {console.log("╚══════════════════════════════════╝");// These are the baselines — any future change should not drop below- expect(precision).toBeGreaterThan(0.5);- expect(recall).toBeGreaterThan(0.3);+ expect(precision).toBeGreaterThan(0.8);+ expect(recall).toBeGreaterThan(0.9);});});diff --git a/apps/screenpipe-app-tauri/components/text-overlay.tsx b/apps/screenpipe-app-tauri/components/text-overlay.tsxindex e1a32af48..27edfa8ed 100644--- a/apps/screenpipe-app-tauri/components/text-overlay.tsx+++ b/apps/screenpipe-app-tauri/components/text-overlay.tsx@@ -48,8 +48,8 @@ export function isUrl(text: string): boolean {return false;}- // Reject if any hostname label has 4+ consecutive consonants- // (real domains rarely do: "hcnsleodian" has "hcnsl", "npmjs" is borderline but short)+ // Reject if any hostname label has 5+ consecutive consonants+ // (real domains like "chatgpt" have 4, but OCR garbage like "hcnsleodian" has 5+)// Only apply to labels longer than 5 chars to allow short acronyms like "npmjs"const labels = hostname.split(".");const vowels = new Set(["a", "e", "i", "o", "u"]);@@ -59,7 +59,7 @@ export function isUrl(text: string): boolean {for (const ch of label) {if (/[a-z]/.test(ch) && !vowels.has(ch)) {consecutive++;- if (consecutive >= 4) return false;+ if (consecutive >= 5) return false;} else {consecutive = 0;}