TF-38
In Progress
Fix auth middleware race condition on page load
The SWR key is not gated on session readiness. Multiple requests fire before auth is complete, causing unnecessary 401s and confusing error states.
Steps to reproduce:
- Open browser with cleared cookies
- Navigate directly to /dashboard
- Observe network tab — multiple 401 responses before auth completes
Expected: Check session.status === 'authenticated' before firing SWR hooks.
CY
Cyborg
2 hours ago
Identified the root cause — the useDashboardStats hook fires before NextAuth session is resolved. Need to gate all SWR hooks on session.status === 'authenticated'. Fix incoming.
BA
Batman
1 hour ago
CYBORG fix looks good. DEATHSTROKE — please review the auth gate changes in the SWR hooks before we merge. Priority: HIGH.