Skip to content

Commit 3589226

Browse files
fix(desktop): use safe Windows registration and durable notification delivery
Replace raw notification registration FFI with WinSafe and forbid unsafe code in the notification module. Preserve existing notification opt-outs and shortcut arguments, with native regression tests. Fence feed and live deliveries on current settings, persist bounded DM/thread retry records, and test Windows activation drains even when listener setup fails. Revert the AGENTS.md addition from 91c3809; local Windows guidance stays excluded. Signed-off-by: Bernhard Kaindl <[email protected]>
1 parent e520143 commit 3589226

11 files changed

Lines changed: 890 additions & 281 deletions

‎AGENTS.md‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,6 @@ lane subprocesses resolve the pinned flutter/dart/lefthook even when an
142142
unactivated shell has Homebrew first. Activating Hermit remains recommended for
143143
non-hook commands.
144144

145-
**Windows tool resolution:** the committed files under `bin\` (for example
146-
`bin\cargo`, `bin\rustc`, `bin\pnpm`, and `bin\node`) are Hermit package
147-
entries, not native Windows executables. Do not invoke those paths directly,
148-
and do not assume a bare command is valid when `Get-Command` resolves it into
149-
the repository's `bin\` directory. For Windows validation, run the actual
150-
installed `.exe`/`.cmd` tools, or use their full paths, and verify the resolved
151-
`Source` is not under this repository before running a build or test.
152-
153145
**Commit with `git commit -s`.** The required **DCO Check** fails any PR with a commit missing a `Signed-off-by` trailer, and `just hooks` installs a `commit-msg` hook that adds it to commits you create locally (`git rebase` and `git cherry-pick` still need `--signoff`) — if you build commit commands programmatically, include `-s` every time. To repair a branch that already has unsigned commits: `git rebase --signoff main`, then force-push.
154146

155147
Additional rules:

‎desktop/src-tauri/Cargo.lock‎

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎desktop/src-tauri/Cargo.toml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ user-idle = { version = "0.6", default-features = false }
6363
plist = "1"
6464

6565
[target.'cfg(windows)'.dependencies]
66-
windows-sys = { version = "0.61", features = ["Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Diagnostics_ToolHelp", "Win32_System_JobObjects", "Win32_System_Registry", "Win32_System_Threading", "Win32_Foundation", "Win32_UI_Shell"] }
66+
windows-sys = { version = "0.61", features = ["Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Diagnostics_ToolHelp", "Win32_System_JobObjects", "Win32_System_Registry", "Win32_System_Threading", "Win32_Foundation"] }
6767
keyring = { version = "3.6.3", default-features = false, features = ["windows-native", "vendored"], optional = true }
6868
user-idle = { version = "0.6", default-features = false }
6969
# Native Windows toast notifications so the app registers with Windows Settings
7070
# > System > Notifications and click actions work through WinRT.
7171
tauri-winrt-notification = "0.7"
72-
windows = { version = "0.61", features = ["UI_Notifications", "Win32_Foundation", "Win32_Storage_EnhancedStorage", "Win32_System_Com", "Win32_System_Com_StructuredStorage", "Win32_UI_Shell", "Win32_UI_Shell_PropertiesSystem"] }
72+
winsafe = { version = "0.0.29", features = ["advapi", "shell"] }
73+
windows = { version = "0.61", features = ["UI_Notifications"] }
7374

7475
[dependencies]
7576
atomic-write-file = "0.3"

0 commit comments

Comments
 (0)