Skip to content

fix(login): prevent hydration redirect loop; show signed-in panel#19

Open
chundawat-h wants to merge 2 commits into
mainfrom
revert-non-signin
Open

fix(login): prevent hydration redirect loop; show signed-in panel#19
chundawat-h wants to merge 2 commits into
mainfrom
revert-non-signin

Conversation

@chundawat-h
Copy link
Copy Markdown
Collaborator

@chundawat-h chundawat-h commented Jun 1, 2026

Summary
Fixes several login-related issues: hydration mismatch on the login page, unstable tab selection, and automatic redirect that prevented back-navigation. Also reverts unrelated UI/log changes introduced earlier.

Detailed changes

Convert login page to a client-only component and stabilize tab selection using a mount-only read of search params.
Remove the Suspense fallback that caused a server/client markup mismatch and hydration overlay.
Add an "already signed in" UI to avoid immediate redirect. This shows signed-in email and provides "Go to Dashboard" and "Sign Out" actions — preventing back-button loop.
Revert unrelated changes to supabaseClient and AuthContext log/error messages so we only touch login behavior.
Created a local .env file with provided credentials (not committed; it's gitignored).
Testing steps

Start frontend: npm run dev
Visit http://localhost:3000/login
Confirm page no longer shows hydration overlay and the login/signup tabs behave as expected.
If already signed-in, check that the panel appears and back navigation does not immediately redirect to dashboard.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@chundawat-h is attempting to deploy a commit to the Chandan Giri's projects team on Vercel, but is not a member of this team. To resolve this issue, you can:

  • Make your repository public. Collaboration is free for open source and public repositories.
  • Upgrade to pro and add @chundawat-h as a member. A Pro subscription is required to access Vercel's collaborative features.
    • If you're the owner of the team, click here to upgrade and add @chundawat-h as a member.
    • If you're the user who initiated this build request, click here to request access.
    • If you're already a member of the Chandan Giri's projects team, make sure that your Vercel account is connected to your GitHub account.

To read more about collaboration on Vercel, click here.

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