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
Speed up reputation/notifications header dropdowns (#9400)
* Speed up reputation/notifications header dropdowns
Fixes N+1 queries on track/exercise, stops the header dropdowns from
eagerly refetching their full list on every page load (badge counts
are inlined server-side instead, list is fetched lazily on first
open), and fixes a staleTime unit bug (30ms instead of 30s) that made
the reputation dropdown refetch far more aggressively than intended.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ekpu7NEZTWCghctyM7XjTW
* Fix CI: badge props/websocket live-updates broke by lazy dropdown loading
- internal.tsx passed data.defaultUnreadCount but the raw JSON prop key
is snake_case (default_unread_count), like the other dropdowns already
do — the badge was rendering blank.
- The websocket-triggered background refresh (used to keep the badge
live while the dropdown is closed, even before it's ever been opened)
was accidentally gated behind hasOpenedOnce in both dropdowns. Restored
the original "refetch while closed" condition; refetch() works fine
even while the query is enabled:false pre-first-open.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ekpu7NEZTWCghctyM7XjTW
* Fix flaky notifications dropdown system test
The list now fetches lazily on first open instead of eagerly on
mount, so the initial (empty) fetch can race a notification created
immediately after opening. Wait for that fetch to resolve before
creating the notification, rather than relying on timing.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ekpu7NEZTWCghctyM7XjTW
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments