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: obsidian windows path, app icon placeholder, audio timeout log spam
Louis Beaumont85b515958ea3
diff --git a/Cargo.lock b/Cargo.lockindex 29fb041aa..00c92c4c8 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -6641,7 +6641,7 @@ dependencies = [[[package]]name = "screenpipe-audio"-version = "0.3.133"+version = "0.3.135"dependencies = ["anyhow","bytemuck",@@ -6694,7 +6694,7 @@ dependencies = [[[package]]name = "screenpipe-core"-version = "0.3.133"+version = "0.3.135"dependencies = ["accessibility","accessibility-sys",@@ -6745,7 +6745,7 @@ dependencies = [[[package]]name = "screenpipe-db"-version = "0.3.133"+version = "0.3.135"dependencies = ["anyhow","chrono",@@ -6769,7 +6769,7 @@ dependencies = [[[package]]name = "screenpipe-events"-version = "0.3.133"+version = "0.3.135"dependencies = ["anyhow","chrono",@@ -6787,7 +6787,7 @@ dependencies = [[[package]]name = "screenpipe-integrations"-version = "0.3.133"+version = "0.3.135"dependencies = ["anyhow","image",@@ -6802,7 +6802,7 @@ dependencies = [[[package]]name = "screenpipe-server"-version = "0.3.133"+version = "0.3.135"dependencies = ["anyhow","async-trait",@@ -6873,7 +6873,7 @@ dependencies = [[[package]]name = "screenpipe-vision"-version = "0.3.133"+version = "0.3.135"dependencies = ["accessibility-sys","anyhow",diff --git a/apps/screenpipe-app-tauri/components/settings/obsidian-sync-card.tsx b/apps/screenpipe-app-tauri/components/settings/obsidian-sync-card.tsxindex 68598dcf1..315a017bd 100644--- a/apps/screenpipe-app-tauri/components/settings/obsidian-sync-card.tsx+++ b/apps/screenpipe-app-tauri/components/settings/obsidian-sync-card.tsx@@ -460,7 +460,11 @@ export function ObsidianSyncCard() {const { readTextFile } = await import("@tauri-apps/plugin-fs");const home = await homeDir();- const obsidianConfigPath = `${home}Library/Application Support/obsidian/obsidian.json`;+ const { platform } = await import("@tauri-apps/plugin-os");+ const os = platform();+ const obsidianConfigPath = os === "windows"+ ? `${home}AppData\\Roaming\\obsidian\\obsidian.json`+ : `${home}Library/Application Support/obsidian/obsidian.json`;let vaultName: string | null = null;@@ -486,7 +490,9 @@ export function ObsidianSyncCard() {? `obsidian://open?vault=${encodeURIComponent(vaultName)}`: "obsidian://";- const command = Command.create("open", [deepLink]);+ const command = os === "windows"+ ? Command.create("cmd", ["/c", "start", "", deepLink])+ : Command.create("open", [deepLink]);await command.execute();if (!vaultName) {diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lockindex c248fbd96..e2cdc6b65 100755--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -9007,7 +9007,7 @@ dependencies = [[[package]]name = "screenpipe-app"-version = "2.0.349"+version = "2.0.352"dependencies = ["anyhow","async-stream",@@ -9099,7 +9099,7 @@ dependencies = [[[package]]name = "screenpipe-audio"-version = "0.3.134"+version = "0.3.135"dependencies = ["anyhow","bytemuck",@@ -9147,7 +9147,7 @@ dependencies = [[[package]]name = "screenpipe-core"-version = "0.3.134"+version = "0.3.135"dependencies = ["accessibility","accessibility-sys",@@ -9198,7 +9198,7 @@ dependencies = [[[package]]name = "screenpipe-db"-version = "0.3.134"+version = "0.3.135"dependencies = ["anyhow","chrono",@@ -9222,7 +9222,7 @@ dependencies = [[[package]]name = "screenpipe-events"-version = "0.3.134"+version = "0.3.135"dependencies = ["anyhow","chrono",@@ -9238,7 +9238,7 @@ dependencies = [[[package]]name = "screenpipe-integrations"-version = "0.3.134"+version = "0.3.135"dependencies = ["anyhow","image 0.25.9",@@ -9253,7 +9253,7 @@ dependencies = [[[package]]name = "screenpipe-server"-version = "0.3.134"+version = "0.3.135"dependencies = ["anyhow","async-trait",@@ -9319,7 +9319,7 @@ dependencies = [[[package]]name = "screenpipe-vision"-version = "0.3.134"+version = "0.3.135"dependencies = ["accessibility-sys","anyhow",diff --git a/apps/screenpipe-app-tauri/src-tauri/src/server.rs b/apps/screenpipe-app-tauri/src-tauri/src/server.rsindex 4eef12e08..da51570e7 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/server.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/server.rs@@ -313,9 +313,41 @@ async fn handle_auth(async fn get_app_icon_handler(State(_): State<ServerState>,Query(app_name): Query<AppIconQuery>,-) -> Result<impl IntoResponse, (StatusCode, String)> {+) -> impl IntoResponse {+ use once_cell::sync::Lazy;+ use std::collections::HashSet;+ use std::sync::Mutex;++ // Cache of app names we already know have no icon, to avoid repeated expensive lookups+ static NOT_FOUND_CACHE: Lazy<Mutex<HashSet<String>>> =+ Lazy::new(|| Mutex::new(HashSet::new()));++ // 1x1 transparent PNG placeholder+ static PLACEHOLDER_PNG: &[u8] = &[+ 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48,+ 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x06, 0x00, 0x00,+ 0x00, 0x1F, 0x15, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x44, 0x41, 0x54, 0x78,+ 0x9C, 0x62, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0xE5, 0x27, 0xDE, 0xFC, 0x00, 0x00,+ 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82,+ ];+info!("received app icon request: {:?}", app_name);+ // Check not-found cache first to skip expensive lookups+ let cache_key = format!("{}:{}", app_name.name, app_name.path.as_deref().unwrap_or(""));+ if let Ok(cache) = NOT_FOUND_CACHE.lock() {+ if cache.contains(&cache_key) {+ let headers = [+ (CONTENT_TYPE, HeaderValue::from_static("image/png")),+ (+ http::header::CACHE_CONTROL,+ HeaderValue::from_static("public, max-age=604800"),+ ),+ ];+ return (StatusCode::OK, headers, Bytes::from_static(PLACEHOLDER_PNG));+ }+ }+#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]{match crate::icons::get_app_icon(&app_name.name, app_name.path).await {@@ -327,25 +359,35 @@ async fn get_app_icon_handler(HeaderValue::from_static("public, max-age=604800"),),];- Ok((headers, Bytes::from(icon.data)))+ (StatusCode::OK, headers, Bytes::from(icon.data))}- Ok(None) => Err((StatusCode::NOT_FOUND, "Icon not found".to_string())),- Err(e) => {- error!("failed to get app icon: {}", e);- Err((- StatusCode::INTERNAL_SERVER_ERROR,- format!("failed to get app icon: {}", e),- ))+ Ok(None) | Err(_) => {+ // Cache the miss to avoid repeated expensive lookups+ if let Ok(mut cache) = NOT_FOUND_CACHE.lock() {+ cache.insert(cache_key);+ }+ let headers = [+ (CONTENT_TYPE, HeaderValue::from_static("image/png")),+ (+ http::header::CACHE_CONTROL,+ HeaderValue::from_static("public, max-age=604800"),+ ),+ ];+ (StatusCode::OK, headers, Bytes::from_static(PLACEHOLDER_PNG))}}}#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "linux")))]{- Err((- StatusCode::NOT_IMPLEMENTED,- "app icon retrieval not supported on this platform".to_string(),- ))+ let headers = [+ (CONTENT_TYPE, HeaderValue::from_static("image/png")),+ (+ http::header::CACHE_CONTROL,+ HeaderValue::from_static("public, max-age=604800"),+ ),+ ];+ (StatusCode::OK, headers, Bytes::from_static(PLACEHOLDER_PNG))}}diff --git a/crates/screenpipe-audio/src/audio_manager/device_monitor.rs b/crates/screenpipe-audio/src/audio_manager/device_monitor.rsindex 7b9a80021..4f000626d 100644--- a/crates/screenpipe-audio/src/audio_manager/device_monitor.rs+++ b/crates/screenpipe-audio/src/audio_manager/device_monitor.rs@@ -2,7 +2,7 @@ use std::{collections::HashSet, sync::Arc, time::Duration};use anyhow::Result;use tokio::{sync::Mutex, task::JoinHandle, time::sleep};-use tracing::{error, info, warn};+use tracing::{debug, error, info};use crate::{core::device::{default_input_device, default_output_device, parse_audio_device, DeviceType},@@ -124,7 +124,7 @@ pub async fn start_device_monitor(// This handles cases where audio stream was hijacked by another applet stale_devices = audio_manager.check_stale_recording_handles().await;for device_name in stale_devices {- warn!(+ debug!("detected stale recording handle for {}, cleaning up for restart",device_name);diff --git a/crates/screenpipe-audio/src/audio_manager/manager.rs b/crates/screenpipe-audio/src/audio_manager/manager.rsindex f6a2c5e6b..a9524a85e 100644--- a/crates/screenpipe-audio/src/audio_manager/manager.rs+++ b/crates/screenpipe-audio/src/audio_manager/manager.rs@@ -10,7 +10,7 @@ use tokio::{sync::{Mutex, RwLock},task::JoinHandle,};-use tracing::{error, info, warn};+use tracing::{debug, error, info};use whisper_rs::WhisperContext;use screenpipe_db::DatabaseManager;@@ -293,7 +293,7 @@ impl AudioManager {return Err(e);}- warn!(+ debug!("recording handle for device {} quit unexpectedly",device_clone);@@ -431,7 +431,7 @@ impl AudioManager {// Stop the device in device manager (clears streams and states)let _ = self.device_manager.stop_device(&device).await;- info!("cleaned up stale device {} for restart", device_name);+ debug!("cleaned up stale device {} for restart", device_name);Ok(())}diff --git a/crates/screenpipe-audio/src/core/mod.rs b/crates/screenpipe-audio/src/core/mod.rsindex 953a1e6a6..0b6a06504 100644--- a/crates/screenpipe-audio/src/core/mod.rs+++ b/crates/screenpipe-audio/src/core/mod.rs@@ -12,7 +12,7 @@ use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};use std::sync::Arc;use std::time::{Duration, SystemTime, UNIX_EPOCH};use stream::AudioStream;-use tracing::{error, info};+use tracing::{debug, error};lazy_static! {// Global fallback timestamp for backward compatibility@@ -76,10 +76,10 @@ pub async fn record_and_transcribe(if is_normal_shutdown(&is_running) {return Err(e);}- // Use info! instead of warn! — Sentry captures warn+ and this fires- // on every successful auto-recovery (e.g., audio hijack → reconnect),- // creating thousands of noise events. The error is expected & handled.- info!("record_and_transcribe error, restarting: {}", e);+ // Use debug! — this fires on every successful auto-recovery+ // (e.g., audio hijack → reconnect, or idle output device timeout),+ // creating noise in logs. The error is expected & handled.+ debug!("record_and_transcribe error, restarting: {}", e);tokio::time::sleep(Duration::from_secs(1)).await;}}diff --git a/crates/screenpipe-audio/src/core/run_record_and_transcribe.rs b/crates/screenpipe-audio/src/core/run_record_and_transcribe.rsindex 6b9937d91..1ec87685f 100644--- a/crates/screenpipe-audio/src/core/run_record_and_transcribe.rs+++ b/crates/screenpipe-audio/src/core/run_record_and_transcribe.rs@@ -73,9 +73,11 @@ pub async fn run_record_and_transcribe(}Err(_timeout) => {// No audio data received for AUDIO_RECEIVE_TIMEOUT_SECS seconds- // This likely means another app took over the audio device- warn!(- "no audio received from {} for {}s - stream may be hijacked by another app, triggering reconnect",+ // This can happen when another app hijacks the device, or simply+ // when no audio is playing through an output device (speakers).+ // Log at debug level to avoid spamming logs in the common idle case.+ debug!(+ "no audio received from {} for {}s - stream may be idle or hijacked, triggering reconnect",device_name, AUDIO_RECEIVE_TIMEOUT_SECS);// Mark stream as disconnected so device monitor can restart it