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 2026-10-23] Magic code step is skipped after clicking Add work email when work email is existing account #104063
Version Number: 9.5.9-4 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#103652 Email or phone of affected tester (no customers):[email protected] Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Other
Action Performed:
Go to staging.new.expensify.com
Log in with new Gmail account.
Click Skip on work email step.
Click Join my company workspace.
Enter an existing account from private domain (eg, [email protected]).
Click Add work email.
Click Skip on magic code step.
Click back button.
Click Join my company workspace.
Click Add work email.
Expected Result:
Next step will be magic code step after clicking Add work email.
Actual Result:
Magic code step is skipped after clicking Add work email when work email is existing account.
👋 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:
Identify the pull request that introduced this issue and revert it.
Recommendation: Fix forward. Don't revert. It is a frontend bug, so DeployBlockerCash should stay. Production is not affected because the feature only exists on staging.
Root cause: Pressing Skip on the magic code screen stores isMergeAccountStepCompleted: true and isMergeAccountStepSkipped: true. Nothing clears those flags when you go back and add the work email again. When the magic code screen opens the second time, its navigation effect sees the old flags. It then sends you straight to Personal Details.
Recommended fix: In submitWorkEmail (BaseOnboardingWorkEmail.tsx#L250), clear isMergeAccountStepCompleted and isMergeAccountStepSkipped along with shouldValidate. The Join-workspace branch of that screen (L171-L180) doesn't read either flag, so this is safe. Add a UI test that covers skip, back, and add the same email again.
Magic code screen opens:AddWorkEmail returns shouldValidate: true, so the app opens the magic code screen (BaseOnboardingWorkEmail.tsx#L171-L180, added by the causing PR).
Magic code screen leaves at once: Its effect sees the old completed and skipped flags. With the Join-workspace intent, it navigates to Personal Details (BaseOnboardingWorkEmailValidation.tsx#L97-L132). The causing PR added that Join-workspace branch at L125-L128. Before that PR, you couldn't get back to the work email screen after skipping, so the flags were never stale.
Why not revert: The PR is an 80-file feature that has already been reverted and re-landed once. Another PR in this release also builds on it. The bug needs a narrow sequence of steps. Skipping the code never merges accounts, so there is no security or data-loss risk. If a fix can't land before the deploy, demoting the blocker is reasonable.
Other onboarding PRs in this release: None of them touch the merge-step flags or the magic code screen's navigation, so I ruled them out.
Alternative fix: Make the magic code screen react only when the flags change while it is open. To do that, store their values from when the screen opened in a ref.
Open question: Skipping the first work email screen (step 3, BaseOnboardingWorkEmail.tsx#L433) sets the same flags. The first pass still showed the magic code step, so a server update probably reset the onboarding data between steps 3 and 6. I couldn't confirm that from App code. It doesn't change the conclusion: the flags written at step 7 are never cleared before step 10.
changed the title [-]Magic code step is skipped after clicking Add work email when work email is existing account[/-][+][Due for payment 2026-10-23] Magic code step is skipped after clicking Add work email when work email is existing account[/+]on Oct 16, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.12-1 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 2026-10-23. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
applause-bot commentedon Oct 15, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/e4a55c70c2c792b381dba327a22088308f505e11a59479430f830577fd51338b
melvin-bot commentedon Oct 15, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #103652
melvin-bot commentedon Oct 15, 2026
@iwiznia @abzokhattab you have been assigned to this deploy blocker because you reviewed the offending PR: #103652
melvin-bot commentedon Oct 15, 2026
@carlosmiceli you have been assigned to this deploy blocker because you authored the offending PR: #103652
github-actions commentedon Oct 15, 2026
👋 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:
melvin-bot commentedon Oct 15, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Oct 15, 2026
Deploy Blocker Analysis
Causing PR: [Payment due @abzokhattab] Add the join-workspace onboarding intent and Concierge follow up tasks. Confidence: medium-high.
Recommendation: Fix forward. Don't revert. It is a frontend bug, so
DeployBlockerCashshould stay. Production is not affected because the feature only exists on staging.Root cause: Pressing Skip on the magic code screen stores
isMergeAccountStepCompleted: trueandisMergeAccountStepSkipped: true. Nothing clears those flags when you go back and add the work email again. When the magic code screen opens the second time, its navigation effect sees the old flags. It then sends you straight to Personal Details.Recommended fix: In
submitWorkEmail(BaseOnboardingWorkEmail.tsx#L250), clearisMergeAccountStepCompletedandisMergeAccountStepSkippedalong withshouldValidate. The Join-workspace branch of that screen (L171-L180) doesn't read either flag, so this is safe. Add a UI test that covers skip, back, and add the same email again.Investigation details
All links point to the 9.5.9-4 commit
978256f.setOnboardingMergeAccountStepValue(true, true)(BaseOnboardingWorkEmailValidation.tsx#L292-L299). That writes both flags (Welcome/index.ts#L119-L121).isMergingAccountBlocked(BaseOnboardingPurpose.tsx#L137-L148). Submitting the email callsclearOnboardingShouldValidate, which clears onlyshouldValidate(Welcome/index.ts#L111-L113, called at BaseOnboardingWorkEmail.tsx#L250-L253).AddWorkEmailreturnsshouldValidate: true, so the app opens the magic code screen (BaseOnboardingWorkEmail.tsx#L171-L180, added by the causing PR).Why not revert: The PR is an 80-file feature that has already been reverted and re-landed once. Another PR in this release also builds on it. The bug needs a narrow sequence of steps. Skipping the code never merges accounts, so there is no security or data-loss risk. If a fix can't land before the deploy, demoting the blocker is reasonable.
Other onboarding PRs in this release: None of them touch the merge-step flags or the magic code screen's navigation, so I ruled them out.
Alternative fix: Make the magic code screen react only when the flags change while it is open. To do that, store their values from when the screen opened in a ref.
Open question: Skipping the first work email screen (step 3, BaseOnboardingWorkEmail.tsx#L433) sets the same flags. The first pass still showed the magic code step, so a server update probably reset the onboarding data between steps 3 and 6. I couldn't confirm that from App code. It doesn't change the conclusion: the flags written at step 7 are never cleared before step 10.
view run
hungvu193 commentedon Oct 15, 2026
on it
[-]Magic code step is skipped after clicking Add work email when work email is existing account[/-][+][Due for payment 2026-10-23] Magic code step is skipped after clicking Add work email when work email is existing account[/+]melvin-bot commentedon Oct 16, 2026
@abzokhattab
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.12-1 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 2026-10-23. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]