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

feat: move auto-update toggle from tray menu to settings UI

Louis Beaumont4973ad4382c1
diff --git a/apps/screenpipe-app-tauri/components/settings/general-settings.tsx b/apps/screenpipe-app-tauri/components/settings/general-settings.tsx
index 551623788..291565ba9 100644
--- a/apps/screenpipe-app-tauri/components/settings/general-settings.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/general-settings.tsx
@@ -6,7 +6,7 @@ import { useTheme } from "@/components/theme-provider";
import { Switch } from "@/components/ui/switch";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Separator } from "@/components/ui/separator";
-import { Rocket, Moon, Sun, Monitor, FlaskConical, Shield, ExternalLink, Layers } from "lucide-react";
+import { Rocket, Moon, Sun, Monitor, FlaskConical, Shield, ExternalLink, Layers, RefreshCw } from "lucide-react";
import { useToast } from "@/components/ui/use-toast";
import { Button } from "@/components/ui/button";
import { Settings, OverlayMode } from "@/lib/hooks/use-settings";
@@ -99,6 +99,35 @@ export default function GeneralSettings() {
</CardContent>
</Card>
+ <Card className="border-border bg-card shadow-sm">
+ <CardContent className="p-6">
+ <div className="flex items-center justify-between">
+ <div className="flex items-start space-x-4">
+ <div className="p-2 bg-primary/10 rounded-lg">
+ <RefreshCw className="h-5 w-5 text-primary" />
+ </div>
+ <div className="space-y-1 flex-1">
+ <h3 className="text-lg font-semibold text-foreground">
+ Auto-update
+ </h3>
+ <p className="text-sm text-muted-foreground leading-relaxed">
+ Automatically install updates and restart when a new version is available.
+ When disabled, you&apos;ll be notified but must update manually.
+ </p>
+ </div>
+ </div>
+ <Switch
+ id="auto-update-toggle"
+ checked={settings?.autoUpdate ?? true}
+ onCheckedChange={(checked) =>
+ handleSettingsChange({ autoUpdate: checked })
+ }
+ className="ml-4"
+ />
+ </div>
+ </CardContent>
+ </Card>
+
<Card className="border-border bg-card shadow-sm">
<CardContent className="p-6">
<div className="space-y-4">
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/tray.rs b/apps/screenpipe-app-tauri/src-tauri/src/tray.rs
index 48fcbc2fc..8df841681 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/tray.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/tray.rs
@@ -233,23 +233,10 @@ fn create_dynamic_menu(
.item(&MenuItemBuilder::with_id("stop_recording", "stop recording").build(app)?);
}
- // Auto-update toggle
- let auto_update_enabled = SettingsStore::get(app)
- .ok()
- .flatten()
- .map(|s| s.auto_update)
- .unwrap_or(true);
- let auto_update_text = if auto_update_enabled {
- "✓ auto-update"
- } else {
- " auto-update"
- };
-
// Settings, feedback and quit
menu_builder = menu_builder
.item(&PredefinedMenuItem::separator(app)?)
.item(&MenuItemBuilder::with_id("settings", "settings").build(app)?)
- .item(&MenuItemBuilder::with_id("toggle_auto_update", auto_update_text).build(app)?)
.item(&MenuItemBuilder::with_id("feedback", "send feedback").build(app)?)
.item(&MenuItemBuilder::with_id("book_call", "book a call with founder").build(app)?)
.item(&MenuItemBuilder::with_id("onboarding", "onboarding").build(app)?)
@@ -334,22 +321,6 @@ fn handle_menu_event(app_handle: &AppHandle, event: tauri::menu::MenuEvent) {
"settings" => {
let _ = ShowRewindWindow::Settings { page: None }.show(app_handle);
}
- "toggle_auto_update" => {
- let current = SettingsStore::get(app_handle)
- .ok()
- .flatten()
- .map(|s| s.auto_update)
- .unwrap_or(true);
- let new_value = !current;
-
- // Update the store
- if let Ok(store) = get_store(app_handle, None) {
- let _ = store.set("autoUpdate", serde_json::json!(new_value));
- let _ = store.save();
- }
-
- info!("auto-update toggled to: {}", new_value);
- }
"feedback" => {
let _ = ShowRewindWindow::Settings { page: Some("feedback".to_string()) }.show(app_handle);
}