Skip to content

feat: Redesign auth pages (Login/Signup)#217

Merged
DevanshuNEU merged 4 commits into
OpenCodeIntel:mainfrom
DevanshuNEU:feature/auth-pages-redesign
Jan 24, 2026
Merged

feat: Redesign auth pages (Login/Signup)#217
DevanshuNEU merged 4 commits into
OpenCodeIntel:mainfrom
DevanshuNEU:feature/auth-pages-redesign

Conversation

@DevanshuNEU

@DevanshuNEU DevanshuNEU commented Jan 24, 2026

Copy link
Copy Markdown
Collaborator

Auth Pages Redesign

Summary

Clean, minimal redesign of Login and Signup pages to match the new landing page design system.

Changes

Design Philosophy

Stripped all the "SaaS template" fluff. Inspired by Linear, Vercel, Raycast - developer tools that respect their users' time.

Removed

  • Floating gradient orbs
  • "Welcome back" / "Get started free" badges
  • Glassmorphism blur effects
  • Grid pattern backgrounds
  • Framer Motion entrance animations
  • Benefits checklist on signup

Kept

  • Clean centered form card
  • Icon inputs (Mail, Lock)
  • GitHub OAuth button (disabled, "Coming soon")
  • Full light/dark theme support
  • Proper navigation links
  • Shared Navbar component

Screenshots

Light Mode:

  • Login: Clean white card, centered form
  • Signup: Same style + Terms/Privacy links

Dark Mode:

  • Login: Dark card with subtle border
  • Signup: Consistent with login

Files Changed

  • frontend/src/components/auth/LoginForm.tsx - Complete rewrite
  • frontend/src/components/auth/SignupForm.tsx - Complete rewrite

Code Stats

  • Before: 437 lines
  • After: 324 lines
  • Removed: 113 lines of fluff

Testing

  • Build passes
  • Light mode works
  • Dark mode works
  • Form validation works
  • Navigation links work

Next Steps (separate PR)

  • Implement GitHub OAuth
  • Add password reset flow

Summary by CodeRabbit

  • Style

    • Redesigned login and signup pages with improved visual hierarchy, spacing, and a shared Navbar.
    • Updated color palette, typography tokens, and modernized form elements and icons for a consistent design system.
    • Streamlined layouts, removed extraneous sections, and improved input/label styling for clarity.
  • Bug Fixes / UX

    • Preserved existing sign-in/sign-up flows and validations while improving loading states, error display, and accessibility.
    • Added a “Continue with GitHub” placeholder to reflect upcoming social sign-in.

✏️ Tip: You can customize this high-level summary in your review settings.

- LoginForm: theme tokens, floating orbs, glassmorphism card
- SignupForm: same design + benefits list
- use shared Navbar component
- indigo accent instead of blue
- light/dark mode support
- lucide icons (Mail, Lock, etc)
- motion animations on mount
- GitHub OAuth button placeholder (coming soon)
- remove floating gradient orbs
- remove welcome/get started badges
- remove glassmorphism blur
- remove grid pattern background
- remove framer-motion animations
- remove benefits checklist
- keep: clean form, icon inputs, GitHub button, theme support
- Linear/Vercel inspired - just the form, nothing else
@vercel

vercel Bot commented Jan 24, 2026

Copy link
Copy Markdown

@DevanshuNEU is attempting to deploy a commit to the Dev's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Jan 24, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
opencodeintel Ignored Ignored Preview Jan 24, 2026 8:13pm

@coderabbitai

coderabbitai Bot commented Jan 24, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

LoginForm and SignupForm were rewritten to use shared UI components and a landing Navbar, replaced custom icons with lucide-react icons, updated typography and tokens, and preserved existing form control flow (state, validation, submission, navigation, and error handling).

Changes

Cohort / File(s) Summary
Auth Form Refactoring
frontend/src/components/auth/LoginForm.tsx, frontend/src/components/auth/SignupForm.tsx
Complete UI overhaul: replaced local inline markup and custom icons with centralized Button, Input, Label, Alert components and lucide-react icons; added Navbar from landing module; reorganized JSX and classes to new design tokens; preserved form state, validation, submit logic, navigation, and error handling; added GitHub OAuth placeholder/button.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly Related Issues

