Menu

#418 feat(setup): notifications permission card in the onboarding wizard

closed
nobody
None
2026-07-09
2026-07-09
Anonymous
No

Originally created by: Akarsh-Hegde

Why

The tray already fires request_permission() on every bundled launch (lib.rs), so the one-shot macOS notification dialog appears at first launch — but beside the wizard, with no context. If the user denies it (or dismisses it unanswered and later denies), there is no recovery surface anywhere in the product: toasts silently never show, and the only trace is a log line. With interactive nudges now the main proactive channel (#392: plan nudge, worklog-ready, snooze buttons), that silent-deny hole matters.

What

Rust (tray)

  • check_notifications / request_notifications commands (commands/setup.rs) — return the tri-state authorization as granted / denied / prompt, or unavailable on unbundled runs (the plugin registers only inside a .app, per NOTIFICATIONS.md gotcha 4). Tri-state because deny vs not-yet-asked need different grant actions: macOS shows the dialog exactly once.
  • Pure notification_state_label mapper + unit test.
  • open_permission_pane gains a notifications pane (bare pane, no per-app anchor — undocumented and version-inconsistent) — the deny recovery path.
  • sys::notifier widened to pub(crate) so the probe shares the one plugin lookup.

Wizard (ui/app/setup)

  • New Notifications card on the Permissions step, marked OPTIONAL (the three TCC grants keep REQUIRED); it never gates Continue.
  • Button behaviour: promptAllow (surfaces the OS dialog via request_notifications); deniedOpen Settings (deep-links the Notifications pane). Granted state joins the existing 2 s poll, so toggling in System Settings reflects live.
  • Card hides entirely when unavailable (tauri dev) instead of dead-ending.
  • PermissionMeta gains required; new bell PermIcon.

Verification

  • cargo clippy --all-targets -- -D warnings clean; cargo test 51/51 (incl. new mapper test)
  • ui: npm run build (static export) clean; bun test 243/243
  • Interactive behaviour needs a packaged build (plugin gotcha 4) — needs a staging build to verify the dialog/Settings paths end-to-end

🤖 Generated with Claude Code

https://claude.ai/code/session_01NUNrrP7ie4eeJKGPV6EXNp

Related

Tickets: #425
Tickets: #440

Discussion

  • Anonymous

    Anonymous - 2026-07-09

    Originally posted by: coderabbitai[bot]

    [!IMPORTANT]

    Review skipped

    Auto reviews are disabled on base/target branches other than the default branch.

    Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.


    ⚙️ Run configuration

    Configuration used: Organization UI

    Review profile: ASSERTIVE

    Plan: Pro Plus

    Run ID: 33747e4b-e1ce-4caa-8b73-e31ad6122a2d

    You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

    Use the checkbox below for a quick retry:
    - [ ] 🔍 Trigger review

    ✨ Finishing Touches
    🧪 Generate unit tests (beta) - [ ] Create PR with unit tests - [ ] Commit unit tests in branch `feat/setup-notifications-card`

    Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

    ❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

    Comment @coderabbitai help to get the list of available commands.

     
  • Anonymous

    Anonymous - 2026-07-09

    Ticket changed by: Akarsh-Hegde

    • status: open --> closed
     

Log in to post a comment.