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
test(app): cover web media links; fix agent browser bridge comment
Manas Raghuwanshi6326eccb0104
diff --git a/apps/screenpipe-app-tauri/components/__tests__/markdown-web-link.test.tsx b/apps/screenpipe-app-tauri/components/__tests__/markdown-web-link.test.tsxindex c3301731b..34e34a2c6 100644--- a/apps/screenpipe-app-tauri/components/__tests__/markdown-web-link.test.tsx+++ b/apps/screenpipe-app-tauri/components/__tests__/markdown-web-link.test.tsx@@ -37,6 +37,13 @@ describe("MemoizedReactMarkdown web links", () => {},);+ it("opens a web media image, which renders as a link, outside the app window", () => {+ const link = renderLink("");+ expect(link.getAttribute("href")).toBe("https://example.com/clip.mp4");+ expect(link.getAttribute("target")).toBe("_blank");+ expect(link.getAttribute("rel")).toBe("noopener noreferrer");+ });+it.each(["screenpipe://frame/123", "#notes"])("leaves %s to the app", (href) => {const link = renderLink(`[in app](${href})`);expect(link.getAttribute("href")).toBe(href);diff --git a/apps/screenpipe-app-tauri/src-tauri/src/browser_scripts/owned_browser_bridge.js b/apps/screenpipe-app-tauri/src-tauri/src/browser_scripts/owned_browser_bridge.jsindex 75574ae57..894542159 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/browser_scripts/owned_browser_bridge.js+++ b/apps/screenpipe-app-tauri/src-tauri/src/browser_scripts/owned_browser_bridge.js@@ -6,7 +6,8 @@//// Runs as the child webview's initialization script on every page load// (including cross-origin navigations), so it must work on any origin and must-// not depend on window.__TAURI__ (absent off app-origin pages).+// not depend on window.__TAURI__: Tauri injects it on every page, but rejects+// every call from a page outside the app's own origin.//// Results travel back to Rust through `document.title` — the only channel// writable from JS and observable from native (on_document_title_changed) on