607 B
607 B
F-177 — Architecture
- Add
orders_orders.state_changed_at, initialized fromupdated_at, indexed for monitored states. - Every state transition updates both
updated_atandstate_changed_at; non-state edits only updateupdated_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.