Bug
The profile selector on the dashboard shows profiles from the previous account if you sign out and sign back in as a different user. The Zustand store retains cached data from the prior session.
Expected behavior
All client-side user data should be cleared on sign-out. The dashboard should load fresh data for the new user.
Root cause
The Zustand store is not reset when the Clerk session changes. Cached profile data, feed state, and any other user-scoped data persists in memory across sign-out/sign-in cycles.
Fix
- Reset the Zustand store completely on sign-out (clear all user-scoped state)
- Clear any other cached user data (React Query cache, prefetched data, etc.)
- This should trigger on Clerk's sign-out event, before the redirect to the sign-in page
Bug
The profile selector on the dashboard shows profiles from the previous account if you sign out and sign back in as a different user. The Zustand store retains cached data from the prior session.
Expected behavior
All client-side user data should be cleared on sign-out. The dashboard should load fresh data for the new user.
Root cause
The Zustand store is not reset when the Clerk session changes. Cached profile data, feed state, and any other user-scoped data persists in memory across sign-out/sign-in cycles.
Fix