Fix: return to confirmation page after creating a category from the confirm step#93247
Fix: return to confirmation page after creating a category from the confirm step#93247MelvinBot wants to merge 1 commit into
Conversation
… step Co-authored-by: huult <huult@users.noreply.github.com>
|
I looked into the failing checks. There's no code fix to push — the only failing check is Why it fails: the PR Author Checklist requires every box in the PR description to be checked, and those are human-only items (the Every substantive check passes: To get the checklist passing: as the human co-author, fill out the |
|
@MelvinBot Please check the ESLint failure and complete the checklist. Test step:
|
|
The failing What's failing ESLint fails in The seatbelt baseline at Why it's not this PR This PR changes a single line in Evidence it's repo-wide Other unrelated open PRs are failing the exact same check for the exact same file/rule (466 vs 450):
What needs to happen This is a The only other failing check, |
|
@MelvinBot please complete the checklist and mark it's ready. Test step:
|
|
@MelvinBot open this pr |
The failing ESLint check is unrelated to this PRTL;DR: The What's failing: Evidence it's unrelated to this PR:
Where the drift came from
Recommended fix (separate PR, not this one): On On the PR Author Checklist: those items are human attestations ("I tested on all platforms", "I verified there are no console errors", etc.) and the |
|
@MelvinBot please open this PR |
|
@thelullabyy 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-06-11.at.13.01.12.mov |
huult
left a comment
There was a problem hiding this comment.
LGTM.
@mjasikowski The ESLint failure doesn't appear to be caused by this PR. Do we still need to ask Melvin to fix it?
|
This PR is already open and marked Ready for review (it's not a draft). No action needed on my end to open it. Heads up before reviewers dig in: the |
|
@MelvinBot please complete the checklist Test step:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a0aa9869b8
ℹ️ 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".
| return; | ||
| } | ||
| Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CATEGORY_CREATE.getRoute(action, iouType, transactionID, reportID, reportActionID, Navigation.getActiveRoute())); | ||
| Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CATEGORY_CREATE.getRoute(action, iouType, transactionID, reportID, reportActionID, backPath)); |
There was a problem hiding this comment.
Preserve category picker when cancelling category creation
When a user opens Add category from the category picker and then presses the create page's back button without saving, this now passes the confirmation route as backTo; IOURequestStepCategoryCreate uses that same param in onBackButtonPress={() => Navigation.goBack(backTo)}, so canceling skips the category picker and returns to confirmation. The previous Navigation.getActiveRoute() kept cancel/back on the category list, while only the save path needs to return to confirmation, so these two destinations need to stay separate.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Preserve category picker when cancelling category creation
When a user opens Add category from the category picker and then presses the create page's back button without saving, this now passes the confirmation route as
backTo;IOURequestStepCategoryCreateuses that same param inonBackButtonPress={() => Navigation.goBack(backTo)}, so canceling skips the category picker and returns to confirmation. The previousNavigation.getActiveRoute()kept cancel/back on the category list, while only the save path needs to return to confirmation, so these two destinations need to stay separate.Useful? React with 👍 / 👎.
@MelvinBot Please check Codex's comment.
|
I ran your test steps on the web build and the fix works correctly. ✅ Verified flow: Workspace chat → + → Create expense → Manual → enter amount → Next → Category → Add category → enter name → save. After saving the new category, the app lands on the expense confirmation page ("Confirm details") with the newly created category pre-selected — not the category list. This is exactly the regression this PR fixes. Verification details
On completing the PR Author Checklist itself: I can't tick those boxes for you. They're personal attestations by the human author — several of them certify that you ran the change on Android Native, iOS Native, mWeb, and Desktop and personally verified no console errors. I only exercised the web build, so checking the all-platforms boxes on your behalf would be a false attestation, which is exactly what MelvinBot is not allowed to do. You can use the verification + screenshot above as evidence toward the (The red |
|
⏱️ Ran out of time before I could finish. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in #melvinbot-ai. |
Codex is right — this PR fixes Save but leaves Cancel/Back pointing at the wrong screenVerdict: Valid concern. The create-category page uses the same Why both paths move together:
Evidence this is a regression, not the intended designThe original behavior (before the navigation migration in // pre-#92161 back button (returned to the picker):
onBackButtonPress={() => Navigation.goBack(ROUTES.MONEY_REQUEST_STEP_CATEGORY.getRoute(action, iouType, transactionID, reportID, backTo, reportActionID))}
Recommended fix: Keep this PR's change to
|
|
@huult check #93247 (comment) |
|
@MelvinBot Please close this PR |
1 similar comment
|
@MelvinBot Please close this PR |
|
Closed this PR as requested by |

Explanation of Change
Fixes a regression from #92161 (navigation migration part 2). When opening Category → Add category from the expense confirmation step and saving a new category, the app returned the user to the category list instead of the confirmation page.
During the migration, the create-category page's back button was simplified to
Navigation.goBack(backTo), and the "Add category" navigation was changed to passNavigation.getActiveRoute()(the category list page) asbackTo. Because the save handler also usesNavigation.goBack(backTo), saving incorrectly landed back on the category list.This change passes the page's computed
backPath(the confirmation step) instead ofNavigation.getActiveRoute(), so saving a newly created category returns the user to the confirmation page — matching the behavior of selecting an existing category, which already usesgoBack(backPath).Fixed Issues
$ #93226
PROPOSAL: #93226 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari