Skip to content

Conversation

Ladirico
Copy link
Contributor

@Ladirico Ladirico commented Oct 16, 2025

This pull request introduces a minor update to the email validation flow. The most significant changes ensure that polling is properly stopped on error and not send double validation email

Email validation flow improvements (IOPID-3487):

  • Added a call to stopPollingSaga() when an error occurs during the email validation request to ensure polling is stopped and resources are cleaned up.
  • Updated the dependency array of the relevant useEffect to include stopPollingSaga, ensuring proper effect behavior.

Double email validation (IOPID-3480):

  • The parameter that manages when the email address verification email should be sent, in order to prevent the user from receiving two verification emails.

Copy link
Contributor

github-actions bot commented Oct 16, 2025

Jira Pull Request Link

This Pull Request refers to Jira issues:

Copy link
Contributor

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

@Ladirico Ladirico self-assigned this Oct 16, 2025
@Ladirico Ladirico added IO-A&I IO - Autenticazione e Identità Bug 🐞 and removed Bug 🐞 labels Oct 16, 2025
@Ladirico Ladirico marked this pull request as ready for review October 16, 2025 15:04
Copy link

@Copilot 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

This PR fixes two issues in the email validation flow: ensures proper cleanup of polling resources when validation fails, and prevents duplicate validation emails from being sent to users.

Key Changes:

  • Added stopPollingSaga() call on validation error to clean up polling resources
  • Updated useEffect dependency array to include stopPollingSaga for proper effect behavior
  • Fixed sendEmailAtFirstRender parameter to prevent duplicate validation emails

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
EmailValidationSendEmailScreen.tsx Added polling cleanup on error and updated effect dependencies
EmailInsertScreen.tsx Fixed parameter controlling when validation email is sent

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

params: {
isOnboarding,
sendEmailAtFirstRender: isOnboarding
sendEmailAtFirstRender
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The change from isOnboarding to sendEmailAtFirstRender appears problematic. The variable sendEmailAtFirstRender is not defined in the visible context, which will cause a runtime error. If this variable should be derived from isOnboarding or another source, it needs to be defined before being passed as a parameter.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IO-A&I IO - Autenticazione e Identità

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant