fix: After switching from Time to Manual and creating manual expense, expense report opens#85760
Conversation
|
@aimane-chnaif 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] |
trjExpensify
left a comment
There was a problem hiding this comment.
Makes sense to be consistent. 👍
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-03-20.at.4.22.06.pm.mov |
🤖 MelvinBot Code Review — PR #85760SummaryThis PR fixes a bug where navigating back from the Time tab's confirmation page to the Manual tab caused the Changes Review1. The The conditional 2. Adds 3. Adds 4. Passes 5. Destructures CI Status
VerdictClean, focused fix that matches the approved proposal. The route restructuring correctly moves |
|
@Eskalifer1 please pull main to fix tests |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56ac4951c7
ℹ️ 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".
| MONEY_REQUEST_CREATE_TAB_MANUAL: { | ||
| route: 'manual/:backToReport?', | ||
| route: 'manual', | ||
| getRoute: (action: IOUAction, iouType: IOUType, transactionID: string, reportID: string, backToReport?: string) => | ||
| `${action as string}/${iouType as string}/start/${transactionID}/${reportID}/manual/${backToReport ?? ''}` as const, | ||
| `${action as string}/${iouType as string}/start/${transactionID}/${reportID}${backToReport ? `/${backToReport}` : ''}/manual` as const, |
There was a problem hiding this comment.
Keep the previous create-expense tab path as an alias
This moves backToReport from the tab suffix to the parent segment (.../manual/<backToReport> → .../<backToReport>/manual, and similarly for the other tabs), but there is no migration in src/libs/Navigation/helpers/getMatchingNewRoute.ts or src/libs/Navigation/linkingConfig/OldRoutes.ts. src/libs/Navigation/NavigationRoot.tsx restores lastVisitedPath on startup, so any in-progress create-expense flow saved by the previous build will stop restoring after this deploy; the same applies to browser history/deep links that still use the old tab URLs.
Useful? React with 👍 / 👎.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🚧 @puneetlath 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 production by https://github.com/Julesssss in version: 9.3.43-3 🚀
|
Explanation of Change
When a user returned from creating a time expense (from the confirmation page) to the Manual tab and created a manual expense within an empty report, the user was redirected to the report. This PR fixes that bug. The reason was that the Time tab did not pass the
backToReportparameter along, nor did it handle the return from the confirmation page, causing this parameter to be lostFixed Issues
$#81561
PROPOSAL:#81561 (comment)
Tests
Precondition:
Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
81561-android-native.mp4
Android: mWeb Chrome
81561-android-web.mp4
iOS: Native
81561-ios-native.mp4
iOS: mWeb Safari
81561-ios-web.mp4
MacOS: Chrome / Safari
81561-web.mp4