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(app): remove tauri warning noise

Louis Beaumont018ca278178c
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 5eec00a03..5a80c95d7 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs
@@ -802,8 +802,7 @@ async fn ensure_child_bounds(
return Err(format!("parent window {parent:?} not found"));
};
- let mut pending_url = None;
- let child = {
+ let (child, pending_url) = {
let mut inner = state.inner.lock().await;
if let Some(child) = inner.child.clone() {
@@ -813,8 +812,8 @@ async fn ensure_child_bounds(
.map_err(|e| format!("owned-browser child reparent failed: {e}"))?;
inner.child_parent = Some(parent.to_string());
}
- pending_url = inner.pending_url.take();
- child
+ let pending_url = inner.pending_url.take();
+ (child, pending_url)
} else {
let blank: url::Url = "about:blank"
.parse()
@@ -827,11 +826,11 @@ async fn ensure_child_bounds(
LogicalSize::new(width, height),
)
.map_err(|e| format!("owned-browser child webview attach failed: {e}"))?;
- pending_url = inner.pending_url.take();
+ let pending_url = inner.pending_url.take();
inner.child = Some(child.clone());
inner.child_parent = Some(parent.to_string());
info!(parent, "owned-browser: child webview attached");
- child
+ (child, pending_url)
}
};
@@ -1112,7 +1111,9 @@ async fn inject_cookies_for_url(app: &AppHandle, url: &url::Url) {
}
info!(host, "owned-browser cookies: pre-navigate inject starting");
- let mut cookies = crate::owned_browser_cookies::cookies_for_host(host).await;
+ let cookies = crate::owned_browser_cookies::cookies_for_host(host).await;
+ #[cfg(target_os = "windows")]
+ let mut cookies = cookies;
if cookies.is_empty() {
#[cfg(target_os = "windows")]
{
diff --git a/ee/desktop-rust/enterprise_policy.rs b/ee/desktop-rust/enterprise_policy.rs
index 34a71ca0d..2e4776b2e 100644
--- a/ee/desktop-rust/enterprise_policy.rs
+++ b/ee/desktop-rust/enterprise_policy.rs
@@ -194,6 +194,7 @@ pub fn set_sync_streams(
/// machine on every tick. Returns the defaults (all-true) if the lock is
/// poisoned — fail-open here mirrors the centralized-data master-switch
/// behavior: the ingest endpoint will still enforce policy server-side.
+#[cfg(test)]
pub fn current_sync_streams() -> SyncStreams {
SYNC_STREAMS.read().map(|guard| *guard).unwrap_or_default()
}