Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] Refactor SMS Delivery Failure sign in flow #53980

Open
carlosmiceli opened this issue Dec 12, 2024 · 9 comments
Open

[$250] Refactor SMS Delivery Failure sign in flow #53980

carlosmiceli opened this issue Dec 12, 2024 · 9 comments
Assignees
Labels
Daily KSv2 External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement.

Comments

@carlosmiceli
Copy link
Contributor

carlosmiceli commented Dec 12, 2024

We need to refactor the existing flow blacklisting phone numbers (see steps in screenshots). This is triggered when the user tries to sign in with a phone number that failed to receive Twilio SMS. This is a follow up to this issue.


When calling BeginSignIn, if response[smsDeliveryFailureStatus] is not null, then it should display the following message:

"We've been unable to deliver SMS messages to [PHONE-NUMBER], so we've suspended it for 24 hours. Please try validating your number:"

There should also be a "Validate" button that calls ResetSMSDeliveryFailure.

If response[hasSMSDeliveryFailure]is set totrue, we should display Validation failed because it hasn't been 24 hours since your last attempt. ${response.message} and a "Got it" button that sends the user back to the beginning of the sign in flow.

If response[hasSMSDeliveryFailure]is set tofalse, we should display Your number has been validated! Click below to send a new magic sign-in code. and a "Send" button that calls BeginSignIn as usual.

Once this is complete and merged I'll do the internal QA with the BE.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021867038175379475893
  • Upwork Job ID: 1867038175379475893
  • Last Price Increase: 2024-12-12
  • Automatic offers:
    • nyomanjyotisa | Contributor | 105327292
Issue OwnerCurrent Issue Owner: @hungvu193
@carlosmiceli carlosmiceli added Daily KSv2 Improvement Item broken or needs improvement. labels Dec 12, 2024
@carlosmiceli carlosmiceli self-assigned this Dec 12, 2024
@carlosmiceli carlosmiceli added the External Added to denote the issue can be worked on by a contributor label Dec 12, 2024
@melvin-bot melvin-bot bot changed the title Refactor SMS Delivery Failure sign in flow [$250] Refactor SMS Delivery Failure sign in flow Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021867038175379475893

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 (External)

@nyomanjyotisa
Copy link
Contributor

nyomanjyotisa commented Dec 12, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Refactor SMS Delivery Failure sign in flow

What is the root cause of that problem?

Improvement

What changes do you think we should make in order to solve the problem?

We should change smsDeliveryFailureMessage on both en and es translation files

    smsDeliveryFailurePage: {
        smsDeliveryFailureMessage: ({login}: OurEmailProviderParams) =>
            `We've been unable to deliver SMS messages to ${login}, so we've suspended it for 24 hours. Please try validating your number:`,
    },

We should also change this button to text={translate('common.validate')}

And on Validate button click, execute new function that we will create, which is Session.ResetSMSDeliveryFailure

function resetSMSDeliveryFailure(email: string) {
    const params: ResetSMSDeliveryFailureParams = {email};

    API.write(WRITE_COMMANDS.RESET_SMS_DELIVERY_FAILURE, params);
}

image

We should also update the UI on SMSDeliveryFailurePage based on the API response

If hasSMSDeliveryFailure is true from the ResetSMSDeliveryFailure calls, show the message and Got it button. Got it button should execute Session.clearSignInData

image

If hasSMSDeliveryFailure is false from the ResetSMSDeliveryFailure calls, show the message and Send button. Send button should execute Session.beginSignIn which will navigate to enter magic code screen

image

To check if response from smsDeliveryFailureStatus is not null we can change this code to this
const hasSMSDeliveryFailure = !!account?.smsDeliveryFailureStatus;

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

What alternative solutions did you explore? (Optional)

@hungvu193
Copy link
Contributor

I'll review proposal tomorrow.

@carlosmiceli
Copy link
Contributor Author

@hungvu193 thank you, this is kinda urgent but tomorrow works! 👍

@hungvu193
Copy link
Contributor

Reviewing shortly

@hungvu193
Copy link
Contributor

@nyomanjyotisa 's proposal looks good to me!

🎀 👀 🎀

Copy link

melvin-bot bot commented Dec 13, 2024

Current assignee @carlosmiceli is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 13, 2024
Copy link

melvin-bot bot commented Dec 13, 2024

📣 @nyomanjyotisa 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement.
Projects
None yet
Development

No branches or pull requests

3 participants