feat: add new login and signup pages#2471
Conversation
WalkthroughAdds new reusable auth UI components, removes the legacy cosmo-stack visuals, updates auth layout and login/signup pages to a two-column design, and updates Next.js config to allow remote images from wundergraph.com and extend CSP img-src. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2471 +/- ##
==========================================
- Coverage 36.06% 1.50% -34.56%
==========================================
Files 944 292 -652
Lines 123477 46690 -76787
Branches 4951 431 -4520
==========================================
- Hits 44530 703 -43827
+ Misses 77386 45704 -31682
+ Partials 1561 283 -1278
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
studio/src/pages/login.tsx (1)
50-50: UsesafeParseto prevent runtime crashes on invalid query parameters.
querySchema.parse()throws aZodErrorif validation fails (e.g., ifredirectURLis present but not a valid URL). This would crash the page for users with malformed query strings.Proposed fix using safeParse with fallback
- const { redirectURL, sso } = querySchema.parse(router.query); + const parseResult = querySchema.safeParse(router.query); + const { redirectURL, sso } = parseResult.success + ? parseResult.data + : { redirectURL: undefined, sso: undefined };
🤖 Fix all issues with AI agents
In `@studio/src/pages/login.tsx`:
- Around line 138-145: The signup Link currently interpolates redirectURL
directly into the href which can break when redirectURL contains special
characters; update the Link href construction in the login component to pass an
encoded redirect value (use encodeURIComponent on redirectURL) so the URL is
well-formed—modify the JSX where redirectURL is used (the Link element that
renders "Sign Up") to build href as
`/signup?redirectURL=${encodeURIComponent(redirectURL)}` when redirectURL is
present.
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.
Checklist