Repository navigation
fix: Code does not arrive when adding contact method with new user - #99909
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c41bca400
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| { | ||
| onyxMethod: Onyx.METHOD.MERGE, | ||
| key: ONYXKEYS.VALIDATE_ACTION_CODE, | ||
| value: { | ||
| lastValidateCodeRequestedAt: null, | ||
| lastValidateCodeReason: null, |
There was a problem hiding this comment.
Clear the global request stamp only for account validation
When validateSecondaryLogin() is invoked from DynamicContactMethodDetailsPage, the code being validated was sent by requestContactMethodValidateCode() and is tracked on the login, not by VALIDATE_ACTION_CODE. Unconditionally clearing this global stamp therefore erases any unrelated recent account-level code request; returning to that account-code flow within the resend window makes ValidateCodeActionContent send another email instead of deduplicating it. Restrict this cleanup to the VerifyAccountPageBase use case, such as through a caller-controlled flag.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The impact is small and it would make the code more complicated, so I think it's fine to leave as is
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-09-04.at.17.11.20.movAndroid: mWeb ChromeScreen.Recording.2026-09-04.at.16.48.15.moviOS: HybridAppScreen.Recording.2026-09-04.at.17.08.59.moviOS: mWeb SafariScreen.Recording.2026-09-04.at.16.50.40.movMacOS: Chrome / SafariScreen.Recording.2026-09-04.at.16.29.48.mov |
|
🚧 AndrewGable has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/AndrewGable in version: 9.4.73-0 🚀
|
|
No help site changes are required by this PR itself — but I opened a draft PR for one UI-label mismatch I found in the article that covers this exact flow: #100484. Why this PR needs no doc changesThis is a bug fix that restores already-documented behavior. The article on updating contact methods already tells members that after adding a new email or phone number they should "Enter the verification code sent to the new contact method." That code simply wasn't arriving for a brand-new, unvalidated user. The fix makes it arrive. Nothing here adds a feature, changes a workflow, renames a label, or introduces new UI — so no article content needed rewriting. What the change actually does
None of that is member-visible beyond "the code now arrives," which the docs already assume. What the draft PR does fixWhile checking the article against the live UI, the button label didn't match:
I checked the rest of the article against the live UI too — the Account navigation tab, the Public section, the Contact methods row, and the account-verification code step that appears before you enter the new email address are all accurate. The draft PR has the @nkdengineer, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.73-3 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
fix: Code does not arrive when adding contact method with new user
Fixed Issues
$ #98872
PROPOSAL: #98872 (comment)
Tests
Offline tests
QA Steps
Same as test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-08-31.at.21.02.44.mov
Android: mWeb Chrome
Screen.Recording.2026-08-31.at.20.52.02.mov
iOS: Native
Screen.Recording.2026-08-31.at.21.04.50.mov
iOS: mWeb Safari
Screen.Recording.2026-08-31.at.20.55.01.mov
MacOS: Chrome / Safari
Screen.Recording.2026-08-31.at.20.48.49.mov