Skip to content

Conversation

@leoisadev8
Copy link
Member

Redirect logged-in users to home when accessing /auth/sign-in. Also add overflow-hidden to the container to prevent horizontal scroll caused by decorative gradient orbs.

Changes:

  • Redirect authenticated users from sign-in page to home
  • Fix horizontal overflow on auth page caused by decorative elements

🤖 Generated with Claude Code

…UI overflow

Redirect logged-in users to home when accessing /auth/sign-in. Also add overflow-hidden to the container to prevent horizontal scroll caused by decorative gradient orbs.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@railway-app
Copy link

railway-app bot commented Jan 23, 2026

🚅 Deployed to the openchat-pr-549 environment in OpenChat

Service Status Web Updated (UTC)
web 😴 Sleeping (View Logs) Web Jan 23, 2026 at 5:09 pm

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 23, 2026

Greptile Summary

Added authentication redirect to prevent logged-in users from accessing the sign-in page, and fixed horizontal overflow caused by decorative gradient orbs.

Major Changes:

  • Redirect logic checks isAuthenticated and loading states before navigating authenticated users to home
  • Added overflow-hidden class to root container to prevent horizontal scroll from decorative elements
  • Imported useNavigate and useAuth hooks from respective libraries

Analysis:
The authentication redirect follows standard React patterns with proper dependency tracking in the useEffect hook. The redirect only triggers after the loading state completes (!loading && isAuthenticated), preventing race conditions or premature redirects.

The overflow fix addresses a UI issue where gradient orbs positioned outside the viewport (-right-1/4, -left-1/4, etc.) were causing horizontal scroll. The overflow-hidden class on the root container appropriately clips these decorative elements.

Confidence Score: 4/5

  • This PR is safe to merge with low risk
  • The changes are well-implemented with proper React patterns. The authentication redirect logic correctly waits for loading to complete before checking authentication status, preventing race conditions. The overflow fix is a simple CSS addition that solves the described issue. No breaking changes or security concerns identified.
  • No files require special attention

Important Files Changed

Filename Overview
apps/web/src/routes/auth/sign-in.tsx Added authentication redirect and overflow fix. Redirect logic is sound, overflow-hidden prevents horizontal scroll from decorative elements.

Sequence Diagram

sequenceDiagram
    participant User
    participant Browser
    participant SignInPage
    participant useAuth
    participant AuthClient
    participant Router

    User->>Browser: Access /auth/sign-in
    Browser->>SignInPage: Mount component
    SignInPage->>useAuth: Check auth state
    useAuth->>AuthClient: Fetch session
    
    alt Already authenticated
        AuthClient-->>useAuth: Valid session
        useAuth-->>SignInPage: isAuthenticated: true
        SignInPage->>Router: navigate to home
        Router-->>Browser: Redirect to /
    else Not authenticated
        AuthClient-->>useAuth: No session
        useAuth-->>SignInPage: isAuthenticated: false
        SignInPage-->>Browser: Render sign-in form
        User->>SignInPage: Click OAuth button
        SignInPage->>AuthClient: Trigger OAuth flow
        AuthClient-->>Browser: Redirect to provider
    end
Loading

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