Filament flash notifications crashed Postgres because the ID was not a UUID
Short answer: Smart SEO flash notifications use ids like filament-smart-seo-<hash>. Aviwebsquad.in also stores Filament database notifications in a table whose id is a UUID. Closing the toast made Filament delete that string from notifications.id, and Postgres returned SQLSTATE[22P02].
Where it blew up
The blog edit screen returned an internal server error after an SEO notification. The SQL was:
invalid input syntax for type uuid
Livewire event notificationClosed is handled by both the toast stack and DatabaseNotifications::removeNotification(). The database listener does not check that the id belongs to a row before querying.
First patch hid the bell
I extended Filament\Notifications\Livewire\DatabaseNotifications. That class has no topbar trigger, so the notification icon vanished from the dashboard.
The panel class is Filament\Livewire\DatabaseNotifications. It is the one that renders the bell. The app class now extends that, and ignores remove/read/unread unless Str::isUuid($id).
Real notification rows still delete. Flash toasts only close in the browser.
Checks I keep
- The bell is on
/admin. - Closing a Smart SEO toast does not 500.
- A UUID notification still deletes.
FAQ
Did this affect public pages?
No. Only the admin notification round-trip.
Why not alter notifications.id to text?
Other Laravel notification code expects a UUID primary key. A guard on the listener is the smaller change.
See also the Smart SEO object-object title bug.