# PWA / background notifications (foundation notes)

## Current behavior (v0.10.x + alert UX milestone)

- Alert evaluation runs in `AlertMarketSessionHost` via the shared `LiveMarketClientSession`.
- The browser tab must remain open for live evaluation and desktop notifications.
- Desktop notifications use the `Notification` API after explicit user permission (`NotificationPermissionButton`).

## Not implemented

- Service worker registration for push
- Web Push / VAPID
- Notification click routing to symbol/chart
- Server-side alert evaluator when the client is offline

## Intended future path

1. Persist rules server-side (same payload shape as `tradingbite:alerts:v1`).
2. Server or service worker subscribes to market data and runs `evaluateAlertRule`.
3. Push dispatcher sends to subscribed clients.

Do not claim closed-tab alerts until this path is built and tested.
