The removeNotification function was using a stale reference to the
notifications array from the closure scope, causing the setTimeout
callback to filter against an outdated state.
Changed to use functional update pattern (prev => prev.filter(...))
which correctly references the current state when the timeout fires.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>