feat(native): register AUMID so Windows rich toasts work (D6)
Build Lotus Chat Desktop / prepare (push) Successful in 3s
Build Lotus Chat Desktop / build-windows (push) Failing after 25m37s
Build Lotus Chat Desktop / build-linux (push) Successful in 25m29s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped

The WinRT rich toast (reply box P5-41, click-to-open-room P5-35) was inert on
Windows: CreateToastNotifier needs the process under an AppUserModelID mapped to
a Start-Menu shortcut, and none was registered — so it errored and silently fell
back to the plain plugin toast.

New native/aumid.rs (Windows-only; no-op elsewhere), called first in
native::setup: (1) SetCurrentProcessExplicitAppUserModelID("LotusGuild.LotusChat"),
(2) install/refresh a Start-Menu "Lotus Chat.lnk" carrying PKEY_AppUserModel_ID,
reusing jumplist.rs's IShellLinkW + IPropertyStore + PROPVARIANT + IPersistFile
pattern (best-effort; failures logged + swallowed). toast.rs now binds the
notifier via CreateToastNotifierWithId(AUMID).

CI-compile-only (windows runner); runtime needs a Windows build to confirm the
toast shows a reply box + opens the room. windows-crate 0.61 symbol assumptions
(IPersistFile, SetCurrentProcessExplicitAppUserModelID, PROPERTYKEY,
GUID::from_u128, CreateToastNotifierWithId) validated by CI — all mirror existing
jumplist.rs usage where possible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 22:32:37 -04:00
co-authored by Claude Opus 4.8
parent 3a48771588
commit f9ed3d7116
3 changed files with 120 additions and 2 deletions
+4
View File
@@ -8,6 +8,7 @@
use tauri::{AppHandle, Manager};
pub mod aumid;
pub mod chrome;
pub mod focus_assist;
pub mod jumplist;
@@ -34,6 +35,9 @@ pub fn emit_to_web(app: &AppHandle, event: &str, detail_json: &str) {
/// listeners or managed state get initialized here. (jumplist/chrome are
/// command-only and need no setup.)
pub fn setup(app: &AppHandle) -> tauri::Result<()> {
// Register the AUMID + Start-Menu shortcut FIRST so the WinRT rich toast can
// create its notifier (before any notification path fires). Best-effort.
aumid::ensure_app_user_model_id(app);
power::setup(app)?;
thumbbar::setup(app)?;
smtc::setup(app)?;