Skip to content

fix: drop the unstyled /login page - #62

Merged
herin7 merged 1 commit into
mainfrom
fix/remove-unstyled-login
Sep 8, 2026
Merged

herin7 merged 1 commit into
mainfrom
fix/remove-unstyled-login

Conversation

@herin7

@herin7 herin7 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

/login rendered as bare unstyled text — no card, no button styling, just "Login to Your Account" as plain paragraph text.

Cause

pages/Login.jsx styled itself with form_container and github-btn. Neither class exists in src/index.css, src/App.css, or the Tailwind config — so nothing applied.

The page was also redundant. gitformeUi.jsx already has a styled GitHub sign-in button pointing at the same ${VITE_API_URL}/api/auth/github endpoint.

Change

Deleted the page. /login now redirects to the landing page.

The route itself is kept rather than removed, because two things still send users there:

  • AuthController.js redirects to /login?error=auth_failed when OAuth fails
  • axiosConfig.js redirects to /login?error=session_expired on a 401

Removing the route outright would have turned both into a 404, and redirecting unconditionally to GitHub OAuth would loop forever on a persistent auth failure. Instead the redirect reads ?error= and surfaces it through the ToastContainer already mounted in App.jsx, so the reason a user got bounced still reaches them.

Verification

npm run build succeeds — 2374 modules, no unresolved import left behind by the deletion.

🤖 Generated with Claude Code

pages/Login.jsx styled itself with `form_container` and `github-btn`,
which are defined in no stylesheet, so it rendered as bare unstyled
text. It was also redundant: the landing page already has a styled
GitHub sign-in button that hits the same endpoint.

/login now redirects to the landing page. The route is kept because
AuthController still redirects there with ?error=auth_failed on OAuth
failure, and axiosConfig with ?error=session_expired; those reasons are
surfaced through the existing toast container instead of being dropped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 8, 2026 19:29
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
gitforme-jbsp Building Building Preview Sep 8, 2026 7:29pm UTC

@herin7
herin7 merged commit 56828b2 into main Sep 8, 2026
2 of 3 checks passed
@herin7
herin7 deleted the fix/remove-unstyled-login branch September 8, 2026 19:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is low-risk and aligns routing behavior with the existing landing-page sign-in flow, with only minor follow-up nits noted in review comments.

Pull request overview

Removes an unused/unstyled standalone /login page and replaces it with a redirect that preserves user feedback by toasting auth-related ?error= reasons before sending users back to the landing page.

Changes:

  • Deleted pages/Login.jsx (unstyled duplicate login UI).
  • Added LoginRedirect in App.jsx to toast ?error= values and redirect /login/.
  • Updated the /login route to render LoginRedirect instead of the removed page.
File summaries
File Description
gitforme/src/App.jsx Replaces /login page rendering with a redirect component that surfaces auth errors via toast notifications.
gitforme/pages/Login.jsx Removes the redundant, unstyled login page implementation.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread gitforme/src/App.jsx
Comment on lines 8 to 11
import RepoPage from '../pages/gitpage';
import ProtectedRoute from './components/ProtectedRoute';
import DomainShiftBanner from './components/DomainShiftBanner';
import { Analytics } from "@vercel/analytics/react"
Comment thread gitforme/src/App.jsx
Comment on lines +25 to +27
useEffect(() => {
if (error) toast.error(AUTH_ERRORS[error] || 'Please sign in to continue.');
}, [error]);
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