Skip to content

fix(desktop): use native system notifications - #109901

Merged
steipete merged 3 commits into
mainfrom
codex/tauri-native-notifications
Jul 17, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/tauri-native-notifications

Conversation

@steipete

@steipete steipete commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Tauri desktop companion rendered approval and update alerts through a generic desktop notification path. On macOS that looked like a fake app window instead of a real Notification Center alert.

Why This Change Was Made

The companion now uses tauri-plugin-notifications from current upstream main, pinned to an immutable commit:

  • macOS uses Swift UNUserNotificationCenter.
  • Windows uses notify-rust's WinRT system-toast adapter. Source builds omit the installed app identifier, while installed builds use OpenClaw's identifier.
  • Linux keeps its existing notify-rust desktop notification service.

The dependency pin includes upstream main after 0.5.0-rc.11 plus the focused Swift 6.4 release-linking repair proposed in upstream PR #269. The OpenClaw pin can return to upstream after that repair lands.

Unbundled macOS development binaries skip plugin initialization because Apple's notification framework requires a real app-bundle identity. Signed .app bundles retain the normal permission request and notification flow.

Compatibility decision: the macOS deployment minimum moves from 10.13 to 13.0 because macOS 13 is the upstream plugin's supported Swift package contract. We intentionally use that maintained contract instead of carrying an unsupported lower-deployment fork.

User Impact

macOS alerts now appear as native Notification Center notifications. Windows uses native system toasts. Linux behavior stays unchanged.

AI-assisted: yes. I reviewed the implementation, dependency source, and platform behavior.

Evidence

  • macOS: optimized Developer ID-signed .app built successfully with Swift 6.4; signature and exact dependency linkage verified. A real OpenClaw approval notification was observed in Notification Center through the production notification path.
  • Windows Server 2022 / MSVC at exact PR head: feature graph selected notify-rust/WinRT; all 34 unit tests passed; optimized executable built at 16,093,696 bytes; native NSIS installer built at 3,716,021 bytes.
  • Linux: optimized deb and AppImage bundles built successfully on Ubuntu 22.04 in exact-head hosted proof.
  • Full exact-head hosted checks: 69 successful, 0 failed in CI.
  • macOS Rust proof: cargo fmt --check, cargo check --locked, and all 34 unit tests passed.
  • Target feature graphs verified that macOS excludes notify-rust, while Windows and Linux select it.
  • Fresh autoreview: clean, no accepted or actionable findings.

Root CHANGELOG.md is release-owned; release-note context is recorded here.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3714d91bab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CHANGELOG.md Outdated

### Fixes

- **Desktop notification integration:** use native macOS and Windows notifications in the Tauri companion while retaining the Linux desktop notification backend.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Remove the hand-written changelog entry

Root AGENTS.md says CHANGELOG.md is release-only and that normal fixes/direct main commits should keep release-note context in the PR body, squash message, or commit metadata instead. This manual Unreleased line creates maintainer release-process risk because the release generator owns this file and can duplicate or overwrite hand-added entries, so this notification note should be removed from the changelog and kept in the commit/PR metadata.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Jul 17, 2026
@clawsweeper

clawsweeper Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 6:10 AM ET / 10:10 UTC.

Summary
The branch replaces the Tauri desktop companion’s generic notification plugin with native macOS and Windows implementations, retains the Linux backend, and updates initialization, platform metadata, documentation, and Rust dependencies.

PR surface: Docs +3, Other +200. Total +203 across 7 files.

Reproducibility: no. the evidence proves compilation and linkage but does not reproduce the claimed backend problem on current main or demonstrate an actual native notification after the change.

Review metrics: 3 noteworthy metrics.

  • macOS support floor: 1 changed: 10.13 default → 13.0. This changes which existing installations can run the desktop companion after an upgrade.
  • Rust package MSRV: 1 changed: 1.77.2 → 1.93. Builders and downstream packagers must update their Rust toolchain to compile this application.
  • Dependency source: 1 changed: crates.io release → immutable personal-fork commit. Executable supply-chain ownership and the eventual return-to-upstream path need explicit review.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦐 gold shrimp
Patch quality: 🦐 gold shrimp
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted macOS and Windows screenshots or recordings showing an actual native notification after the change.
  • [P1] Resolve the macOS support-floor decision and prove both fresh-install and upgrade behavior.
  • Gate or fall back for unpackaged Windows runs and document the temporary fork's audited upstream delta.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: Linked build artifacts establish compilation and packaging, but the PR still needs redacted macOS and Windows evidence showing an actual after-fix native notification; updating the PR body should trigger review, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Existing desktop-companion users on macOS 10.13–12 could be unable to install or launch the next build because the bundle floor changes to macOS 13.0.
  • [P1] Unpackaged Windows development runs may fail during plugin setup or be unable to deliver notifications because they lack the installer-created AUMID registration expected by the native backend.
  • [P1] Shipping a contributor-owned fork as executable desktop code creates an ongoing provenance and replacement obligation until the required upstream fix is merged and pinned directly.

