Repository navigation
Let Android back leave onboarding work email when the intent list opened it - #104025
Conversation
…ned it Co-authored-by: Carlos Miceli <carlosmiceli@users.noreply.github.com>
|
@linhvovan29546 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] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@MelvinBot fix conflicts |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bcda5d9c2
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
🤖 Android test steps verification results: ❌ fail I couldn't test the fix on Android. The test account already had an onboarding purpose saved, so onboarding skipped the intent list and "Join my company workspace" never appeared. This result says nothing about whether the fix works. To test it, rerun with a new account that hasn't reached the intent list yet. I used the linked issue's repro steps because the PR's Tests section is still a placeholder.
|
…orkEmailBackButton Co-authored-by: Carlos Miceli <carlosmiceli@users.noreply.github.com> # Conflicts: # src/pages/OnboardingWorkEmail/BaseOnboardingWorkEmail.tsx # tests/ui/WorkEmailOnboardingNativeBack.tsx
|
@FitseTLT @iwiznia @carlosmiceli One of you needs to 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] |
|
I merged
Checks:
|
|
Should I review this @carlosmiceli ? |
|
@FitseTLT yes, that'd be great |
|
I agree with both comments. They point to the same fix: Android back should use the same check and the same action as the header Back button.
Suggested change: Pull the header's back logic into one handler in
|
|
@MelvinBot implement it |
|
I can't make this change yet. The planned change is in my earlier comment: move the header Back logic ( I can only make code changes when directed by the PR author, an assignee, or an existing co-author. To have me implement this, the PR assignee or author should reply with a request tagging me. |
|
@MelvinBot implement it |
Android back now uses the header's check (join intent, not the Concierge task flow) instead of the route index, and goes back to the intent list the same way. This keeps the user in onboarding after a cold start, when work email is the only route. Co-authored-by: Fitsum Abebe <FitseTLT@users.noreply.github.com>
|
I made the change in 0a90839. Android back now uses the same check and the same action as the header Back button, so the two can't drift apart.
I also updated the PR description to match. Checks:
|
|
Thanks @FitseTLT for reviewing this one. Can you please test the changes on Android |
Yes Done. |
|
@MelvinBot update test steps to |
|
I updated the Tests section of the PR description with your steps:
The QA Steps section still has the TODO placeholder. Tell me if you want it set to "Same as tests" or to different steps. |
JmillsExpensify
left a comment
There was a problem hiding this comment.
Testing steps LGTM
|
yes @MelvinBot set it to Same as tests |
|
I set the QA Steps section of the PR description to "Same as tests". I left the JS console checkbox as it was. |
|
🚧 carlosmiceli has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.5.10-0 🚀
|
|
No help site update needed. This bug fix lets the back button leave the "What's your work email?" step during onboarding and stops a stray error, which is what users already expect, and no article describes the old behavior. |
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.5.12-0 🚀
|
|
No help site update needed. This bug fix lets the back button leave the "What's your work email?" onboarding screen and stops a stray setup error, which is what users already expect, and no article under |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.12-1 🚀
Bundle Size Analysis (Sentry): |






Explanation of Change
The join-workspace intent added a second way to reach the "What's your work email?" screen: from the intent list. On Android,
OnboardingWorkEmail/index.native.tsxstill blocked every hardware back press and set the "Please finish the setup questions" error. That made sense when the screen always opened onboarding, but now it traps users who came from the intent list.Android back now runs the same logic as the header Back button. Both live in one place in
BaseOnboardingWorkEmail:isJoiningCompanyWorkspace && !isConciergeTaskFlow. This replaces therouteIndex !== 0check, which was wrong after a cold start or deep link. In that case the onboarding stack is rebuilt with work email as its only route, so the index is 0 even though the user chose the join intent.clearOnboardingMergeAccountBlocked()and thenNavigation.goBack(ROUTES.ONBOARDING_PURPOSE.getRoute()). This pops to the intent list when it's in the stack, or replaces work email with it. Either way, the user stays in onboarding. A plain stack pop would close the onboarding modal when work email is the only route.The handler is registered with
useAndroidBackButtonHandler, which does nothing on web and iOS. TheBackHandlercode inindex.native.tsxis removed.Tests in
tests/ui/WorkEmailOnboardingNativeBack.tsx:Fixed Issues
$ #104023
PROPOSAL: #104023 (comment)
Tests
Precondition: Test it on Android
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
AI Tests
npm run linton the changed files: passednpm run typecheck: passednpm run react-compiler-compliance-check checkon the changed files: passednpm run spell-changedon the changed files: passedtests/ui/WorkEmailOnboardingNativeBack.tsx,WorkEmailOnboarding.tsx,WorkEmailOnboardingNavigation.tsx: 64/64 passednpm testsuite, the Storybook smoke test, and theoxfmtformat check (blocked in this environment)