Skip to content

fix: update authentication modal styles and improve success handling#20

Merged
sirily11 merged 1 commit intomainfrom
fix-login
Feb 9, 2026
Merged

fix: update authentication modal styles and improve success handling#20
sirily11 merged 1 commit intomainfrom
fix-login

Conversation

@sirily11
Copy link
Contributor

@sirily11 sirily11 commented Feb 9, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 9, 2026 03:31
@vercel
Copy link

vercel bot commented Feb 9, 2026

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

Project Deployment Actions Updated (UTC)
dashboard-chainlab Ready Ready Preview, Comment Feb 9, 2026 3:32am

Request Review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the authentication UI layout for mobile/desktop modals and refactors the sign-in success path so success feedback is shown consistently after authentication.

Changes:

  • Adjust auth modal Card sizing/padding and surrounding layout containers for more consistent rendering.
  • Move success toast + redirect handling to run after successful sign-in regardless of redirect presence.
  • Make the auth page/modal wrappers fill available width/height.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/components/pages/auth/MobileAuthModal.tsx Updates mobile modal card sizing (fixed height) and padding reset.
src/components/pages/auth/DesktopAuthModal.tsx Updates desktop modal card sizing (fixed height), padding reset, and ensures inner container fills height.
src/components/pages/auth/AuthenticationModal.tsx Refactors success handling + tweaks layout wrapper sizing; adds Biome suppression comment.
src/app/(internal)/(auth)/auth/page.tsx Makes auth page container fill available width/height.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -42,20 +42,21 @@ export default function AuthenticationModal() {
variant: "destructive",
});
throw new Error(error);
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

In the error branch you toast an error and then throw new Error(error), but the outer catch also toasts, which will likely result in duplicate error toasts for the same failure. Prefer a single error-reporting path (e.g., throw and let the catch toast, or toast and return without throwing).

Suggested change
throw new Error(error);
return;

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +55
if (redirect) {
router.push(redirect);
} else {
toast({
title: "Success",
description: "Signed in successfully",
variant: "success",
});
if (redirect) {
router.push(redirect);
} else {
router.push("/");
}
router.push("/");
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

redirect comes directly from a query string and is passed to router.push without validation. This can enable open-redirect behavior (e.g., redirect=https://evil.com) depending on how Next handles the value. Consider only allowing relative internal paths (e.g., redirect must start with / and must not start with //), otherwise fall back to /.

Copilot uses AI. Check for mistakes.
Comment on lines +59 to 61
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
} catch (error: any) {
toast({
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

The Biome suppression comment contains a placeholder (<explanation>) and the catch (error: any) is being silenced rather than handled. Please replace the placeholder with a real justification, or preferably remove the suppression by typing the catch param as unknown and safely deriving a message for the toast.

Copilot uses AI. Check for mistakes.
className="w-full"
>
<Card className="w-full min-h-[500px] !shadow-none rounded-3xl overflow-hidden border-t border-l border-r md:border-0 mt-96">
<Card className="w-full h-[600px] !shadow-none rounded-3xl overflow-hidden border-t border-l border-r md:border-0 p-0">
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

With the Card now having a fixed height (h-[600px]) and overflow-hidden, the wallet provider list can become inaccessible if it exceeds the available vertical space (there’s no overflow-y-auto on the bottom panel like the desktop modal has). Consider adding an internal scroll container for the wallet options area or removing overflow-hidden/fixed height so content can be reached on smaller screens.

Copilot uses AI. Check for mistakes.
@sirily11 sirily11 merged commit e61647c into main Feb 9, 2026
9 checks passed
@sirily11 sirily11 deleted the fix-login branch February 9, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants