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: remove more unwrap panics + reduce Sentry noise
Louis Beaumont075a30657964
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs b/apps/screenpipe-app-tauri/src-tauri/src/commands.rsindex f1ccf4ca7..706c44cad 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs@@ -19,9 +19,10 @@ pub fn write_browser_log(level: String, message: String) {#[specta::specta]pub fn set_tray_unhealth_icon(app_handle: tauri::AppHandle) {if let Some(main_tray) = app_handle.tray_by_id("screenpipe_main") {- let _ = main_tray.set_icon(Some(- tauri::image::Image::from_path("icons/screenpipe-logo-tray-failed.png").unwrap(),- ));+ match tauri::image::Image::from_path("icons/screenpipe-logo-tray-failed.png") {+ Ok(icon) => { let _ = main_tray.set_icon(Some(icon)); }+ Err(e) => { error!("failed to load tray unhealthy icon: {}", e); }+ }}}@@ -29,9 +30,10 @@ pub fn set_tray_unhealth_icon(app_handle: tauri::AppHandle) {#[specta::specta]pub fn set_tray_health_icon(app_handle: tauri::AppHandle) {if let Some(main_tray) = app_handle.tray_by_id("screenpipe_main") {- let _ = main_tray.set_icon(Some(- tauri::image::Image::from_path("icons/screenpipe-logo-tray-black.png").unwrap(),- ));+ match tauri::image::Image::from_path("icons/screenpipe-logo-tray-black.png") {+ Ok(icon) => { let _ = main_tray.set_icon(Some(icon)); }+ Err(e) => { error!("failed to load tray healthy icon: {}", e); }+ }}}diff --git a/crates/screenpipe-audio/src/core/mod.rs b/crates/screenpipe-audio/src/core/mod.rsindex 6f4cd3b42..50f1505c4 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;+use tracing::{error, warn};lazy_static! {// Global fallback timestamp for backward compatibility@@ -76,7 +76,7 @@ pub async fn record_and_transcribe(if is_normal_shutdown(&is_running) {return Err(e);}- error!("record_and_transcribe error, restarting: {}", e);+ warn!("record_and_transcribe error, restarting: {}", e);tokio::time::sleep(Duration::from_secs(1)).await;}}diff --git a/crates/screenpipe-server/src/server.rs b/crates/screenpipe-server/src/server.rsindex 69feee890..e6c9e221e 100644--- a/crates/screenpipe-server/src/server.rs+++ b/crates/screenpipe-server/src/server.rs@@ -49,7 +49,7 @@ use screenpipe_audio::{};use screenpipe_core::pii_removal::detect_pii_regions;use screenpipe_core::sync::SyncServiceHandle;-use tracing::{debug, error, info};+use tracing::{debug, error, info, warn};use crate::sync_api::{self, SyncState};@@ -3842,7 +3842,7 @@ async fn handle_stream_frames_socket(// Send keep-alive message to prevent connection timeout_ = keepalive_timer.tick() => {if let Err(e) = sender.send(Message::Text("\"keep-alive-text\"".to_string())).await {- error!("failed to send keepalive: {}", e);+ warn!("failed to send keepalive: {}", e);break;}}