-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix time expense confirm page back button navigation when submitting from report details RHP #79673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix time expense confirm page back button navigation when submitting from report details RHP #79673
Conversation
…from report details RHP
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b30bd30280
ℹ️ 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".
| } | ||
| if (isTimeRequest) { | ||
| if (isMovingTransactionFromTrackExpense) { | ||
| return Navigation.goBack(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouType, initialTransactionID, transaction?.reportID ?? reportID, undefined, action), { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fall back when reportID is unreported
When submitting a tracked time expense that skips the participants step (e.g. preferred-policy auto‑assignment), the draft transaction can still have reportID set to UNREPORTED_REPORT_ID ('0'), because the auto‑assignment path only sets participants. With transaction?.reportID ?? reportID, the back button will pop to a participants route built with reportID 0 instead of the confirmation route’s reportID, which resets the selected workspace/participants and shows the wrong report. Consider explicitly falling back when the transaction reportID is unreported (or just use the route reportID).
Useful? React with 👍 / 👎.
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix makes sense 👍
| if (isTimeRequest) { | ||
| if (isMovingTransactionFromTrackExpense) { | ||
| return Navigation.goBack(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouType, initialTransactionID, transaction?.reportID ?? reportID, undefined, action), { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhawryluk I think the problem is caused by this block: if (isTimeRequest). Why do we need it? It could also cause the same issue in the future when creating time expenses via global create
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right. I removed this block and updated the navigateToStartMoneyRequestStep function to support time and it works perfectly for when creating a request. however when submitting an expense from report details RHP, when we refresh the page and then click the back button the RHP is dismissed instead of navigating back to the participant page. but I think that's how it works for every other request type, so it's probably okay, right?
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-01-16.at.23.18.34.mov |
|
@grgia Kindly bump |
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.3.5-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.5-7 🚀
|
Explanation of Change
Makes it so that the RHP back button correctly navigates back to the participant page, instead of to the "create expense" RHP, when submitting a time expense from report details RHP.
Fixed Issues
$ #79578
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
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: mWeb Chrome
iOS: Native
Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2026-01-15.at.14.28.16.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
Nagranie.z.ekranu.2026-01-15.o.14.23.22.mov