Skip to content

fix: redirect signed-in users to resources only on first homepage visit - #97

Merged
creatorcluster merged 1 commit into
creatorcluster:mainfrom
Coder-soft:fix/auth-home-first-visit-redirect
Oct 7, 2026
Merged

creatorcluster merged 1 commit into
creatorcluster:mainfrom
Coder-soft:fix/auth-home-first-visit-redirect

Conversation

@Coder-soft

Copy link
Copy Markdown

Summary

Signed-in users are currently always redirected from / to /resources, so they can never view the homepage. This changes it so the redirect happens only on the first homepage visit of a browser session; afterwards users can browse back to the homepage freely.

Behavior

  • Signed-in user lands on / (or signs in while on /) with no marker → redirected to /resources.
  • Subsequent visits to / render the homepage.
  • Signing out clears the marker, so the next sign-in redirects again.

Implementation

  • Session flag in sessionStorage (rd_home_redirect_done) tracks whether the auto-redirect already happened this session.
  • The decision is made in a StrictMode-safe effect with a per-user ref guard and a decided gate, so the lazy homepage never flashes before the redirect (src/App.tsx).

Testing

  • eslint src/App.tsx passes.
  • tsc --noEmit passes.

@vercel

vercel Bot commented Oct 7, 2026

Copy link
Copy Markdown

@Coder-soft is attempting to deploy a commit to the yamura3's projects Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd3c18b9-6082-4808-9947-cd4c37bfa5cd
📥 Commits

Reviewing files that changed from the base of the PR and between d24b8f4 and 72f4d47.

📒 Files selected for processing (1)
  • src/App.tsx
 ______________________________________
< I read stack traces like tea leaves. >
 --------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@creatorcluster
creatorcluster merged commit fd6ba64 into creatorcluster:main Oct 7, 2026
0 of 3 checks passed
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.

2 participants