Poem

🐰 A form once tangled, now clean and bright,
Icons swapped to lucide, spacing feeling right.
Navbar hops in to join the scene,
Signup and login — sleek and lean. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Redesign auth pages (Login/Signup)' directly and clearly summarizes the main changes: a redesign of both the LoginForm and SignupForm components with a clean, minimal UI update.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@frontend/src/components/auth/SignupForm.tsx`:
- Around line 136-141: The SignupForm.tsx contains Link components pointing to
"/terms" and "/privacy" which are not defined in the app router; add routes for
these paths or change the links to external URLs. Either create new components
(e.g., TermsPage and PrivacyPage) and register them in the router defined in
App.tsx (or the routing module) with paths "/terms" and "/privacy", or update
the Link targets in SignupForm.tsx to the correct external URLs; ensure the Link
import and route names match existing router conventions so navigation doesn't
produce 404s.
🧹 Nitpick comments (4)
frontend/src/components/auth/LoginForm.tsx (2)

77-82: Non-functional "Forgot password?" button may confuse users.

This button has no onClick handler and will do nothing when clicked, which could frustrate users. Since the PR notes password reset is planned for a separate PR, consider either disabling the button or making it visually distinct as a placeholder.

💡 Option: Disable the button or add a tooltip
                  <button 
                    type="button" 
+                   disabled
                    className="text-xs text-muted-foreground hover:text-foreground transition-colors"
+                   title="Coming soon"
                  >
                    Forgot password?
                  </button>

Alternatively, convert to plain text until the feature is ready:

-                  <button 
-                    type="button" 
-                    className="text-xs text-muted-foreground hover:text-foreground transition-colors"
-                  >
-                    Forgot password?
-                  </button>
+                  <span className="text-xs text-muted-foreground">
+                    Forgot password?
+                  </span>

27-28: Consider using unknown type in catch block.

Using err: any bypasses TypeScript's type checking. A safer pattern is unknown with a type guard, though this is a common pragmatic choice in React codebases.

