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

chore: fix compiler warnings in desktop app

Louis Beaumont387441150d63
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lock
index 95af9eae6..aa89d13c8 100755
--- a/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -5629,7 +5629,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "screenpipe-app"
-version = "2.0.19"
+version = "2.0.20"
dependencies = [
"anyhow",
"async-stream",
diff --git a/screenpipe-app-tauri/src-tauri/src/commands.rs b/screenpipe-app-tauri/src-tauri/src/commands.rs
index db7248ffa..a27f06297 100644
--- a/screenpipe-app-tauri/src-tauri/src/commands.rs
+++ b/screenpipe-app-tauri/src-tauri/src/commands.rs
@@ -1,6 +1,4 @@
use crate::{get_data_dir, window_api::ShowRewindWindow, store::OnboardingStore};
-use serde::Serialize;
-use specta::Type;
use tauri::Manager;
use tracing::{error, info};
@@ -46,10 +44,10 @@ pub fn hide_main_window(app_handle: &tauri::AppHandle) {
/// When enabled, mouse events pass through to windows below
#[tauri::command]
#[specta::specta]
-pub fn enable_overlay_click_through(app_handle: tauri::AppHandle) -> Result<(), String> {
+pub fn enable_overlay_click_through(_app_handle: tauri::AppHandle) -> Result<(), String> {
#[cfg(target_os = "windows")]
{
- if let Some(window) = app_handle.get_webview_window("main") {
+ if let Some(window) = _app_handle.get_webview_window("main") {
crate::windows_overlay::enable_click_through(&window)?;
}
}
@@ -60,10 +58,10 @@ pub fn enable_overlay_click_through(app_handle: tauri::AppHandle) -> Result<(),
/// When disabled, the overlay receives mouse events normally
#[tauri::command]
#[specta::specta]
-pub fn disable_overlay_click_through(app_handle: tauri::AppHandle) -> Result<(), String> {
+pub fn disable_overlay_click_through(_app_handle: tauri::AppHandle) -> Result<(), String> {
#[cfg(target_os = "windows")]
{
- if let Some(window) = app_handle.get_webview_window("main") {
+ if let Some(window) = _app_handle.get_webview_window("main") {
crate::windows_overlay::disable_click_through(&window)?;
}
}
@@ -73,10 +71,10 @@ pub fn disable_overlay_click_through(app_handle: tauri::AppHandle) -> Result<(),
/// Check if click-through is currently enabled (Windows only)
#[tauri::command]
#[specta::specta]
-pub fn is_overlay_click_through(app_handle: tauri::AppHandle) -> bool {
+pub fn is_overlay_click_through(_app_handle: tauri::AppHandle) -> bool {
#[cfg(target_os = "windows")]
{
- if let Some(window) = app_handle.get_webview_window("main") {
+ if let Some(window) = _app_handle.get_webview_window("main") {
return crate::windows_overlay::is_click_through_enabled(&window);
}
}
@@ -153,13 +151,6 @@ pub fn update_show_screenpipe_shortcut(
Ok(())
}
-// Add these new structs
-#[derive(Debug, Serialize, Type)]
-pub struct AuthStatus {
- authenticated: bool,
- message: Option<String>,
-}
-
#[tauri::command]
#[specta::specta]
pub async fn open_pipe_window(
diff --git a/screenpipe-app-tauri/src-tauri/src/main.rs b/screenpipe-app-tauri/src-tauri/src/main.rs
index 0ee5ca9fe..333333dd9 100755
--- a/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -4,7 +4,6 @@
use analytics::AnalyticsManager;
use commands::show_main_window;
use serde_json::json;
-use serde_json::Value;
#[cfg(target_os = "macos")]
use tauri_nspanel::ManagerExt;
use std::env;
@@ -12,7 +11,6 @@ use std::fs::File;
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::Arc;
-use tauri::Config;
use tauri::Emitter;
use tauri::Manager;
use tauri_plugin_autostart::MacosLauncher;
@@ -21,7 +19,6 @@ use tauri_plugin_global_shortcut::ShortcutState;
#[allow(unused_imports)]
use tauri_plugin_shell::process::CommandEvent;
use tokio::sync::mpsc;
-use tokio::sync::Mutex;
use tracing::{debug, error, info, warn};
use tracing_appender::rolling::{RollingFileAppender, Rotation};
use tracing_subscriber::prelude::*;
@@ -74,7 +71,7 @@ pub use permissions::do_permissions_check;
pub use permissions::open_permission_settings;
pub use permissions::request_permission;
use std::collections::HashMap;
-use tauri::{AppHandle, WebviewUrl, WebviewWindow};
+use tauri::AppHandle;
use tauri_plugin_global_shortcut::GlobalShortcutExt;
use tauri_plugin_global_shortcut::{Code, Modifiers, Shortcut};
use tauri_plugin_sentry::sentry;
diff --git a/screenpipe-app-tauri/src-tauri/src/sidecar.rs b/screenpipe-app-tauri/src-tauri/src/sidecar.rs
index d8e861a78..dad173d37 100644
--- a/screenpipe-app-tauri/src-tauri/src/sidecar.rs
+++ b/screenpipe-app-tauri/src-tauri/src/sidecar.rs
@@ -318,7 +318,9 @@ async fn spawn_sidecar(app: &tauri::AppHandle, override_args: Option<Vec<String>
let port_str = port.to_string();
let mut args = vec!["--port", port_str.as_str()];
let fps_str = fps.to_string();
- let mut monitor_id_str = String::new(); // Store monitor ID string
+ // Needs to be declared here for lifetime (used by args.push below)
+ #[allow(unused_assignments)]
+ let mut monitor_id_str = String::new();
if fps != 0.2 {
args.push("--fps");
args.push(fps_str.as_str());
diff --git a/screenpipe-app-tauri/src-tauri/src/tray.rs b/screenpipe-app-tauri/src-tauri/src/tray.rs
index 6796f5d30..12050dd1d 100644
--- a/screenpipe-app-tauri/src-tauri/src/tray.rs
+++ b/screenpipe-app-tauri/src-tauri/src/tray.rs
@@ -6,7 +6,7 @@ use anyhow::Result;
use once_cell::sync::Lazy;
use std::collections::HashMap;
use std::sync::Mutex;
-use tauri::tray::{MouseButton, MouseButtonState, TrayIcon};
+use tauri::tray::TrayIcon;
use tauri::Emitter;
use tauri::{
menu::{MenuBuilder, MenuItemBuilder, PredefinedMenuItem},
diff --git a/screenpipe-app-tauri/src-tauri/src/window_api.rs b/screenpipe-app-tauri/src-tauri/src/window_api.rs
index fa14c17ab..2ed6a5909 100644
--- a/screenpipe-app-tauri/src-tauri/src/window_api.rs
+++ b/screenpipe-app-tauri/src-tauri/src/window_api.rs
@@ -188,15 +188,6 @@ impl RewindWindowId {
}
}
- pub fn url(&self) -> &str {
- match self {
- RewindWindowId::Main => "/",
- RewindWindowId::Settings => "/settings",
- RewindWindowId::Search => "/search",
- RewindWindowId::Onboarding => "/onboarding",
- }
- }
-
pub fn min_size(&self) -> Option<(f64, f64)> {
Some(match self {
RewindWindowId::Main => (1200.0, 850.0),