Maintainer options:

  1. Repair platform and dependency boundaries (recommended)
    Preserve or explicitly approve the macOS floor, handle unpackaged Windows safely, remove the changelog edit, and provide live notification proof before merge.
  2. Accept the compatibility change
    Maintainers may deliberately adopt macOS 13 and the temporary fork after documenting the upgrade impact and recording ownership for returning to upstream.
  3. Wait for upstream
    Pause this PR until the Swift linking fix lands upstream so OpenClaw can pin the maintained source directly and reassess the required macOS floor.

Next step before merge

  • [P1] A maintainer must decide the macOS support policy and approve the temporary dependency source before the contributor resolves the concrete platform findings and supplies live proof.

Maintainer decision needed

  • Question: Should the desktop companion intentionally raise its supported macOS floor from 10.13 to 13.0 in order to adopt this notification backend?
  • Rationale: That compatibility reduction is a product and release decision, not an implementation detail, and the PR does not establish an existing documented macOS 13 baseline.
  • Likely owner: steipete — The available history connects this person to the desktop companion direction and the proposed dependency/platform choices.
  • Options:
    • Preserve current support (recommended): Keep the existing macOS compatibility floor and adjust, patch, or conditionally select the notification backend so older supported systems still launch.
    • Approve macOS 13 minimum: Accept the platform drop only with explicit release documentation and upgrade proof showing how existing macOS 10.13–12 installations behave.

Security
Needs attention: The immutable revision prevents drift, but executable desktop code now comes from a personal fork whose upstream delta and replacement plan require maintainer sign-off.

Review findings

  • [P1] Preserve the existing macOS support floor — apps/linux/src-tauri/tauri.conf.json:87
  • [P2] Handle unpackaged Windows before registering the plugin — apps/linux/src-tauri/src/notify.rs:7-11
  • [P2] Remove the hand-written changelog entry — CHANGELOG.md:45
Review details

Best possible solution:

Use the native backends without silently reducing supported macOS versions, detect or safely fall back for unpackaged Windows runs, pin a reviewed upstream or published dependency, remove the changelog edit, and attach live macOS and Windows notification proof.

Do we have a high-confidence way to reproduce the issue?

No; the evidence proves compilation and linkage but does not reproduce the claimed backend problem on current main or demonstrate an actual native notification after the change.

Is this the best way to solve the issue?

No; selecting native services is reasonable, but the best fix must preserve an approved platform baseline, cover unpackaged Windows behavior, and avoid an indefinite personal-fork dependency.

Full review comments:

  • [P1] Preserve the existing macOS support floor — apps/linux/src-tauri/tauri.conf.json:87
    Setting minimumSystemVersion to 13.0 changes Tauri's previous 10.13 default, so macOS 10.13–12 users can no longer install or launch the updated companion. Remove this floor or obtain an explicit platform-support decision with documented upgrade behavior before merging.
    Confidence: 0.98
  • [P2] Handle unpackaged Windows before registering the plugin — apps/linux/src-tauri/src/notify.rs:7-11
    notifications_supported() only rejects unbundled macOS, so ordinary Windows development runs always initialize the native backend. That backend uses CreateToastNotifierWithId for unpackaged processes and requires a Start Menu-registered AUMID, which cargo run does not provide; gate this path or retain a safe development fallback so startup and notifications remain usable.
    Confidence: 0.91
  • [P2] Remove the hand-written changelog entry — CHANGELOG.md:45
    CHANGELOG.md is release-owned in this repository, and the PR body already carries the needed release-note context. Keeping this Unreleased line risks duplication or overwrite by the release generator, so remove it from this branch.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against f82511762ff1.

Label changes

Label changes:

  • add P1: The patch can break upgrades for existing macOS users and can impair a supported Windows development workflow.
  • add merge-risk: 🚨 compatibility: Setting the bundle minimum to macOS 13.0 removes the Tauri default support for macOS 10.13–12.
  • add merge-risk: 🚨 security-boundary: Desktop binaries begin compiling and executing code from a personal fork rather than the previously published registry dependency.
  • add merge-risk: 🚨 availability: The native Windows plugin is registered for unpackaged runs even though its notifier path requires installer-managed application identity.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Linked build artifacts establish compilation and packaging, but the PR still needs redacted macOS and Windows evidence showing an actual after-fix native notification; updating the PR body should trigger review, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P1: The patch can break upgrades for existing macOS users and can impair a supported Windows development workflow.
  • merge-risk: 🚨 compatibility: Setting the bundle minimum to macOS 13.0 removes the Tauri default support for macOS 10.13–12.
  • merge-risk: 🚨 availability: The native Windows plugin is registered for unpackaged runs even though its notifier path requires installer-managed application identity.
  • merge-risk: 🚨 security-boundary: Desktop binaries begin compiling and executing code from a personal fork rather than the previously published registry dependency.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Linked build artifacts establish compilation and packaging, but the PR still needs redacted macOS and Windows evidence showing an actual after-fix native notification; updating the PR body should trigger review, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Docs +3, Other +200. Total +203 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 2 3 0 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 5 274 74 +200
