# v388 — Notification Read/Unread and Dismissal Behavior

## Purpose

v388 continues the simple app-style notifications track after guarded urgent SMS send execution. The goal is to make the notification bell and `/notifications` page behave more like a normal app alert system without bringing back the old complex Notification Center.

## What changed

- Added per-user notification state for generated app alerts.
- Added read/unread status to each generated alert.
- Changed the top-bar bell badge so it counts unread active alerts, not every alert that exists.
- Added Mark read, Mark unread, Mark all read, Hide, and Show again actions.
- Hidden alerts are removed from the active alert list for that user but can be shown again from the Hidden alerts section.
- Kept provider setup, Twilio setup, SMTP setup, delivery logs, and technical delivery details out of the normal notification surface.

## User-facing behavior

Users now see four simple notification summary cards:

- Needs attention
- Unread
- Urgent
- Hidden

Each active alert shows whether it is Read or Unread. Users can open the related record, mark the alert read or unread, or hide it from the active list.

The bell dropdown shows unread count and allows visible alerts to be marked read quickly.

## Technical notes

New model:

- `AppNotificationUserState`

New API route:

- `/api/app-notifications/state`

Updated files:

- `prisma/schema.prisma`
- `types/index.ts`
- `src/modules/app-notifications/app-notification.service.ts`
- `app/api/app-notifications/state/route.ts`
- `components/notifications/simple-notification-list.tsx`
- `components/notifications/app-notification-bell.tsx`

## Rule check

- Notifications remain simple and app-style.
- Alert setup stays in Workspace Settings and Third-Party Integrations.
- Normal users do not see SMTP fields, Twilio fields, API keys, provider diagnostics, or delivery logs.
- Read/unread and hiding are personal user alert actions, not provider configuration.

## Prisma schema impact

Yes. v388 adds `AppNotificationUserState`.
