ReviewOS

craft-native/craft

Notifications: no click event, no action buttons — the banner is a dead end

#65
Closed glennmichael123 opened this 10 days ago ·
10 days ago

craft.notifications posts real UNUserNotificationCenter banners, but there is no UNUserNotificationCenterDelegate anywhere in the zig sources — so not even a plain click on a notification reaches the page. No UNNotificationAction/UNNotificationCategory either (repo-wide grep: zero hits), and one trap: bridge_notification.zig:104 documents an \"actionId\": \"open\" field in the show payload that nothing parses.

(The iOS template does register a response handler — CraftApp.swift:55 — desktop never got it.)

Ask, in two stages:

  1. Click-through (small): install a center delegate, implement didReceiveNotificationResponse:, emit craft:notification:click with the notification id. Also lets show honor or delete the documented-but-dead actionId.
  2. Action buttons: accept actions: [{id, label}] on show/schedule, register a UNNotificationCategory per shape, and emit craft:notification:action with {notificationId, actionId} on response.

The concrete use case waiting on stage 2 (stacksjs/harness): an AI agent requests tool approval while the user is in another app — "Claude wants to run rm -rf build/ — Approve / Deny" as notification buttons means approving without switching apps.

🤖 Generated with Claude Code

Sign in to comment on this issue.