You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@/components/ui/use-toast's toast() writes to its store, but the use-toast <Toaster> (@/components/ui/toaster) is never mounted anywhere. The root layout (src/app/layout.tsx) mounts only the sonner<Toaster> (@/components/ui/sonner). So every toast() call from use-toast is a no-op visually.
Impact
Coaching-session panel error toasts that use use-toast never appear, e.g.:
handleTopicCreate — "Failed to add topic"
handleTopicEdit — "Failed to update topic"
handleAgreementDelete — "Failed to delete agreement"
(and any other toast({ variant: "destructive", ... }) call). Toasts that use sonner (sonnerToast.*) render fine, since that Toaster is mounted.
Problem
@/components/ui/use-toast'stoast()writes to its store, but the use-toast<Toaster>(@/components/ui/toaster) is never mounted anywhere. The root layout (src/app/layout.tsx) mounts only the sonner<Toaster>(@/components/ui/sonner). So everytoast()call fromuse-toastis a no-op visually.Impact
Coaching-session panel error toasts that use
use-toastnever appear, e.g.:handleTopicCreate— "Failed to add topic"handleTopicEdit— "Failed to update topic"handleAgreementDelete— "Failed to delete agreement"(and any other
toast({ variant: "destructive", ... })call). Toasts that use sonner (sonnerToast.*) render fine, since that Toaster is mounted.Fix options
use-toastcallers to sonner (sonnerToast.error(...)) — matches the mounted Toaster and the rest of the panel. (Already done for the title-save toast in Coaching session Title + collaborative Topics (frontend) #418.)<Toaster/>from@/components/ui/toasterin the root layout, if both toast systems are intended.Recommend (1) for consistency unless both systems are wanted.
Discovered while addressing #418 review comments.