-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[HOLD for payment 2024-11-13] [HOLD for payment 2024-11-11] Validate account - Need to click "Didn't receive a magic code?" twice to restart timer #51797
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
Comments
Triggered auto assignment to @nkuoch ( |
💬 A slack conversation has been started in #expensify-open-source |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
Production: bandicam.2024-10-31.16-45-48-403.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Validate account - Need to click "Didn't receive a magic code?" twice to restart timer What is the root cause of that problem?We are adding this check
where What changes do you think we should make in order to solve the problem?This should be removed from App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Lines 158 to 160 in 6c33bba
since we aren’t including it on the sign-in page. App/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.tsx Lines 155 to 160 in 6c33bba
The function should run without the condition since there’s no button to click after the code is resent. What alternative solutions did you explore? (Optional) |
Edited by proposal-police: This proposal was edited at 2024-11-01 03:15:39 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Validate account - Need to click "Didn't receive a magic code?" twice to restart timer. What is the root cause of that problem?In the below condition, we check for App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Lines 158 to 160 in 6763f1a
This is faulty because What changes do you think we should make in order to solve the problem?To fix this, we need to change the condition to this:
We also need to update useEffect(() => {
if (timeRemaining > 0) {
timerRef.current = setTimeout(() => {
setTimeRemaining(timeRemaining - 1);
}, 1000);
+ } else {
+ setIsResent(false);
+ }
return () => {
clearTimeout(timerRef.current);
};
}, [timeRemaining]); We can also evaluate if we need to implement some changes in the way this system works on the sign in page. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Timer only restarts after clicking "Didn't receive a magic code?" for the second time What is the root cause of that problem?In App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Lines 158 to 160 in 6763f1a
However, App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Lines 233 to 234 in 6763f1a
Results in the resend logic not being called the first time. What changes do you think we should make in order to solve the problem?Instead of state, make const isResentRef = useRef(false) And update related logics: App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Lines 158 to 161 in 6763f1a
if (hasMagicCodeBeenSent && !isResentRef.current) {
return;
}
isResentRef.current = false; App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Lines 232 to 235 in 6763f1a
onPress={() => {
isResentRef.current = true;
resendValidateCode();
}} What alternative solutions did you explore? (Optional) |
Thanks your proposals so far, everyone! Can anyone find which PR may have caused this? |
cc @getusha |
Any plans to make this external? |
It's still in the regression period so I think @getusha will handle it. @Beamanator Please assign me and @getusha. |
You can have a look at my proposal: #51797 (comment) It might help. |
Thanks! @getusha and @hungvu193 should handle this one |
thanks @vitHoracek :D |
NoProblem @alexBeaman |
Merged & CPing |
Seems to be working in staging! Checking it off! |
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.56-9 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 2024-11-11. 🎊 For reference, here are some details about the assignees on this issue:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.57-10 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 2024-11-13. 🎊 For reference, here are some details about the assignees on this issue:
|
Issue is ready for payment but no BZ is assigned. @twisterdotcom you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks! |
Payment Summary
BugZero Checklist (@twisterdotcom)
|
Uh oh!
There was an error while loading. Please reload this page.
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.56-0
Reproducible in staging?: Y
Reproducible in production?: No, New feature
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Issue found when executing PR #51663
Action Performed:
Expected Result:
Timer will restart after clicking "Didn't receive a magic code?" for the first time
Actual Result:
Timer only restarts after clicking "Didn't receive a magic code?" for the second time
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6651149_1730381279823.20241031_212358.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: