Skip to content

test: cover AuthProvider SSR session hydration - #38

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/test-coverage-automation-fef1
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/test-coverage-automation-fef1

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown

Risky behavior now covered

  • SSR/auth() session not passed into SessionProvider, leaving client useSession unauthenticated after hydration (breaks sidebar/authenticated UI and Playwright/E2E stub sessions).

Test files added/updated

  • tests/components/auth-provider.test.tsx

Why these tests materially reduce regression risk

Auth hydration is a recent production path with no unit coverage; a one-line regression flips the whole client into an anonymous state despite a valid SSR session.

Validation

  • pnpm run test:run (183 tests passed)
Open in Web View Automation 

Lock SessionProvider wiring so stub/SSR sessions hydrate client
useSession instead of flipping to unauthenticated after paint.

Co-authored-by: esadrianno <esadrianno@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant