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

[HOLD for payment 2023-06-21] [$1000] Login - "Magic code sent" below email field after go back from code input page offline #19867

Closed
5 of 6 tasks
lanitochka17 opened this issue May 30, 2023 · 32 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented May 30, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open https://staging.new.expensify.com/
  2. Input email into email field
  3. Tap "Continue"
  4. Disable the internet connection
  5. Click "Didn't receive a magic code?"
  6. Click "Go back"
  7. Enable the internet connection

Expected Result:

No messages appear in email input screen after going back online

Actual Result:

A message "Magic code sent!" appears below the email input field after going back online

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Safari
  • MacOS / Desktop

Version Number: 1.3.20-1

Reproducible in staging?: Yes

Reproducible in production?: Yes

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://platform.applause.com/services/links/v1/external/3d4252eff76baa6e91d6bee9290541864472ccb83d454db8509a2e5b6d7b07a8

https://platform.applause.com/services/links/v1/external/fc6da469ebfd90d76b6b239a7f2a9b7c235e9e50e2d12c1a85ecaa3245110f37

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a43ea4a6751f6484
  • Upwork Job ID: 1664315741336629248
  • Last Price Increase: 2023-06-01
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@hungvu193
Copy link
Contributor

hungvu193 commented May 31, 2023

Proposal

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

Login - "Magic code sent" below email field after go back from code input page offline

What is the root cause of that problem?

We allowed to resend the magic code when it was offline, so after user pressed resend magic code and pressed back, later when user was back online, the data from server will fill the account data, which has the message inside.

{!_.isEmpty(this.props.closeAccount.success || this.props.account.message) && (
// DotIndicatorMessage mostly expects onyxData errors, so we need to mock an object so that the messages looks similar to prop.account.errors
<DotIndicatorMessage
style={[styles.mv2]}
type="success"
messages={{0: this.props.closeAccount.success || this.props.account.message}}
/>

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

Since we disabled the Signin button when it's offline, it'd better to disable the Didn't receive a magic code? button when it's offline. We should also update its opacity to 50% to match the design.

 const disableStyles = this.props.network.isOffline ? styles.opacity50 : {}
    <PressableWithFeedback
        style={[styles.mt2, disableStyles]}
        onPress={this.resendValidateCode}
        underlayColor={themeColors.componentBG}
        hoverDimmingValue={1}
        pressDimmingValue={0.2}
   
        disabled={this.props.network.isOffline}
        accessibilityRole="button"
        accessibilityLabel={this.props.translate('validateCodeForm.magicCodeNotReceived')}
    >
        <Text style={[styles.link]}>{this.props.translate('validateCodeForm.magicCodeNotReceived')}</Text>
    </PressableWithFeedback>

What alternative solutions did you explore? (Optional)

N/A

@sakluger sakluger added the External Added to denote the issue can be worked on by a contributor label Jun 1, 2023
@melvin-bot melvin-bot bot changed the title Login - "Magic code sent" below email field after go back from code input page offline [$1000] Login - "Magic code sent" below email field after go back from code input page offline Jun 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

Current assignee @sakluger is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

Triggered auto assignment to @pecanoro (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@sakluger
Copy link
Contributor

sakluger commented Jun 1, 2023

Reproduced and agree that this is a bug. I like @hungvu193's proposal to just remove the "Didn't receive magic link" link when offline, curious to hear @pecanoro and @sobitneupane's thoughts.

@sakluger
Copy link
Contributor

sakluger commented Jun 4, 2023

I'm going to be OOO all next week, so I'm going to add another BugZero assignee to keep this moving while I'm out.

@sakluger sakluger removed their assignment Jun 4, 2023
@sakluger sakluger added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jun 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 4, 2023

Triggered auto assignment to @trjExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@sakluger sakluger self-assigned this Jun 4, 2023
@trjExpensify
Copy link
Contributor

I like @hungvu193's proposal to just remove the "Didn't receive magic link" link when offline, curious to hear @pecanoro and @sobitneupane's thoughts.

I don't think we should "remove" the link. If it's following pattern C, it should appear disabled. Looking up the offline support in the Passwordless doc it should be following pattern c - so not sure where that got broken. CC: @johnmlee101 @NikkiWines

(Link on below only accessible by internal employees)

Of the existing password flows that exist on NewDot today that aren’t removed with the changes below, those will be changed into Pattern C offline support- meaning that they will require online access to both request the magic link/code, and also enter it into the UI.These flows are outlined in the detailed section below.

@hungvu193
Copy link
Contributor

Since we disabled the Signin button when it's offline, it'd better to disable the Didn't receive a magic code? button when it's offline.

I think my proposal is only to disable the button when user's offline.

@NikkiWines
Copy link
Contributor

I agree with @trjExpensify. We should disable the Didn't receive magic link link when the user is offline, not remove it.

@sobitneupane
Copy link
Contributor

How should Didn't receive a magic code? look when disabled? Would we want it to be grayed as disabled button?

@trjExpensify
Copy link
Contributor

Yes, I suspect the opacity would be reduced to 50%. Though @NikkiWines, how did this look on original implementation from the doc?

CC: @shawnborton

@benjaminbennet
Copy link

is this issue opening for proposal?

@NikkiWines
Copy link
Contributor

50% opacity sounds good to me, not sure we had specific styling outlined in the doc + the UI has changed a bunch from the original implementation as well 😅

@sobitneupane
Copy link
Contributor

@hungvu193 Please take your time to test and update your proposal. We want 50% opacity only when user if offline not always.

@hungvu193
Copy link
Contributor

@sobitneupane my bad 😄 . I've updated it again

@sobitneupane
Copy link
Contributor

Thanks @hungvu193.

Proposal from @hungvu193 looks good to me.

🎀👀🎀 C+ reviewed
cc: @pecanoro

@pecanoro
Copy link
Contributor

pecanoro commented Jun 8, 2023

Sounds good! Assigning @hungvu193

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 8, 2023

📣 @hungvu193 You have been assigned to this job by @pecanoro!
Please apply to this job in Upwork 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jun 8, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Login - "Magic code sent" below email field after go back from code input page offline [HOLD for payment 2023-06-21] [$1000] Login - "Magic code sent" below email field after go back from code input page offline Jun 14, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 14, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Jun 14, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.27-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-06-21. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue - sent to @hungvu193
  • Contributor+ that helped on the issue and/or PR - sent to @sobitneupane

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jun 14, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@sobitneupane] Determine if we should create a regression test for this bug.
  • [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@sakluger / @trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@Expensify Expensify deleted a comment from melvin-bot bot Jun 16, 2023
@sakluger
Copy link
Contributor

Thanks for the fast work! This one qualifies for the efficiency bonus. As soon as the 7-day hold is over and the BZ checklist is complete, I can pay out and close.

@sakluger
Copy link
Contributor

Hey @sobitneupane mind finishing the BZ checklist so I can complete payment? Thanks!

@sakluger sakluger added Daily KSv2 and removed Weekly KSv2 labels Jun 21, 2023
@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Jun 21, 2023
@sakluger
Copy link
Contributor

Bump @sobitneupane

@sobitneupane
Copy link
Contributor

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

#13655

  • [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

#13655 (comment)

  • [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

https://expensify.slack.com/archives/C049HHMV9SM/p1687539235356429

  • [@sobitneupane] Determine if we should create a regression test for this bug.

I don't think we need a separate regression test here.

@sakluger
Copy link
Contributor

Thanks! We're all good here 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants