Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
fix(reset): clear webview profile on full factory reset (race-free)
Akarshan Biswasccf2c94cbbfb
diff --git a/src-tauri/src/core/system/commands.rs b/src-tauri/src/core/system/commands.rsindex fbc7481d4..9ad2e8e2c 100644--- a/src-tauri/src/core/system/commands.rs+++ b/src-tauri/src/core/system/commands.rs@@ -233,7 +233,12 @@ pub fn factory_reset<R: Runtime>(let _ = update_app_configuration(app_handle.clone(), default_config);}- if clear_web_data {+ // A full wipe must also clear the webview profile: persisted UI state+ // (model-provider, setup flag) lives in localStorage there, not the data+ // folder. Renderer-side removal races the restart flush, so delete the+ // files directly. The opt-in flag additionally covers partial resets.+ let full_wipe = !keep_app_data && !keep_models_and_configs;+ if clear_web_data || full_wipe {clear_webview_profile(&app_handle, &data_folder);}