From c0f7dcbe03c608cc8f4f921ea31dfd86fd5bdd3f Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:07:37 +0000 Subject: [PATCH 1/2] fix: persist onboarding state immediately to prevent session loss on updates Add save() calls to set_onboarding_needed and set_onboarding_local functions to ensure the onboarding state is persisted to disk immediately after being set. Previously, these functions did not call save() after setting the value, which meant the state might not be persisted if the app was killed (e.g., during an update) before the store was saved elsewhere. This could cause users to see the onboarding screen after an update, making them think they were logged out. Co-Authored-By: john@hyprnote.com --- apps/desktop/src-tauri/src/ext.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src-tauri/src/ext.rs b/apps/desktop/src-tauri/src/ext.rs index e55624c18b..6f126d2027 100644 --- a/apps/desktop/src-tauri/src/ext.rs +++ b/apps/desktop/src-tauri/src/ext.rs @@ -38,7 +38,8 @@ impl> AppExt for T { let store = self.desktop_store()?; store .set(StoreKey::OnboardingNeeded2, v) - .map_err(|e| e.to_string()) + .map_err(|e| e.to_string())?; + store.save().map_err(|e| e.to_string()) } #[tracing::instrument(skip_all)] @@ -73,7 +74,8 @@ impl> AppExt for T { let store = self.desktop_store()?; store .set(StoreKey::OnboardingLocal, v) - .map_err(|e| e.to_string()) + .map_err(|e| e.to_string())?; + store.save().map_err(|e| e.to_string()) } #[tracing::instrument(skip_all)] From 15525a69dd7a937b7f8b5c4d3921de6479a0149d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 17 Jan 2026 02:06:29 +0000 Subject: [PATCH 2/2] fix: save store before update install to persist auth session Co-Authored-By: john@hyprnote.com --- plugins/updater2/src/ext.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/updater2/src/ext.rs b/plugins/updater2/src/ext.rs index 6a556df17d..f7187bab27 100644 --- a/plugins/updater2/src/ext.rs +++ b/plugins/updater2/src/ext.rs @@ -121,6 +121,10 @@ impl<'a, R: tauri::Runtime, M: tauri::Manager> Updater2<'a, R, M> { .await? .ok_or(crate::Error::UpdateNotAvailable)?; + if let Ok(store) = self.manager.store2().store() { + let _ = store.save(); + } + update.install(&bytes)?; Ok(())