[Bug]: macOS notification permission is never actually requested — notificationPermissionRequested flag is set without the OS prompt appearing
- Dominant language
- TypeScript
- Stars
- 69.7k
- Forks
- 4.5k
- Avg merge
- 16h 8m
- Merged PRs (30d)
- 451
Description
### Operating system
macOS
### Orca version
v1.4.161 (macOS 26.5.2, build 25F84, Apple Silicon; bundle id `com.stablyai.orca`)
### Details
Short summary:
Orca shows notifications as "enabled" in Settings → Notifications (and the onboarding "Turn on notifications" step shows completed), but the app is **not registered in macOS Notification Center at all** — it does not appear in System Settings → Notifications, and `defaults read com.apple.ncprefs apps` contains no `com.stablyai.orca` entry. As a result, no desktop notifications are ever delivered (including the "Send test notification" button).
Resetting the one-time flag `ui.notificationPermissionRequested` to `false` in `orca-data.json` (the gate related to PR #7684) does **not** fix it: on next launch Orca flips the flag back to `true`, but the macOS permission prompt never appears and the app still never registers with Notification Center. The permission-request path appears to mark itself as done while silently failing to perform the actual OS-level registration.
How can we reproduce it?
1. Quit Orca completely (verified via `pgrep` — only the login daemon remains running).
2. In `~/Library/Application Support/orca/profiles/local-default/orca-data.json`, set `ui.notificationPermissionRequested` to `false`.
3. Launch Orca, open the onboarding checklist → "Turn on notifications", and press "Send test notification" in Settings → Notifications.
Expected:
The macOS notification permission prompt appears (or at minimum the app registers with Notification Center), `com.stablyai.orca` shows up in System Settings → Notifications, and the test notification is delivered.
Actual:
- No macOS prompt ever appears.
- The onboarding step immediately shows completed / "Notifications enabled".
- `ui.notificationPermissionRequested` is set back to `true` on launch.
- `defaults read com.apple.ncprefs apps | grep -i stably` → no match (no `orca` match either).
- Test notification produces nothing.
- Orca's `main.trace.ndjson` contains no notification/permission-related entries, and the unified log (`log show --predicate 'process == "usernoted"'`) shows no registration attempt from `com.stablyai.orca` during the test window.
Anything else that might help:
- In-app state (`settings.notifications.enabled: true`) is out of sync with actual OS registration, so the UI reports success while delivery is impossible.
- Because the flag is one-shot and is re-set to `true` even when registration fails, users have no in-app path to recover. Suggestion: only persist the flag after the OS request actually completes (success or explicit user denial), and surface the unregistered state in the UI instead of "enabled".
- Workarounds attempted (all failed): app restart, test-notification button, onboarding step re-run, manual flag reset as described above.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Contributor guide
Assessment
This issue has not been assessed yet.