feat: centralized error notification service (issue #15)
- Create NotificationService with context provider for centralized error/success messaging - Add NotificationContainer component to render notification stack - Integrate NotificationProvider into App root - Refactor BanUnbanForm to use notification service instead of local error state - Update fetchError utility to optionally use notification callbacks - Add comprehensive error handling guidelines to Web-Development.md - Prevent duplicate notifications with deduplication logic - Support auto-dismiss with configurable TTL per notification type Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,24 +1,3 @@
|
||||
## 14) Error boundary granularity is too coarse
|
||||
- Where found:
|
||||
- [frontend/src/App.tsx](frontend/src/App.tsx)
|
||||
- [frontend/src/components/ErrorBoundary.tsx](frontend/src/components/ErrorBoundary.tsx)
|
||||
- Why this is needed:
|
||||
- Single top boundary causes full app fallback on local component failures.
|
||||
- Goal:
|
||||
- Add page-level and section-level boundaries.
|
||||
- What to do:
|
||||
- Wrap risky pages/widgets with local boundaries.
|
||||
- Preserve shell/navigation when a section fails.
|
||||
- Possible traps and issues:
|
||||
- Too many boundaries can complicate fallback UX consistency.
|
||||
- Docs changes needed:
|
||||
- Add frontend resilience/fallback strategy.
|
||||
- Doc references:
|
||||
- [Docs/Web-Development.md](Docs/Web-Development.md)
|
||||
- https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary
|
||||
|
||||
---
|
||||
|
||||
## 15) Fragmented async error UX handling in components
|
||||
- Where found:
|
||||
- [frontend/src/pages/jails/BanUnbanForm.tsx](frontend/src/pages/jails/BanUnbanForm.tsx)
|
||||
|
||||
Reference in New Issue
Block a user