Skip to content

NUB-NOTIFY: shell-rendered notifications#11

Open
dskvr wants to merge 2 commits into
masterfrom
nub-notify
Open

NUB-NOTIFY: shell-rendered notifications#11
dskvr wants to merge 2 commits into
masterfrom
nub-notify

Conversation

@dskvr
Copy link
Copy Markdown
Contributor

@dskvr dskvr commented Apr 9, 2026

Namespace: window.napplet.keys
Discovery: window.napplet.shell.supports("keys")
Status: draft

Summary

NUB-NOTIFY defines the notify domain for the napplet wire protocol. Napplets send notification requests to the shell; the shell renders them using its own UI (toasts, system notifications, badge counts) and routes user interaction back to the napplet.

Wire Protocol

11 message types across two directions:

Napplet -> Shell:

  • notify.send / notify.send.result -- send a notification (correlated)
  • notify.dismiss -- dismiss by ID (fire-and-forget)
  • notify.badge -- set badge count (fire-and-forget)
  • notify.channel.register -- register a notification channel (fire-and-forget)
  • notify.permission.request / notify.permission.result -- request permission (correlated)

Shell -> Napplet:

  • notify.action -- user clicked an action button
  • notify.clicked -- user clicked the notification body
  • notify.dismissed -- notification was dismissed (user/timeout/replaced)
  • notify.controls -- shell pushes supported notification capabilities

Key Design Decisions

  • Shell-rendered: napplets never render notifications directly
  • Priority levels: low, normal, high, urgent
  • Channels: napplets register named channels for per-category user control
  • Permission flow: explicit request/grant before sending (shell MAY auto-grant)
  • Actions: up to 3 buttons per notification with callback routing

Implementations

  • (none yet)

References

  • NIP-5D: Core napplet protocol

dskvr and others added 2 commits April 9, 2026 15:29
Defines the notify NUB domain for napplet-to-shell notification delivery.
Napplets send notification requests; the shell renders toasts, badges,
and system notifications with user interaction routing.

Wire protocol: 11 message types covering send/result, dismiss, badge,
channel registration, permission flow, action/click/dismiss callbacks,
and shell capability controls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant