⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift
Avoid duplicate notification fetches across deferred children.
<Badge server:defer /> and <NotificationsList server:defer /> each fetch notifications independently in their own components, so one header render causes two reads against the same action/discourse source. Fetch once in the parent and pass the data down (or collapse into one deferred component).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/components/notification/Notifications.astro` around lines 16 - 25, The
Badge and NotificationsList components are each fetching notifications
independently using server:defer, causing duplicate reads from the same source.
Fetch notifications once in the parent Notifications.astro component and pass
the fetched data down to both Badge and NotificationsList as props instead of
having them fetch separately. Remove or adjust the server:defer directives on
these child components so they consume the passed data rather than triggering
independent fetches.
Originally posted by @coderabbitai[bot] in #264 (comment)
Avoid duplicate notification fetches across deferred children.
<Badge server:defer />and<NotificationsList server:defer />each fetch notifications independently in their own components, so one header render causes two reads against the same action/discourse source. Fetch once in the parent and pass the data down (or collapse into one deferred component).🤖 Prompt for AI Agents
Originally posted by @coderabbitai[bot] in #264 (comment)