# F-177 — Architecture

- Add `orders_orders.state_changed_at`, initialized from `updated_at`, indexed for monitored states.
- Every state transition updates both `updated_at` and `state_changed_at`; non-state edits only update `updated_at`.
- Admin endpoint `GET /orders/notifications/stale?hours=24&limit=20`: RBAC admin, fixed monitored states, parameterized threshold, total + items.
- Header client component polls every 5 minutes, refreshes when opened, closes on Escape/outside click, and links to `/orders/:id`.
- Bell badge caps visual text at `99+`; dropdown differentiates pending and shipped.
