Skip to content

fix: prevent duplicate forgot password modal and validate reset email#2097

Open
Hasini2706 wants to merge 5 commits into
SB2318:mainfrom
Hasini2706:fix/forgot-password-modal-2060
Open

fix: prevent duplicate forgot password modal and validate reset email#2097
Hasini2706 wants to merge 5 commits into
SB2318:mainfrom
Hasini2706:fix/forgot-password-modal-2060

Conversation

@Hasini2706

Copy link
Copy Markdown
Contributor

PR Description

This PR fixes the Forgot Password flow by preventing the modal from reopening after submission and ensuring the email sent to the backend is trimmed and consistent.

Type of Change

  • Bug fix (change which fixes an issue)

Select your work-area

  • Frontend

Related Issue

Fixes #2060

Add your Work Example

N/A (UI behavior fix)

Fixes (mention the issue number which this fixes)

Closes #2060

Checklist

  • I have updated my branch and synced it with the project's 'develop' branch before making this PR.
  • I have optimized the file changes.
  • I have added a snapshot of my work example.
  • I have made a PR to the project's develop branch.

Undertaking

  • My code follows the style guidelines of this project.

  • I have performed a self-review of my code.

  • I have commented my code, particularly in hard-to-understand areas.

  • I have made corresponding changes to the documentation.

  • I have checked for plagiarism and assure its authenticity.

  • I have read and followed the code of conduct for this repository.

  • I Agree

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Thank you @, for creating the PR and contributing to our UltimateHealth project 💗.
Our team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Automated Review Feedback

Provide actionable comments grouped by severity:

Suggestions

  • Redundant .trim() call: In frontend/src/components/EmailInputModal.tsx, line 49, the .trim() call on callback(data.email.trim()); is redundant. The Zod schema z.string().trim() already ensures that data.email is trimmed by the time it reaches the verifyEmail function. You can safely remove .trim() from this line.
  • Visual Work Example: Although the PR description states "N/A (UI behavior fix)", for UI behavior fixes like preventing a modal from reopening, providing a short video or GIF demonstrating the fix would be very helpful for reviewers to quickly verify the change. Consider adding one in the future for similar PRs.

Maintainer Note:

Once the initial automated feedback has been addressed, maintainer @SB2318 will review the pull request for final evaluation.

@Hasini2706 Hasini2706 force-pushed the fix/forgot-password-modal-2060 branch from 1123e03 to 85d1d7b Compare July 8, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix : Forgot Password Modal Reappearing & Verify Email Sent to Backend

1 participant