feat(pi-notifications): use 'tell application' for notifications to suppress Show button

- Tell target app (default: Ghostty) to display notification instead of raw osascript
- This attributes notification to the app, avoiding the 'Show' button that opens Script Editor
- Configurable via PI_NOTIFICATION_APP env var
- test-notify.ts falls back to plain display notification if target app isn't running
- Synced to auto-discovery extension path
This commit is contained in:
2026-04-28 12:56:02 +01:00
parent 383cb46fe7
commit 040513e1d6
4 changed files with 60 additions and 11 deletions
+14 -4
View File
@@ -42,10 +42,20 @@ If `execSync` fails silently, try:
### 2. Check macOS notification settings
The notification might be suppressed by macOS settings:
- System Settings → Notifications → check that "Terminal" or "pi" is allowed
- Check if "Show Notifications on Lock Screen" is enabled
- Check if "Focus Modes" are suppressing notifications
Notifications may be delivered but not shown as banners:
- **System Settings → Notifications → Ghostty → Notification Style** — must be "Banners" or "Alerts", not "None" (osascript fires from the Ghostty process, so macOS attributes notifications to Ghostty, not "pi")
- **System Settings → Focus → [active focus] → Apps** — ensure "Ghostty" is not excluded
- **System Settings → Notifications → Show Notifications on Lock Screen** — enable if needed
**Known symptom:** Notifications appear in Notification Center when pulled down, but never pop up as banners. This is a macOS style setting, not a code issue.
### 3. Ghostty suppresses banners when focused
Ghostty intentionally silences banner notifications (no pop-up, no sound) when the Ghostty window is **active/focused**. The notification is still delivered to Notification Center. Banners only appear when Ghostty is **not** the active window.
**Workarounds:**
- **System Settings → Notifications → Ghostty → Alert Style → "Persistent"** — macOS shows these as banners regardless of Ghostty's silencing
- **Switch to another app** (e.g. leave your browser open) when you want to see the banner
### 3. Try alternative notification methods