[CP staging] Fix Not here page when changing approver then opening Expenses from in edit mode#93733
Conversation
…n edit mode Co-authored-by: Puneet Lath <puneetlath@users.noreply.github.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@abdulrahuman5196 @youssef-lr 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] |
|
|
|
@codex review |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.movweb2.mov |
|
|
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ 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". |
|
🚧 @puneetlath has triggered a test Expensify/App build. You can view the workflow run here. |
…otHere [CP staging] Fix Not here page when changing approver then opening Expenses from in edit mode (cherry picked from commit 87c7da8) (cherry-picked to staging by puneetlath)
|
🧪🧪 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/puneetlath in version: 9.4.8-3 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes required. This PR is a pure navigation bug fix: it keys the "Expenses from" It does not add, remove, or rename any feature, tab, setting, button, or user-facing workflow. The behavior documented in the approval-workflow help articles (e.g. Approve-Expenses.md) is unchanged — users set up workflows, pick approvers, and choose "Expenses from" exactly as before. The only difference is that an error page no longer appears when navigating back after an unsaved approver change. Since there's no change to documented product behavior, no draft docs PR was created. @puneetlath, since this is a behavior-preserving bug fix with no documented-behavior change, no help site PR was created. Please confirm you agree no docs update is needed — if you'd like one anyway, let me know and I'll open a draft. |
|
CP was passed by QA team, Chrome / v9.4.8-3 REC-20260616221815.mp4 |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.8-3 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/puneetlath in version: 9.4.9-0 🚀
Bundle Size Analysis (Sentry): |
Help site review: no docs changes requiredI reviewed this PR against the help site files under Why: This is a navigation bug fix only. It changes the It introduces no new feature, UI label, tab, setting, button, or user-facing workflow step. The existing approval-workflow articles ( Since no docs changes are needed, I did not create a help site draft PR. cc @puneetlath — let me know if you'd still like a docs PR opened for any reason. |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.9-0 🚀
|
Explanation of Change
When editing an existing approval workflow, opening Expenses from from the editor built the
backToroute keyed by the current (mutated) draft first approver (approvalWorkflow.approvers[0].email). If the admin had just changed the approver without saving, that draft approver no longer matched any persisted workflow. The edit page resolves its workflow frompolicy.employeeListby first-approver email, so pressing the RHP back button navigated to a non-existent workflow and rendered the full-page not-found ("Not here") view.This keys the
backTooff the persistedapprovalWorkflow.originalApprovers[0].emailinstead — the same field the siblingWorkspaceWorkflowsApprovalsExpensesFromPagegoBackalready uses — so back navigation always resolves to the real, persisted workflow.Fixed Issues
$ #93729
PROPOSAL: #93729 (comment)
Tests
Offline tests
Same as Tests.
QA Steps
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
CleanShot.2026-06-16.at.13.28.23.mp4