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: force restart notifications off for existing users
Louis Beaumont25b8c7563a6b
diff --git a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsxindex 2ade3e373..acbb1aa43 100644--- a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx+++ b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx@@ -359,6 +359,15 @@ function createSettingsStore() {needsUpdate = true;}+ // Temporary one-time migration: force restart notifications off for all+ // existing users until the stall detector is more reliable. Users can+ // still manually opt back in afterward; the marker prevents re-overriding.+ if (!(settings as any).restartNotificationsDefaultedOff) {+ settings.showRestartNotifications = false;+ (settings as any).restartNotificationsDefaultedOff = true;+ needsUpdate = true;+ }+// Migration: Add default presets if user has noneif (!settings.aiPresets || settings.aiPresets.length === 0) {settings.aiPresets = [DEFAULT_PI_PRESET as any];diff --git a/apps/screenpipe-app-tauri/src-tauri/src/store.rs b/apps/screenpipe-app-tauri/src-tauri/src/store.rsindex 40bd281f5..c0052cd1d 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/store.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/store.rs@@ -645,8 +645,15 @@ impl SettingsStore {pub fn init_store(app: &AppHandle) -> Result<SettingsStore, String> {println!("Initializing settings store");+ let should_persist_restart_notification_migration = get_store(app, None)+ .ok()+ .and_then(|store| store.get("settings"))+ .and_then(|raw| raw.as_object().cloned())+ .map(|obj| !obj.contains_key("restartNotificationsDefaultedOff"))+ .unwrap_or(false);+let (store, should_save) = match SettingsStore::get(app) {- Ok(Some(store)) => (store, false), // Loaded successfully, don't overwrite+ Ok(Some(store)) => (store, should_persist_restart_notification_migration),Ok(None) => (SettingsStore::default(), true), // New store, save defaultsErr(e) => {// Fallback to defaults when deserialization fails (e.g., corrupted store)