SIGN IN SIGN UP

fix(notification): deliver macOS notifications under codeg's own identity

`NSUserNotification` has no concept of an unbundled process, so
`mac-notification-sys` swizzles `-[NSBundle bundleIdentifier]` and macOS files
the notification — along with its permission, its icon and its System Settings
page — under whatever bundle id that returns. This code asked for
`com.apple.Terminal` in dev builds, copying `tauri-plugin-notification`, so a
dev build's notifications needed Terminal's notification permission, which most
users have never granted. Nothing appeared, and the codeg switches the user
could see governed nothing.

The identity is now always this app's own identifier. When that id is not
registered with LaunchServices, `setApplication` leaves `fakeBundleIdentifier`
nil and the crate's swizzle serves `com.apple.Terminal` by itself, so a
checkout that was never installed keeps the old behaviour — and a new
`notification_identity` command reports which of the two happened. Recording
that first outcome is what `let _ = set_application(..)` could not do: the
crate guards the setter with a `Once` that answers `AlreadySet` forever after,
including after a failure, so a caller that drops the first result can never
learn it again.

Settings → General names the app notifications are filed under, in amber when
that is not codeg — the case where every switch on codeg's own notification
page is inert. Reported on macOS only, because it is the only platform where
we impersonate: Linux posts under the name we pass, and on Windows the plugin
assigns the AppUserModelID only outside `target/debug|release`, so a dev
build's real identity is not something we can read back and claiming one would
be inventing a fact.

"Open system settings" appends `?id=<bundle-id>` and lands on that app's own
notification page instead of the list of every app on the machine — targeting
the identity actually delivering, since sending the user to codeg's page while
another app receives the notifications would point them at switches that change
nothing.
X
xintaofei committed
93892a0e8bb558120e48458ac88ba9ae29785972
Parent: f558c56