Files: frontend/app/providers/NotificationProvider.tsx (158 lines); frontend/app/layout.tsx line 54; frontend/app/providers/ToastProvider.tsx (242 lines)
Issue: The app ships two parallel notification systems and uses one.
NotificationProvider is mounted third from the top of the provider tree in layout.tsx:54, so its code is in the initial bundle for every route. Nothing consumes it: grep -rn "useNotification\|addNotification\|notify(" app components lib hooks excluding the provider and its own test returns nothing. Its only other reference is app/providers/__tests__/NotificationProvider.test.tsx, which tests an API no caller uses — so the test passes forever and protects nothing.
ToastProvider is the real one, used in 13 files including the new useAdminAction hook, ClaimVesting, PublicTokenPage, all four forms and lib/soroban.ts.
The cost is not just the dead bytes. A contributor adding a notification has two plausible providers to choose from, one of which is wired into nothing, and the passing test suggests it is supported. Open issue #95 (Discord and Telegram webhook alerts) is the kind of work that would land on the wrong one.
Fix: Decide which survives. ToastProvider has the callers, so the cheap path is deleting NotificationProvider, its test and its layout.tsx mount. If NotificationProvider's richer model (persistence, a notification centre) is actually wanted for #95, then migrate the 13 ToastProvider call sites onto it and delete ToastProvider instead — but do one or the other in a single PR rather than leaving both.
Files:
frontend/app/providers/NotificationProvider.tsx(158 lines);frontend/app/layout.tsxline 54;frontend/app/providers/ToastProvider.tsx(242 lines)Issue: The app ships two parallel notification systems and uses one.
NotificationProvideris mounted third from the top of the provider tree inlayout.tsx:54, so its code is in the initial bundle for every route. Nothing consumes it:grep -rn "useNotification\|addNotification\|notify(" app components lib hooksexcluding the provider and its own test returns nothing. Its only other reference isapp/providers/__tests__/NotificationProvider.test.tsx, which tests an API no caller uses — so the test passes forever and protects nothing.ToastProvideris the real one, used in 13 files including the newuseAdminActionhook,ClaimVesting,PublicTokenPage, all four forms andlib/soroban.ts.The cost is not just the dead bytes. A contributor adding a notification has two plausible providers to choose from, one of which is wired into nothing, and the passing test suggests it is supported. Open issue #95 (Discord and Telegram webhook alerts) is the kind of work that would land on the wrong one.
Fix: Decide which survives.
ToastProviderhas the callers, so the cheap path is deletingNotificationProvider, its test and itslayout.tsxmount. IfNotificationProvider's richer model (persistence, a notification centre) is actually wanted for #95, then migrate the 13ToastProvidercall sites onto it and deleteToastProviderinstead — but do one or the other in a single PR rather than leaving both.