Launch-on-login opens the window — add "start minimized to tray" #3

Open
opened 2026-09-17 13:27:07 -04:00 by jared · 0 comments
Owner

Finding (code read 2026-09-17): P6-1 autostart registers the app with no launch args (tauri_plugin_autostart::init(…, None), src-tauri/src/lib.rs), and the main window is created .visible(false) then revealed on the first PageLoadEvent::Finished. So a login-time autostart always pops the full window; there is no way to start straight into the tray.

Scope

  • Register autostart with a --minimized arg (plugin init(…, Some(vec!["--minimized"]))).
  • In on_page_load, skip the first reveal when the arg is present (window stays hidden, tray icon live, sync + notifications running as today when closed-to-tray).
  • Settings → General → Desktop: "Start minimized to tray when launching at login" toggle (writes/clears the arg by re-registering autostart).
  • Single-instance/deep-link paths already call the shared reveal helper — unaffected.

Acceptance

  • Toggle on → log out/in of Windows → Lotus appears only in the tray; clicking the tray icon reveals it. Toggle off → window opens as before.
Finding (code read 2026-09-17): P6-1 autostart registers the app with **no launch args** (`tauri_plugin_autostart::init(…, None)`, `src-tauri/src/lib.rs`), and the main window is created `.visible(false)` then **revealed on the first `PageLoadEvent::Finished`**. So a login-time autostart always pops the full window; there is no way to start straight into the tray. ### Scope - Register autostart with a `--minimized` arg (plugin `init(…, Some(vec!["--minimized"]))`). - In `on_page_load`, skip the first reveal when the arg is present (window stays hidden, tray icon live, sync + notifications running as today when closed-to-tray). - Settings → General → Desktop: "Start minimized to tray when launching at login" toggle (writes/clears the arg by re-registering autostart). - Single-instance/deep-link paths already call the shared reveal helper — unaffected. ### Acceptance - Toggle on → log out/in of Windows → Lotus appears only in the tray; clicking the tray icon reveals it. Toggle off → window opens as before.
jared added this to the Desktop 2026-Q4 milestone 2026-09-17 13:27:07 -04:00
jared added the enhancementpriority: mediumarea: tray labels 2026-09-17 13:27:07 -04:00
jared self-assigned this 2026-09-17 13:27:07 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny-desktop#3