💡 Type-safe error handling
-    } catch (err: any) {
-      setError(err.message || 'Login failed')
+    } catch (err: unknown) {
+      const message = err instanceof Error ? err.message : 'Login failed'
+      setError(message)
frontend/src/components/auth/SignupForm.tsx (2)

38-39: Same type safety consideration as LoginForm.

For consistency, consider applying the same unknown type pattern if you update LoginForm.

💡 Type-safe error handling
-    } catch (err: any) {
-      setError(err.message || 'Signup failed')
+    } catch (err: unknown) {
+      const message = err instanceof Error ? err.message : 'Signup failed'
+      setError(message)

1-175: Consider extracting shared patterns between LoginForm and SignupForm.

Both forms share significant structural patterns: the icon input wrapper, the "or" divider, and the GitHub OAuth placeholder button. While acceptable for two files, this could be extracted into shared components if more auth-related forms are planned.

This is a low-priority refactor that could be addressed in a future cleanup PR if the codebase grows:

  • IconInput component for the icon-prefixed input pattern
  • OAuthSection component for the divider and social login buttons

Comment thread frontend/src/components/auth/SignupForm.tsx
@DevanshuNEU

Copy link
Copy Markdown
Collaborator Author

@coderabbitai Good catch! Fixed in e4e8f5f - using placeholder # links for now since we don't have Terms/Privacy pages yet. Will create actual pages in a future PR.

@coderabbitai

coderabbitai Bot commented Jan 24, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@DevanshuNEU Perfect! Thanks for the quick fix. Using placeholder # links is a sensible approach for now.

If you'd like, I can help you create a GitHub issue to track the Terms of Service and Privacy Policy pages for the future PR. Just let me know!

    (\__/)
    (•ㅅ•)
    />📝✨

@DevanshuNEU DevanshuNEU merged commit 09bb12d into OpenCodeIntel:main Jan 24, 2026
6 of 7 checks passed

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@frontend/src/components/auth/SignupForm.tsx`:
- Around line 35-40: The catch currently types the error as any and reads
err.message directly; change the catch parameter to err: unknown and narrow it
(e.g., if (err instanceof Error) setError(err.message) else setError(String(err)
|| 'Signup failed')) inside the SignupForm signUp call so setError always
receives a safe string; update the try/catch around signUp(email, password) and
keep navigate('/dashboard') on success.

Comment on lines 35 to 40
try {
await signUp(email, password);
navigate('/dashboard');
await signUp(email, password)
navigate('/dashboard')
} catch (err: any) {
setError(err.message || 'Signup failed');
setError(err.message || 'Signup failed')
} finally {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

find . -name "SignupForm.tsx" -type f

Repository: OpenCodeIntel/opencodeintel

Length of output: 116


🏁 Script executed:

cat -n ./frontend/src/components/auth/SignupForm.tsx

Repository: OpenCodeIntel/opencodeintel

Length of output: 7510


🏁 Script executed:

find . -name "AuthContext*" -type f

Repository: OpenCodeIntel/opencodeintel

Length of output: 110


🏁 Script executed:

cat -n ./frontend/src/contexts/AuthContext.tsx

Repository: OpenCodeIntel/opencodeintel

Length of output: 2989


🌐 Web query:

TypeScript best practice catch unknown error narrowing pattern

💡 Result:

Best-practice pattern: treat caught values as unknown, then narrow with runtime checks

  1. Make catch variables unknown (recommended)
  • Enable useUnknownInCatchVariables (enabled by --strict) so catch (err) is typed as unknown, forcing safe narrowing. [1]
  1. Narrow safely inside catch
try {
  doThing();
} catch (err: unknown) {
  if (err instanceof Error) {
    // ✅ now you can use err.message, err.stack, etc.
    console.error(err.message);
  } else {
    // ✅ handle non-Error throws (strings, objects, numbers, etc.)
    console.error("Non-Error thrown:", err);
  }
}

TypeScript explicitly recommends instanceof Error as the basic narrowing technique for unknown catch variables. [1]

  1. For Promise .catch(): annotate the parameter as unknown too
    TypeScript’s compiler option doesn’t affect Promise.prototype.catch() callback types, so add an explicit annotation (or enforce it via lint). [2]
Promise.reject("nope").catch((err: unknown) => {
  if (err instanceof Error) console.error(err.message);
  else console.error(err);
});
  1. (Optional) Enforce the Promise pattern with ESLint
    Use @typescript-eslint/use-unknown-in-catch-callback-variable to require unknown in Promise rejection callbacks. [2]

Sources: TypeScript 4.4 release notes on useUnknownInCatchVariables and narrowing with instanceof Error [1], typescript-eslint rule for Promise catch callbacks [2].

[1] https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-4.html
[2] https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable


Use unknown with type narrowing in catch block to safely handle errors.

The catch clause uses err: any, which bypasses TypeScript's type safety. Since signUp rejects from Supabase and accessing .message directly is unsafe, use proper type narrowing with err: unknown and an instanceof Error check.

🛠️ Suggested fix
-    } catch (err: any) {
-      setError(err.message || 'Signup failed')
+    } catch (err: unknown) {
+      const message =
+        err instanceof Error
+          ? err.message
+          : typeof err === 'string'
+            ? err
+            : 'Signup failed'
+      setError(message)
     } finally {
       setLoading(false)
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
try {
await signUp(email, password);
navigate('/dashboard');
await signUp(email, password)
navigate('/dashboard')
} catch (err: any) {
setError(err.message || 'Signup failed');
setError(err.message || 'Signup failed')
} finally {
try {
await signUp(email, password)
navigate('/dashboard')
} catch (err: unknown) {
const message =
err instanceof Error
? err.message
: typeof err === 'string'
? err
: 'Signup failed'
setError(message)
} finally {
🤖 Prompt for AI Agents
In `@frontend/src/components/auth/SignupForm.tsx` around lines 35 - 40, The catch
currently types the error as any and reads err.message directly; change the
catch parameter to err: unknown and narrow it (e.g., if (err instanceof Error)
setError(err.message) else setError(String(err) || 'Signup failed')) inside the
SignupForm signUp call so setError always receives a safe string; update the
try/catch around signUp(email, password) and keep navigate('/dashboard') on
success.

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