|
| 1 | +# Tasks: Notification System |
| 2 | + |
| 3 | +## T011: Notification System |
| 4 | + |
| 5 | +### Status: pending |
| 6 | + |
| 7 | +### Tasks |
| 8 | + |
| 9 | +#### T011.1: NotificationStore |
| 10 | +- [ ] Create `src/stores/notification.ts` |
| 11 | +- [ ] Define Notification type (id, type, title, message, timestamp, read, data?) |
| 12 | +- [ ] NotificationType enum (transaction, security, system) |
| 13 | +- [ ] Actions: add, markRead, markAllRead, clearAll |
| 14 | +- [ ] localStorage persistence |
| 15 | +- [ ] Write tests (~6 tests) |
| 16 | + |
| 17 | +**Acceptance**: Notifications persist across page reloads |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +#### T011.2: NotificationPermissionSheet |
| 22 | +- [ ] Create `src/components/notification/permission-sheet.tsx` |
| 23 | +- [ ] Explain push notification benefits |
| 24 | +- [ ] Request permission button |
| 25 | +- [ ] Handle denied state with "Settings" link |
| 26 | +- [ ] Skip option for later |
| 27 | +- [ ] Write tests (~6 tests) |
| 28 | +- [ ] Write Storybook story |
| 29 | + |
| 30 | +**Acceptance**: Permission flow handles all states (granted, denied, default) |
| 31 | + |
| 32 | +--- |
| 33 | + |
| 34 | +#### T011.3: NotificationCenter |
| 35 | +- [ ] Create `src/pages/notifications/index.tsx` |
| 36 | +- [ ] List notifications with grouping by date |
| 37 | +- [ ] Empty state when no notifications |
| 38 | +- [ ] Mark as read on tap |
| 39 | +- [ ] Clear all button in header |
| 40 | +- [ ] Add route `/notifications` |
| 41 | +- [ ] Write tests (~8 tests) |
| 42 | +- [ ] Write Storybook story |
| 43 | + |
| 44 | +**Acceptance**: Can view and manage all notifications |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +#### T011.4: TransactionNotification |
| 49 | +- [ ] Create `src/components/notification/transaction-toast.tsx` |
| 50 | +- [ ] Toast states: pending, confirmed, failed |
| 51 | +- [ ] Icon and color per state |
| 52 | +- [ ] Auto-dismiss after 5s (configurable) |
| 53 | +- [ ] Tap to view transaction detail |
| 54 | +- [ ] Write tests (~6 tests) |
| 55 | +- [ ] Write Storybook story |
| 56 | + |
| 57 | +**Acceptance**: Transaction status visible as toast during send flow |
| 58 | + |
| 59 | +--- |
| 60 | + |
| 61 | +## Dependencies |
| 62 | + |
| 63 | +- TanStack Store (exists) |
| 64 | +- BottomSheet (exists) |
| 65 | +- PageHeader (exists) |
| 66 | +- useToast hook (may need to create) |
| 67 | + |
| 68 | +## Estimated Test Count |
| 69 | + |
| 70 | +| Task | Tests | |
| 71 | +|------|-------| |
| 72 | +| T011.1 NotificationStore | ~6 | |
| 73 | +| T011.2 NotificationPermissionSheet | ~6 | |
| 74 | +| T011.3 NotificationCenter | ~8 | |
| 75 | +| T011.4 TransactionNotification | ~6 | |
| 76 | +| **Total** | **~26** | |
0 commit comments