Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request implements a complete "Forgot Password" and "Reset Password" authentication flow for the application. The changes introduce new pages with forms, validation schemas, success modals, and integrate seamlessly with the existing login flow through a "Forgot password?" link.
Key Changes:
- Added forgot password page with email submission form and success modal feedback
- Added reset password page with token-based password reset functionality and confirmation
- Enhanced reusable form components to support more flexible UI patterns (React nodes as labels, optional error hiding)
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/(public)/forgot-password/page.tsx | New forgot password page with email submission form, validation, and success modal |
| src/app/(public)/forgot-password/components/SuccessModal.tsx | Reusable success modal component for user feedback |
| src/app/(public)/forgot-password/schemas/forgotPasswordSchema.ts | Validation schema for forgot password form using shared email validation |
| src/app/(public)/reset-password/page.tsx | New reset password page that extracts token from URL and renders form |
| src/app/(public)/reset-password/components/ResetPasswordForm.tsx | Password reset form with visibility toggles, validation, and API integration |
| src/app/(public)/reset-password/schemas/resetPasswordSchema.ts | Validation schema ensuring passwords match and meet minimum requirements |
| src/app/(public)/login/component/LoginForm.tsx | Added "Forgot password?" link in password field label |
| src/app/(public)/login/component/FormField.tsx | Enhanced to accept React nodes as labels for more flexible UI composition |
| src/app/(public)/login/ui/controller/ControllerInput.tsx | Added optional hideError prop for custom error message positioning |
| src/app/(public)/login/schemas/loginSchema.ts | Extracted reusable emailSchema for consistent email validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request implements a complete "Forgot Password" and "Reset Password" flow in the application, including new pages, forms, validation, and user feedback modals. It also introduces some reusable UI improvements and schema sharing between authentication-related forms.
The most important changes are:
Forgot Password Flow:
ForgotPasswordPagewith a form for users to request a password reset by email, including validation, styled components, and user feedback via a modal on success. (src/app/(public)/forgot-password/page.tsx,src/app/(public)/forgot-password/components/SuccessModal.tsx,src/app/(public)/forgot-password/schemas/forgotPasswordSchema.ts)src/app/(public)/login/component/LoginForm.tsx,src/app/(public)/login/component/FormField.tsx)Reset Password Flow:
ResetPasswordPageand aResetPasswordFormcomponent, allowing users to set a new password using a token from their email. This includes form validation, password visibility toggles, and a success modal. (src/app/(public)/reset-password/page.tsx,src/app/(public)/reset-password/components/ResetPasswordForm.tsx)Shared Validation and UI Enhancements:
emailSchemafor consistent email validation across login and forgot password forms. (src/app/(public)/login/schemas/loginSchema.ts,src/app/(public)/forgot-password/schemas/forgotPasswordSchema.ts)ControllerInputcomponent to support optional hiding of error messages, which is used to customize error display in password fields. (src/app/(public)/login/ui/controller/ControllerInput.tsx)