You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-03-27] [$250] Profile - RBR appears in Profile settings after removing second contact method #57870
Version Number: 9.1.9-2 Reproducible in staging?: Yes Reproducible in production?: No 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:https://expensify.testrail.io/index.php?/cases/view/2654630 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: iPhone 15 iOS 18.1.1 Safari, MacBook Air Sonoma 14.1 App Component: User Settings
Action Performed:
Preconditions: gmail account added a second contact method (email)
Navigate to Settings tab - Profile - Contact method
Select a secondary contact method
Click Remove
Expected Result:
Secondary contact method is removed from the list without any error
Actual Result:
Red dot appears in Profile after removing second contact method. The RBR is removed after clearing cache.
changed the title [-]Profile - RBR appears in Profile settings after removing second contact method[/-][+][$250] Profile - RBR appears in Profile settings after removing second contact method[/+]on Mar 6, 2025
After remove contactMethod, we back to the SETTINGS_CONTACT_METHODS page. However, since Onyx updates and navigation asynchronously, As a result, we remain in ContactMethodDetailsPage for a short time, then a useEffect triggers resetContactMethodValidateCodeSentState.
which then requests the REQUEST_CONTACT_METHOD_VALIDATE_CODE command. Since we just deleted that second contact method, this request fails, leading to an RBR appearing.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A, this is a navigation issue. However, we could simulate Onyx data and assert that the resetContactMethodValidateCodeSentState is not called after deleting a contact.
What alternative solutions did you explore? (Optional)
We can return early if prevValidatedDate has a value instead of prevDeletedLogin.
We can return early if this is not the default contact method.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.15-9 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@fedirjh@NicMendonca@fedirjh The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[Contributor] 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:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
N/A we have both regression test and we have implemented automated test
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Mar 5, 2025
Triggered auto assignment to @NicMendonca (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.melvin-bot commentedon Mar 6, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021897762842116763600
[-]Profile - RBR appears in Profile settings after removing second contact method[/-][+][$250] Profile - RBR appears in Profile settings after removing second contact method[/+]melvin-bot commentedon Mar 6, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (
External)linhvovan29546 commentedon Mar 8, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-03-08 12:09:33 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Profile - RBR appears in Profile settings after removing second contact method
What is the root cause of that problem?
We remove
contactMethodhereApp/src/libs/actions/User.ts
Lines 269 to 270 in add7b6e
After remove
contactMethod, we back to theSETTINGS_CONTACT_METHODSpage. However, since Onyx updates andnavigationasynchronously, As a result, we remain inContactMethodDetailsPagefor a short time, then auseEffecttriggersresetContactMethodValidateCodeSentState.App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx
Lines 169 to 174 in add7b6e
This causes the
ValidateCodeActionFormto be displayed abit.App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx
Lines 165 to 167 in add7b6e
which then requests the
REQUEST_CONTACT_METHOD_VALIDATE_CODEcommand. Since we just deleted that second contact method, this request fails, leading to an RBR appearing.App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx
Line 337 in add7b6e
What changes do you think we should make in order to solve the problem?
We should not reset the contact method if there is a previously pending delete action
App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx
Lines 169 to 174 in add7b6e
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A, this is a navigation issue. However, we could simulate Onyx data and assert that the resetContactMethodValidateCodeSentState is not called after deleting a contact.
What alternative solutions did you explore? (Optional)
prevValidatedDatehas a value instead ofprevDeletedLogin.linhvovan29546 commentedon Mar 9, 2025
Proposal updated
18 remaining items
melvin-bot commentedon Mar 20, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.15-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 2025-03-27. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 20, 2025
@fedirjh @NicMendonca @fedirjh The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
NicMendonca commentedon Mar 28, 2025
Payment summary
C+: @fedirjh - $250 via NewDot Manual Requests
Contributor: @linhvovan29546 - $250 paid via Upwork (✅ paid)
NicMendonca commentedon Mar 28, 2025
@fedirjh just a bump on the checklist before we can close this out!
melvin-bot commentedon Apr 1, 2025
@fedirjh Whoops! This issue is 2 days overdue. Let's get this updated quick!
NicMendonca commentedon Apr 1, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
fedirjh commentedon Apr 2, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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: fix: unable to receive New Magic Codes for Primary Contact #55498 (comment)
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
N/A we have both regression test and we have implemented automated test
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
NicMendonca commentedon Apr 2, 2025
Thanks! reposting payment summary - #57870 (comment)
garrettmknight commentedon Apr 22, 2025
$250 approved for @fedirjh