Skip to content

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

fix(owned-browser): spoof Safari UA so x.com loads in embedded webview

Louis Beaumont4ce98c36e36d
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs b/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs
index 39638ce95..9e842b47a 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs
@@ -383,6 +383,15 @@ pub async fn install(
.shadow(false)
.inner_size(1.0, 1.0)
.position(0.0, 0.0)
+ // Spoof a real Safari UA so anti-WebView gates (notably
+ // x.com, which hangs forever on the splash with the default
+ // WKWebView UA) serve us the normal site. No measured impact
+ // on other domains we render here.
+ .user_agent(
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) \
+ AppleWebKit/605.1.15 (KHTML, like Gecko) \
+ Version/17.5 Safari/605.1.15",
+ )
.initialization_script(BRIDGE_INIT_SCRIPT);
#[cfg(target_os = "windows")]