Notifications
Understand Zync's live toasts, notification inbox, preferences, sound, and Do Not Disturb behavior.
Zync notifications have two surfaces:
- Live toasts appear in a screen corner and disappear automatically unless they are sticky or actionable.
- Notification inbox keeps important messages so you can review them later from the bell control.
The bell follows the configured toast position. Hovering or focusing a live toast pauses its hide timer.
Notification kinds
Section titled “Notification kinds”| Kind | Typical default duration | Inbox by default |
|---|---|---|
| Success | About 4 seconds | No |
| Info | About 4 seconds | No |
| Warning | About 6 seconds | Yes |
| Error | About 8 seconds | Yes |
These defaults are policy, not a guarantee. A caller can make a notification sticky with persist or duration: 0, force it into or out of history, or choose a channel explicitly.
Choosing a channel
Section titled “Choosing a channel”The notification policy supports four channels:
| Channel | Result |
|---|---|
auto |
Choose inbox history from the notification kind and options |
toast |
Show a live toast without inbox history |
inbox |
Store in the inbox without a live toast |
both |
Show both surfaces |
history: true forces inbox storage. history: false prevents inbox storage even for a sticky or actionable notification. Without an explicit override, errors, warnings, sticky notifications, and notifications with actions normally enter the inbox.
Inbox retention
Section titled “Inbox retention”Inbox history is stored in local browser storage under zync.notificationHistory.v1. It is not written to the app-data JSON files and it is not a cloud inbox.
- At most 50 items are retained.
- Items older than 7 days are pruned.
- Choose Clear all in the notification center to remove the retained history sooner.
- Action callbacks are kept in memory for the current session. The inbox stores serializable notification data, not JavaScript functions.
Preferences and accessibility
Section titled “Preferences and accessibility”Open the notification center with the bell, then use its gear control to change:
- position of the live toast stack and bell
- Do Not Disturb
- notification sound
Do Not Disturb suppresses the live toast and sound. A notification that qualifies for inbox history is still stored so you can review it later. A toast-only notification is dropped while Do Not Disturb is active.
Sound is opt in. Zync plays it only for a notification that enters history, unless the caller marks that notification as silent. The operating system or embedded browser may also require a prior user interaction before audio can play.
The center is a modal dialog. Focus moves into it when opened, stays trapped while it is open, and returns to the bell when it closes. Press Escape or click outside the panel to close it.
Related docs
Section titled “Related docs”- Plugins and extensions for the worker notification API.
- Settings for the global settings model.