# Notifications and the away digest

Tell people what happened while they were away, in the order they'd act on it, and let them choose what reaches them.

For: Everyone who isn't watching the product all day.

Web page: https://candor.themethodic.com/screens/notifications-and-digest

## Layouts

### Away digest on return

Pick it when: The default: when someone comes back, say what needs them first.

Layout: A summary at the top of the page: waiting on you, failed, finished, each a short group.

Items:

- **Away digest** (`away-digest`, Pro; https://candor.themethodic.com/docs/away-digest.md): What happened since you were last here: waiting on you, failed, finished.
- **Relative time** (`relative-time`, free; https://candor.themethodic.com/docs/relative-time.md): When, as people say it.
- **Inbox** (`inbox`, Pro; https://candor.themethodic.com/docs/inbox.md): The full list behind each line.

```bash
npx candor-ui add away-digest relative-time inbox
```

### Bell and notification centre

Pick it when: Products used all day, where news arrives while the person is working.

Layout: A bell in the top bar opening a list of notices, newest first.

Items:

- **Notification center** (`notification-center`, Pro; https://candor.themethodic.com/docs/notification-center.md): Everything that happened while you were away, behind a bell.
- **Toast** (`toast`, Pro; https://candor.themethodic.com/docs/toast.md): Short notices in the corner: polite for successes, assertive for errors.
- **Task tray** (`task-tray`, Pro; https://candor.themethodic.com/docs/task-tray.md): Background work as one pill.

```bash
npx candor-ui add notification-center toast task-tray
```

### Preferences and email

Pick it when: People ask to turn things down, or you send email about runs.

Layout: A grid of event kinds by channel, with a preview of the email beside it.

Items:

- **Notification preferences** (`notification-preferences`, Pro; https://candor.themethodic.com/docs/notification-preferences.md): What reaches you, and where: one row per kind of event, one column per channel.
- **Channel setup** (`channel-setup`, Pro; https://candor.themethodic.com/docs/channel-setup.md): Where agents can reach the team outside the app.
- **Email layout** (`email-layout`, Pro; https://candor.themethodic.com/docs/email-layout.md): The email shell: one next step, and why you got it.

```bash
npx candor-ui add notification-preferences channel-setup email-layout
```

## Rules that matter most here

- **Unknown stays unknown** (https://candor.themethodic.com/principles#unknown-stays-unknown): "Nothing happened" is said only when the service knows nothing did; if it couldn't check, it says so.
- **Motion never says something false** (https://candor.themethodic.com/principles#motion-follows-the-outcome): A notice announcing a failure is assertive and stays until dismissed; a success is polite and goes.
- **The agent is always named, by the app** (https://candor.themethodic.com/principles#agents-are-named): Each line names the agent, from your records.

## Brief for a coding agent

Paste this to the agent that builds the screen.

```text
Build notifications with Candor UI: AwayDigest on return, NotificationCenter behind a bell, Toaster for live notices.
Order the digest by what the person would act on: waiting on you, then failed, then finished.
Successes are polite toasts that go; errors are assertive and stay until dismissed.
Name the agent on each line from your records. Say "nothing happened" only when the service knows nothing did.
Let people choose what reaches them with NotificationPreferences (kind by channel) and ChannelSetup.
Emails use EmailLayout: one next step, and why the person got it.

Start from the "Away digest on return" layout: A summary at the top of the page: waiting on you, failed, finished, each a short group.
Candor items: away-digest (https://candor.themethodic.com/docs/away-digest.md), relative-time (https://candor.themethodic.com/docs/relative-time.md), inbox (https://candor.themethodic.com/docs/inbox.md).
Install: npx candor-ui add away-digest relative-time inbox
Read each item's docs before using it and take its props from there; don't guess them. Pro and Premium items need the person's licence key, which they add with `npx candor-ui key <key>`; don't ask for it.
```