Total 7 277 74 +203

Security concerns:

  • [medium] Temporary fork becomes executable supply-chain input — apps/linux/src-tauri/Cargo.toml:25
    The desktop app switches from a published registry crate to a personal fork while the required upstream change is still pending; record the audited delta and owner for replacing this pin, or pin the maintained upstream source once available.
    Confidence: 0.9

What I checked:

  • macOS compatibility change: The patch sets minimumSystemVersion to 13.0; Tauri defaults this field to 10.13, so the resulting bundle no longer supports macOS 10.13 through 12. (apps/linux/src-tauri/tauri.conf.json:87, c0767e627701)
  • Windows initialization path: The new registration helper skips initialization only for unbundled macOS, so every Windows run registers the native backend, including ordinary unpackaged development executions. (apps/linux/src-tauri/src/notify.rs:7, c0767e627701)
  • Dependency contract: The pinned Windows backend uses CreateToastNotifierWithId for unpackaged processes and documents that this path is valid only when the AUMID is registered through a Start Menu shortcut; a normal cargo run does not establish that installer-owned identity. (apps/linux/src-tauri/Cargo.toml:25, c0767e627701)
  • Release-owned changelog: The current head still adds a hand-written Unreleased entry even though repository policy reserves CHANGELOG.md for the release process; the existing review comment already requested its removal. (CHANGELOG.md:45, c0767e627701)
  • Behavior proof gap: The PR supplies successful macOS, Windows, and Linux builds plus linkage information, but no screenshot, recording, logs, or live output showing an after-fix native notification being delivered. (c0767e627701)
  • Supply-chain source change: The registry dependency is replaced by an immutable commit from a personal fork while the stated upstream linking fix remains unmerged; the pin prevents revision drift but still requires explicit provenance and replacement ownership. (apps/linux/src-tauri/Cargo.toml:25, c0767e627701)

Likely related people:

  • steipete: Opened the longstanding Linux/Windows desktop-app tracking issue, is active in current OpenClaw feature history, and owns the platform and dependency choices proposed here beyond merely submitting this branch. (role: desktop companion feature owner; confidence: medium; commits: 3714d91bab50, c0767e627701; files: apps/linux/src-tauri/src/notify.rs, apps/linux/src-tauri/src/main.rs, apps/linux/src-tauri/Cargo.toml)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94f19c4c1f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

tauri-plugin-notifications = { git = "https://github.com/steipete/tauri-plugin-notifications.git", rev = "d20b4ff0e0e327e49fee80903478f825eac5a71a", default-features = false }

[target.'cfg(target_os = "windows")'.dependencies]
tauri-plugin-notifications = { git = "https://github.com/steipete/tauri-plugin-notifications.git", rev = "d20b4ff0e0e327e49fee80903478f825eac5a71a" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Disable notify-rust for the Windows target

When building the Windows test bundle, this dependency line leaves the plugin's default notify-rust feature enabled. In the pinned plugin, the native Windows implementation is only compiled under cfg(target_os = "windows", not(feature = "notify-rust")), while the default feature routes desktop calls through the desktop/notify-rust backend (whose permission check returns granted). This means Windows builds do not use the new native Toast API path added by the dependency; mirror the macOS dependency and set default-features = false for Windows.

Useful? React with 👍 / 👎.

@steipete steipete changed the title fix(desktop): notifications use native macOS and Windows services fix(desktop): use native system notifications Jul 17, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addressed the prior findings:

  • Windows now selects the notify-rust/WinRT system-toast backend, avoiding the advanced unpackaged AUMID requirement; exact-head Windows tests and NSIS packaging pass.
  • The macOS 13 compatibility decision and upstream contract are explicit in the PR body and README.
  • The normal-PR changelog edit is removed.
  • Signed macOS live Notification Center proof and exact-head cross-platform evidence are recorded in the PR body.

@clawsweeper

clawsweeper Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@steipete
steipete merged commit c3f5526 into main Jul 17, 2026
97 checks passed
@steipete
steipete deleted the codex/tauri-native-notifications branch July 17, 2026 11:24
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 18, 2026
* fix(desktop): use native system notifications

* fix(desktop): declare notification dependency MSRV

* fix(desktop): select notification backends per platform
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
* fix(desktop): use native system notifications

* fix(desktop): declare notification dependency MSRV

* fix(desktop): select notification backends per platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: linux maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant