fix(windows): merge taskbar icon (AUMID) + focus window on notification click
Build Lotus Chat Desktop / prepare (push) Successful in 3s
Build Lotus Chat Desktop / build-linux (push) Successful in 24m50s
Build Lotus Chat Desktop / build-windows (push) Successful in 32m26s
Build Lotus Chat Desktop / update-manifest (push) Successful in 4s

Taskbar showed two icons because the AppUserModelID was (a) set too late — after
the main window was built, so its taskbar button grouped under a mismatched
implicit AUMID — and (b) valued 'LotusGuild.LotusChat', which differs from the
bundle identifier 'org.lotusguild.lotus-chat' that Tauri's NSIS installer stamps
on its shortcuts. Fix both: set the AUMID at the top of run() before the window
is built (new set_process_aumid, split out of ensure_app_user_model_id), and
align the constant to the bundle identifier so the running window and a pinned
installer shortcut group together.

Notification click didn't raise the window: add a focus_main_window command
(reuses show_main) for the web/service-worker path, and call show_main directly
in the rich-toast Activated body-click handler.

Note: existing users who pinned the old mis-grouped icon may need to re-pin once.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-15 23:40:57 -04:00
co-authored by Claude Opus 4.8
parent 60526d2a65
commit 33b1a45edd
3 changed files with 58 additions and 18 deletions
+7 -1
View File
@@ -186,7 +186,13 @@ fn show_windows_toast(
.to_string();
super::emit_to_web(&app_activated, "lotus-notification-reply", &payload);
} else {
// Plain body click: forward the launch path so the web routes to it.
// Plain body click: raise the window to the foreground (the
// "foreground" activationType is unreliable for an unpackaged app,
// so do it explicitly), then forward the launch path so the web
// routes to the room. `show_main` is the shared tray/deep-link
// helper. Not done for the reply branch — an inline quick-reply
// shouldn't yank the window forward.
crate::show_main(&app_activated);
let payload = serde_json::json!({
"path": path_owned.as_deref(),
})