Skip to content

Windows toast activation support#229

Merged
Choochmeque merged 8 commits into
mainfrom
windows-push
Jun 9, 2026
Merged

Windows toast activation support#229
Choochmeque merged 8 commits into
mainfrom
windows-push

Conversation

@Choochmeque

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 9, 2026 18:27
@Choochmeque
Choochmeque merged commit 06bbf8f into main Jun 9, 2026
14 checks passed
@Choochmeque
Choochmeque deleted the windows-push branch June 9, 2026 18:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Windows toast activation support for the notifications plugin by registering an out-of-proc COM toast activator (for Action Center / cold-start activation) and wiring it into the existing listener/event system, with configuration provided via tauri.conf.json.

Changes:

  • Introduces a Windows COM activator (INotificationActivationCallback) + class factory registration and a buffer for cold-start click events.
  • Adds typed plugin configuration (PluginConfig / WindowsConfig) to carry the toast activator CLSID into Windows initialization.
  • Updates the demo app to include Windows bundle/manifest configuration and a build helper for generating MSIX-related artifacts.

Reviewed changes

Copilot reviewed 9 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/windows.rs Registers COM toast activator and buffers/drains cold-start click payloads.
src/listeners.rs Drains buffered Windows click payloads when notificationClicked listener registers.
src/lib.rs Adds typed plugin config and passes Windows config into Windows init.
examples/notifications-demo/src-tauri/tauri.conf.json Adds plugin config for the toast activator CLSID in the demo.
examples/notifications-demo/src-tauri/gen/windows/bundle.config.json Adds Windows bundle/extension config for toast activation in the demo.
examples/notifications-demo/src-tauri/gen/windows/AppxManifest.xml.template Adds a manifest template used by the demo’s Windows bundling flow.
examples/notifications-demo/src-tauri/gen/windows/.gitignore Adds a gitignore placeholder for the demo’s generated Windows files.
examples/notifications-demo/pnpm-lock.yaml Locks new demo dependency used for Windows bundling.
examples/notifications-demo/package.json Adds a Windows bundling build script + dependency for the demo.
Cargo.toml Enables required Windows Win32 APIs and adds windows-core + uuid for COM activator support.
Files not reviewed (1)
  • examples/notifications-demo/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/windows.rs
Comment on lines +126 to +129
/// Build the activation payload JSON consumed by both the in-process
/// `ToastNotification.Activated` handler and the COM activator. Kept here so
/// warm and cold paths emit byte-identical event shapes — the JS side can't
/// distinguish them.
Comment thread src/windows.rs
Comment on lines +179 to +183
if let Some(plugin) = self.plugin.upgrade() {
if let Ok(mut buf) = plugin.pending_clicks.write() {
buf.push(click_payload);
}
}
Comment thread src/windows.rs
Comment on lines +172 to +173
if invoked.is_empty() {
let click_payload = serde_json::json!({ "id": serde_json::Value::Null, "data": {} });
Comment on lines +1 to +2
# Generated files
# Keep bundle.config.json and templates in git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants