Issue 281
bug: Header still shows Log In after signing in (seen locally)
Back to our planDone
bugfrontendauthpriority: medium
Problem
Found while testing #277 on a local dev server: after signing in, the site header kept showing "Log In", even after a reload. It happens with main's code too, so it predates #277. Only seen locally so far; not yet checked on the live site.
Proposed fix
Reproduce on main (local, and on the live site with a test account). Find why the header's account state doesn't pick up the session (src/modules/accounts/ui/AccountMenu.client.tsx, AccountProvider.client.tsx, useSignedInAccount.ts; docs/guidelines/components-and-content.md → "Client-side hooks in persistent layouts must re-sync on navigation"). Use Payload's own me operation / /api/users/me rather than new session code.
Acceptance criteria
- Not done: After signing in, the header shows the account menu without a manual reload, and after a reload
- Not done: After signing out, it shows "Log In"
- Not done: A test covers it
Area
auth, frontend
Priority
Medium
Generated by Claude Code, opens in a new tab