[CP Stg] fixed proper navigations after creating reports#90928
Conversation
|
@eVoloshchak 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid1.movandroid2.movAndroid: mWeb ChromeiOS: HybridAppios1.movios2.moviOS: mWeb SafariMacOS: Chrome / Safariweb1.movweb2.mov |
| if (isSearchTopmostFullScreenRoute()) { | ||
| // Spend/Search tab: replace the upgrade screen within the RHP (same navigator, | ||
| // so forceReplace holds). Back returns to Spend > Reports. | ||
| Navigation.setNavigationActionToMicrotaskQueue(() => { | ||
| Navigation.navigate(ROUTES.SEARCH_MONEY_REQUEST_REPORT.getRoute({reportID: newReportID}), {forceReplace: true}); | ||
| }); | ||
| } else { | ||
| // Elsewhere (e.g. FAB): dismiss the upgrade RHP first, then open in Inbox, | ||
| // so back doesn't return to the upgrade step. | ||
| Navigation.dismissModalWithReport({reportID: newReportID}); |
There was a problem hiding this comment.
@MelvinBot is this existing pattern throughout the app?
There was a problem hiding this comment.
Yes — this is a well-established pattern throughout the app. isSearchTopmostFullScreenRoute() is used in 20+ files to branch navigation based on whether the user is in Search/Spend context vs elsewhere.
The closest analogues to this exact usage (report creation → navigate to the new report) are:
NewReportWorkspaceSelectionPage.tsx:98— same ternary:isSearchTopmostFullScreenRoute() ? SEARCH_MONEY_REQUEST_REPORT : REPORT_WITH_IDCreateReportMenuItem.tsx:89— identical branching for FAB "Create report"SearchActionsBarCreateButton.tsx:89— same pattern from the Search actions bar
There was a problem hiding this comment.
@MelvinBot ok but what about dismissModalWithReport?
3 instances you provided doesn't have this pattern.
PR ReviewSummary: This PR fixes two navigation regressions in the upgrade flow for report creation (
Verdict: Looks good. The approach is sound — using Minor observations (non-blocking)
|
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
The 3 non-blocking observations in my earlier comment were about the overall change (import, |
|
🚧 @marcaaron has triggered a test Expensify/App build. You can view the workflow run here. |
[CP Stg] fixed proper navigations after creating reports (cherry picked from commit d25c9f9) (cherry-picked to staging by marcaaron)
|
🧪🧪 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. |
|
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 9.3.75-13 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes required. This PR is a navigation bug fix only — it corrects which screen the app routes to after report creation in the upgrade flow (back button behavior + correct tab). No user-facing features, button labels, workflows, or documented steps were added or changed. The existing help articles under |
|
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 9.3.75-14 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. The changes are limited to internal navigation logic in |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.75-14 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 9.3.76-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.77-3 🚀
|
Explanation of Change
Fixed Issues
$ #90852
$ #90854
PROPOSAL:
Tests
#90852:
1.Sign in with a brand-new account that has no workspace.(e.g. use Something else option)
2.From the FAB and from the Reports/Expenses page, verify the Create report option is visible.
3.Click Create report.
4.Tap Upgrade, then Got it, thanks on the confirmation step.
5.Press back from the report and verify
#90854:
1.Create a new account.
2.Create a new workspace.
3.Go to Spend > Reports.
4.Click Create report.
→ New report opens in RHP on Spend tab.
5.Delete the report.
6.Delete the workspace.
7.Go to Spend > Reports.
8.Click Create report.
9.Click Upgrade > Confirm > Got it, thanks.
Verify new report will open in RHP on Spend tab.
Verify that no errors appear in the JS console
Offline tests
QA Steps
The same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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_app.mp4
Android: mWeb Chrome
android_web.mp4
iOS: Native
IOS_app.mp4
iOS: mWeb Safari
ios_web.mp4
MacOS: Chrome / Safari
web.mp4