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: simplify Arc URL extraction + skip pipe_config blobs in sync

Louis Beaumont08d5c53a70f2
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index 6fc7be78d..60468d14e 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -8223,7 +8223,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.2.13"
+version = "2.2.15"
dependencies = [
"anyhow",
"arboard",
diff --git a/crates/screenpipe-accessibility/src/tree/macos.rs b/crates/screenpipe-accessibility/src/tree/macos.rs
index 86ef456d6..b6ccd989c 100644
--- a/crates/screenpipe-accessibility/src/tree/macos.rs
+++ b/crates/screenpipe-accessibility/src/tree/macos.rs
@@ -56,7 +56,7 @@ fn extract_browser_url(
// Tier 2: For Arc, use AppleScript (AXDocument may not be set)
let app_lower = app_name.to_lowercase();
if app_lower.contains("arc") {
- if let Some(url) = get_arc_url(window_name) {
+ if let Some(url) = get_arc_url() {
debug!("browser_url: tier2 Arc AppleScript hit: {}", url);
return Some(url);
}
@@ -79,13 +79,8 @@ fn extract_browser_url(
}
/// Get Arc browser's current URL via AppleScript.
-/// Cross-checks the returned title against window_name to avoid stale results.
-fn get_arc_url(window_name: &str) -> Option<String> {
- let script = r#"tell application "Arc"
- set t to title of active tab of front window
- set u to URL of active tab of front window
- return t & "\n" & u
- end tell"#;
+fn get_arc_url() -> Option<String> {
+ let script = r#"tell application "Arc" to return URL of active tab of front window"#;
let output = match Command::new("osascript").arg("-e").arg(script).output() {
Ok(o) => o,
@@ -105,36 +100,10 @@ fn get_arc_url(window_name: &str) -> Option<String> {
return None;
}
- let result = String::from_utf8_lossy(&output.stdout).trim().to_string();
- let mut lines = result.lines();
- let title = match lines.next() {
- Some(t) => t,
- None => {
- debug!("get_arc_url: no title line in output");
- return None;
- }
- };
- let url = match lines.next() {
- Some(u) => u,
- None => {
- debug!("get_arc_url: no URL line in output (title={})", title);
- return None;
- }
- };
-
- // Cross-check: window title should contain the tab title (or vice versa)
- let window_lower = window_name.to_lowercase();
- let title_lower = title.to_lowercase();
- if !window_lower.contains(&title_lower) && !title_lower.contains(&window_lower) {
- debug!(
- "get_arc_url: title mismatch — window='{}', arc_title='{}', url='{}'",
- window_name, title, url
- );
- return None;
- }
+ let url = String::from_utf8_lossy(&output.stdout).trim().to_string();
if url.starts_with("http://") || url.starts_with("https://") {
- Some(url.to_string())
+ Some(url)
} else {
debug!("get_arc_url: URL not http(s): {}", url);
None
diff --git a/crates/screenpipe-server/src/sync_api.rs b/crates/screenpipe-server/src/sync_api.rs
index 1c7785231..1ee3ba75a 100644
--- a/crates/screenpipe-server/src/sync_api.rs
+++ b/crates/screenpipe-server/src/sync_api.rs
@@ -263,6 +263,10 @@ pub async fn sync_init(
let mut skipped_schema = 0;
for blob in &blobs {
+ // Skip pipe_config blobs — handled by pipe sync separately
+ if blob.blob_type == BlobType::PipeConfig {
+ continue;
+ }
let chunk: Result<crate::sync_provider::SyncChunk, _> =
serde_json::from_slice(&blob.data);
match chunk {