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
fix(app): clean linux tauri warnings
Louis Beaumonta799f4711bd1
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/audio_exclusions.rs b/apps/screenpipe-app-tauri/src-tauri/src/audio_exclusions.rsindex 4e6feaaea..daf44bdab 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/audio_exclusions.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/audio_exclusions.rs@@ -26,7 +26,9 @@ use serde::{Deserialize, Serialize};use specta::Type;use std::fs::File;use std::io::Write;-use std::path::{Path, PathBuf};+#[cfg(target_os = "macos")]+use std::path::Path;+use std::path::PathBuf;const ENV_OVERRIDE: &str = "SCREENPIPE_AUDIO_EXCLUSIONS_PATH";const DEFAULT_RELATIVE_PATH: &str = ".screenpipe/audio-exclusions.json";@@ -133,6 +135,7 @@ pub async fn write_audio_exclusions(apps: Vec<ExcludedApp>) -> Result<(), StringOk(())}+#[cfg(target_os = "macos")]fn bundle_name_from_plist(plist: &plist::Value, app_path: &Path) -> String {if let Some(s) = plist.as_dictionary()diff --git a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs b/apps/screenpipe-app-tauri/src-tauri/src/commands.rsindex 2f822fc9c..fc2ec9361 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs@@ -221,6 +221,7 @@ fn native_notif_action_callback_inner(json_ptr: *const std::os::raw::c_char) {let _ = app.emit("native-notification-action", &json);}+#[cfg(any(target_os = "macos", test))]fn is_meeting_deeplink(url: &str) -> bool {url.starts_with("screenpipe://meeting/") || url.starts_with("screenpipe://meeting?")}diff --git a/apps/screenpipe-app-tauri/src-tauri/src/icons.rs b/apps/screenpipe-app-tauri/src-tauri/src/icons.rsindex bc0f573d3..b73a69861 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/icons.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/icons.rs@@ -594,9 +594,8 @@ mod linux_icon_cache {}// If icon isn't in the map, try loading the icon path- if let icon_path = self.get_icon_path_from_name(app_name).await? {- return self.load_icon_from_path(&icon_path);- }+ let icon_path = self.get_icon_path_from_name(app_name).await?;+ return self.load_icon_from_path(&icon_path);Err(format!("Icon for App '{}' not found", app_name))}@@ -607,7 +606,7 @@ mod linux_icon_cache {{let icon_name = icon_name.to_string();- MainContext::default().invoke(clone!(@strong icon_name => move || {+ main_context.invoke(clone!(@strong icon_name => move || {let result = gtk::IconTheme::default().and_then(|icon_theme| {icon_theme@@ -702,7 +701,7 @@ mod linux_icon_cache {pub async fn get_app_icon(app_name: &str,- app_path: Option<String>,+ _app_path: Option<String>,) -> Result<Option<AppIcon>, String> {ICON_CACHE.get_app_icon(app_name).await}diff --git a/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs b/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rsindex 5a80c95d7..3adf7f7ee 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs@@ -403,7 +403,7 @@ fn child_webview_builder(let app_for_title = app.clone();let app_for_nav = app.clone();let app_for_page_load = app.clone();- let mut builder = tauri::webview::WebviewBuilder::new(label.to_string(), url)+ let builder = tauri::webview::WebviewBuilder::new(label.to_string(), url).initialization_script(BRIDGE_INIT_SCRIPT).on_navigation(move |_url| {// Browsers do not put subframe navigations in the omnibox. Wry's@@ -434,15 +434,13 @@ fn child_webview_builder(});#[cfg(target_os = "macos")]- {+ let builder = builder.user_agent(// Some sites gate the default WKWebView UA even though the underlying// engine is Safari.- builder = builder.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",- );- }+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) \+ AppleWebKit/605.1.15 (KHTML, like Gecko) \+ Version/17.5 Safari/605.1.15",+ );builder}diff --git a/apps/screenpipe-app-tauri/src-tauri/src/owned_browser_cookies.rs b/apps/screenpipe-app-tauri/src-tauri/src/owned_browser_cookies.rsindex 0b6d77fa7..86a679539 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/owned_browser_cookies.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/owned_browser_cookies.rs@@ -97,6 +97,7 @@ type Aes128CbcDec = cbc::Decryptor<aes::Aes128>;/// inject helper in `owned_browser.rs` can stay one impl per platform/// while the reader and the agent see the same struct.#[derive(Debug, Clone)]+#[cfg_attr(not(any(target_os = "macos", target_os = "windows")), allow(dead_code))]pub struct Cookie {pub name: String,pub value: String,@@ -168,11 +169,6 @@ pub async fn safe_storage_likely_prompts_for_host(host: &str) -> bool {.unwrap_or(true)}-#[cfg(not(target_os = "macos"))]-pub async fn safe_storage_likely_prompts_for_host(_host: &str) -> bool {- false-}-#[cfg(target_os = "windows")]pub async fn v20_cookie_block_for_host(host: &str) -> Option<V20CookieBlock> {v20_cookie_blocks()diff --git a/apps/screenpipe-app-tauri/src-tauri/src/viewer.rs b/apps/screenpipe-app-tauri/src-tauri/src/viewer.rsindex 383297fd4..22ba11c57 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/viewer.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/viewer.rs@@ -44,7 +44,7 @@ pub async fn open_viewer_window(app: AppHandle, path: String) -> Result<(), Strilet url = format!("/viewer?path={}", urlencoding::encode(&path));- let mut builder = WebviewWindowBuilder::new(&app, &label, WebviewUrl::App(PathBuf::from(url)))+ let builder = WebviewWindowBuilder::new(&app, &label, WebviewUrl::App(PathBuf::from(url))).title(viewer_title(&path)).inner_size(720.0, 600.0).min_inner_size(400.0, 300.0)@@ -53,9 +53,7 @@ pub async fn open_viewer_window(app: AppHandle, path: String) -> Result<(), Stri.focused(true);#[cfg(target_os = "macos")]- {- builder = builder.hidden_title(true);- }+ let builder = builder.hidden_title(true);builder.build()diff --git a/apps/screenpipe-app-tauri/src-tauri/src/window/show.rs b/apps/screenpipe-app-tauri/src-tauri/src/window/show.rsindex ff59e251c..df643b810 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/window/show.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/window/show.rs@@ -718,6 +718,7 @@ impl ShowRewindWindow {#[cfg(not(target_os = "macos"))]let window = {let app_clone = app.clone();+ #[cfg(target_os = "windows")]let capturable = show_in_recording;let builder = self.window_builder_with_label(@@ -1210,6 +1211,7 @@ impl ShowRewindWindow {// Debounce focus-loss so three-finger workspace swipes don't hide mid-animation.// On Linux the main window is a normal decorated window — don't auto-hide on focus loss,// as that makes the window unclickable and breaks the standard desktop UX.+ #[cfg(not(target_os = "linux"))]let app_clone = app.clone();let window_clone = window.clone();#[cfg(not(target_os = "linux"))]