diff --git a/CHANGELOG.md b/CHANGELOG.md index 1211a24..57ddf14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- Desktop: a second start at logon (`--hidden`, e.g. a Startup folder shortcut next to the Run entry) keeps the app in the tray instead of opening its window. + ## 0.8.62 ยท 2026-10-29 - `doctor` warns when storebound runs from a folder macOS guards (~/Desktop, ~/Documents, ~/Downloads, iCloud Drive; e.g. a `bun link` to a checkout there): a launchd job or CI agent without access to it blocks in open() with no output. diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs index 0e55f5c..17627f4 100644 --- a/apps/desktop/src-tauri/src/lib.rs +++ b/apps/desktop/src-tauri/src/lib.rs @@ -322,8 +322,9 @@ pub fn run() { early_trace(); linux_webkit_env(); let app = tauri::Builder::default() - // single-instance first: a second start (or a storebound:// link) focuses the running app instead - .plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| show_main(app))) + // single-instance first: a second start (or a storebound:// link) focuses the running app instead; a second + // logon start (--hidden: the Run entry plus a Startup folder shortcut) stays in the tray + .plugin(tauri_plugin_single_instance::init(|app, argv, _cwd| if !argv.iter().any(|a| a == "--hidden") { show_main(app) })) .plugin(tauri_plugin_deep_link::init()) // never restore "visible": a --hidden start would otherwise pop the window up .plugin(tauri_plugin_window_state::Builder::new().with_filter(|label| !label.starts_with(menu_panel::LABEL_PREFIX)).with_state_flags(tauri_plugin_window_state::StateFlags::all() & !tauri_plugin_window_state::StateFlags::VISIBLE).build())