Originally created by: kristofferR
The requestAuthorizationWithOptions completion handler discarded both granted and the NSError, so an authorization failure left no trace in Carrier.log and presented in the field as "badges work but no banners appear".
This bit for real today: two still-mounted release DMGs had the bundle id registered at three LaunchServices paths, which made UNUserNotificationCenter authorization fail silently — Carrier never registered under System Settings → Notifications at all. Nothing in the app log pointed at notifications.
Now the handler logs the outcome:
warn with the localized descriptionwarn ("banners will not show")infoGate: cargo fmt / clippy -D warnings / cargo test --lib (60 pass) and bun run check all green.
https://claude.ai/code/session_01Y9cdpfYQpJmvFDcFu5VUux
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Ticket changed by: kristofferR
Originally posted by: coderabbitai[bot]
ℹ️ Recent review info
⚙️ Run configuration
**Configuration used**: Path: .coderabbit.yaml **Review profile**: ASSERTIVE **Plan**: Pro **Run ID**: `efc7adbc-3eec-4c0e-936e-1a0223d7cb6e`📥 Commits
Reviewing files that changed from the base of the PR and between [252410] and 94b1754730994f90ea9667846602407b1329df35.📒 Files selected for processing (1)
* `src-tauri/src/macos/notifications.rs`📝 Walkthrough
## Walkthrough The authorization request completion handler in `setup_macos_notifications` was changed from a no-op closure to one that logs the outcome, inspecting the `granted` flag and an optional `NSError*` to log failure, success, or denial messages. ### Changes **Notification authorization logging** |Layer / File(s)|Summary| |---|---| |**Authorization completion handler logging**`src-tauri/src/macos/notifications.rs`|The completion closure now unsafely reads the optional NSError, logs a failure with its localized description on error, logs success when granted with no error, and logs denial otherwise; comments explain safety assumptions about the error pointer and grant persistence.| **Estimated code review effort:** 1 (Trivial) | ~5 minutes **Possibly related PRs** - [[kristofferR/Carrier#11](https://github.com/kristofferR/Carrier/issues/11)](https://github.com/kristofferR/Carrier/pull/11): Related macOS badge authorization request flow and outcome handling. - [[kristofferR/Carrier#34](https://github.com/kristofferR/Carrier/issues/34)](https://github.com/kristofferR/Carrier/pull/34): Refactors macOS notifications and the authorization flow in the same `setup_macos_notifications` function.
✨ Finishing Touches
📝 Generate docstrings
- [ ] Create stacked PR - [ ] Commit on current branch🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests - [ ] Commit unit tests in branch `log-notification-authorization`Comment
@coderabbitai helpto get the list of available commands.