Skip to content

Fix: OS notifications never requested permission - #24

Merged
alejandro-nexcade merged 1 commit into
mainfrom
alejandro/notification-permission
Jul 2, 2026
Merged

Fix: OS notifications never requested permission#24
alejandro-nexcade merged 1 commit into
mainfrom
alejandro/notification-permission

Conversation

@alejandro-nexcade

Copy link
Copy Markdown
Collaborator

What broke

No notification ever reached macOS: the app called sendNotification without 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) and notify(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

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>
@alejandro-nexcade
alejandro-nexcade merged commit 957ce1e into main Jul 2, 2026
2 checks passed
@alejandro-nexcade
alejandro-nexcade deleted the alejandro/notification-permission branch July 2, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants