Fix: OS notifications never requested permission - #24
Merged
Conversation
macOS silently drops notifications from apps that never requested authorization — cockpit never did, so every send (completion, permission requests, and the Rust poller's, same bundle) vanished. One shared notify() helper requests permission on first use (single in-flight prompt), logs suppression, and both send sites route through it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What broke
No notification ever reached macOS: the app called
sendNotificationwithout ever requesting authorization, which the OS treats as a silent no-op — this muted completion toasts, permission-request alerts, and the background poller's notifications (same app bundle, same grant). Separately, the poller itself defaults to off; enabling it is a Settings choice (notify_poll_secs).Fix
lib/notify.ts:ensureNotificationPermission()(checks, then requests once — single in-flight promise so concurrent callers share one prompt) andnotify(title, body)(best-effort, logs suppression). Both App.tsx send sites route through it; the mount effect bootstraps the permission so the first prompt appears at startup rather than mid-review.Verified
tsc strict · vitest green · vite build. FE-only.
🤖 Generated with Claude Code