feat(notify): file-based diagnostic logging for the Windows toast issue (#3)#5
Merged
Merged
Conversation
…ue (#3) v0.3.2 registered the AUMID (the reporter confirmed Get-StartApps + the HKCU key) but toasts still don't render on Windows 11, and there's no signal as to why: a GUI-subsystem build has no console, so the v0.3.2 eprintln! went nowhere (the reporter's stdout/stderr redirect captured nothing). Worse, the notification plugin's show() dispatches the toast on a detached task and discards its result, so the plugin can never report a failure upward. Add a tiny dlog module that writes a per-launch (truncated) session log to %LOCALAPPDATA%\whatRust\logs\whatrust.log (and the XDG data dir on Linux), and record the notification control flow: - aumid::register — the real, un-swallowed HRESULTs of the registry write and SetCurrentProcessExplicitAppUserModelID; - commands::notify — whether the command is invoked at all and whether a gate (locked / notifications-disabled) suppressed it; - notify::show — that dispatch was reached. No message titles/bodies are logged (no PII). This disambiguates the remaining hypotheses in one build: if "commands::notify invoked" never appears when a message arrives, the page used a path our window.Notification shim doesn't intercept (e.g. the service-worker showNotification); if it appears but no toast shows, the failure is in the Windows toast layer. Pairs with a standalone PowerShell toast test (posted on #3) that checks whether the AUMID can render a banner independent of the app. No speculative shortcut/COM code until the logs tell us where it breaks. Ships as v0.3.3. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re #3 — toasts still don't appear on Windows 11 after v0.3.2, and we have no signal as to why.
Why a diagnostic build
Two things hide the failure today:
eprintln!is invisible — the reporter ran the release exe from PowerShell with stdout/stderr redirected and captured nothing.tauri-plugin-notification'sshow()dispatches the actual WinRT toast on a detached async task and discards itsResult, so a failure can never propagate up to our code.What this adds
A tiny
dlogmodule writing a per-launch (truncated) session log to%LOCALAPPDATA%\whatRust\logs\whatrust.log(XDG data dir on Linux), recording the notification control flow — no message content (no PII):aumid::register— the real, un-swallowed HRESULTs of the registry write +SetCurrentProcessExplicitAppUserModelID.commands::notify— whether the command is invoked at all, and whether a gate (locked / notifications-disabled) suppressed it.notify::show— that dispatch was reached.This disambiguates the remaining hypotheses in one build:
commands::notify invokednever appears when a message arrives → the page used a path ourwindow.Notificationshim doesn't intercept (e.g. service-workershowNotification);Paired with a standalone PowerShell toast test (posted on #3) that checks whether the AUMID can render a banner independent of our app. No speculative shortcut/COM code until the logs say where it breaks.
Testing
cargo check/clippy/test --locked(Linux) — pass.#[cfg(windows)]aumidmodule (thematchrestructure around the samewindows-rs calls) cross-compiles clean forx86_64-pc-windows-gnu; CIwindows-latestis the full gate.dlog::init()runs, and the log file is written end-to-end (=== session start ===).Ships as v0.3.3 (diagnostic release).
🤖 Generated with Claude Code