From 1b6bd1f8703bbcc6080bf722455e8ea06019204d Mon Sep 17 00:00:00 2001 From: danny Date: Mon, 2 Nov 2026 19:07:25 +0100 Subject: [PATCH] F1: the uninstaller keeps the Jump List of com.tyrveil.lutra The template's DeleteAppUserModelId cleared the Jump List of the app id every Lutra install shares, so removing a test or second install wiped the list of the one in use. Marked with a Lutra: comment; a desktop test fails if the call comes back. Also rustfmt of the settings test. Co-Authored-By: Claude Opus 5.5 --- apps/lutra-desktop/installer/installer.nsi | 7 ++++++- apps/lutra-desktop/src/main.rs | 10 ++++++++++ crates/engine/src/settings.rs | 6 +++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/apps/lutra-desktop/installer/installer.nsi b/apps/lutra-desktop/installer/installer.nsi index ac88aad..115828a 100644 --- a/apps/lutra-desktop/installer/installer.nsi +++ b/apps/lutra-desktop/installer/installer.nsi @@ -867,7 +867,12 @@ Section Uninstall ; Remove shortcuts if not updating ${If} $UpdateMode <> 1 - !insertmacro DeleteAppUserModelId + ; Lutra: the template's `!insertmacro DeleteAppUserModelId` is left out. + ; It clears the Jump List (recent and pinned files) of the app id + ; com.tyrveil.lutra, which every Lutra install shares: uninstalling a + ; second or test install wiped the list of the one still in use. + ; Windows keeps a few kilobytes for the id after the last uninstall and + ; shows them again on a reinstall. ; Remove start menu shortcut !insertmacro MUI_STARTMENU_GETFOLDER Application $AppStartMenuFolder diff --git a/apps/lutra-desktop/src/main.rs b/apps/lutra-desktop/src/main.rs index 8f62368..1512adc 100644 --- a/apps/lutra-desktop/src/main.rs +++ b/apps/lutra-desktop/src/main.rs @@ -408,4 +408,14 @@ mod tests { .collect(); assert_eq!(mac_exts, windows_exts); } + + #[test] + fn the_uninstaller_keeps_the_jump_list_every_install_shares() { + let calls: Vec<&str> = include_str!("../installer/installer.nsi") + .lines() + .map(str::trim) + .filter(|line| line.starts_with("!insertmacro DeleteAppUserModelId")) + .collect(); + assert_eq!(calls, Vec::<&str>::new()); + } } diff --git a/crates/engine/src/settings.rs b/crates/engine/src/settings.rs index 9792f7d..5f4ff5c 100644 --- a/crates/engine/src/settings.rs +++ b/crates/engine/src/settings.rs @@ -723,7 +723,11 @@ mod tests { assert!(s.set(key, json!(1)).is_err()); assert!(DEFS.iter().any(|d| d.key == key && d.info().path)); } - assert!(!DEFS.iter().any(|d| d.key == "editor.fontSize" && d.info().path)); + assert!( + !DEFS + .iter() + .any(|d| d.key == "editor.fontSize" && d.info().path) + ); } #[test]