Repository navigation
Fix Submit to my employer: Report field showing None and back button swapping the report - #97057
Conversation
…cker is skipped "Submit to my employer" auto-skips the destination picker when there is exactly one accessible workspace, but the picker is also what rebinds the draft transaction from the self DM's unreported ID to the destination expense chat. Skipping it left the draft unreported, so the confirmation page rendered "None" for the report instead of "New report" and resolved the policy from the self DM rather than the destination workspace. The restricted-preferred-workspace branch skips the picker the same way and had the same gap, so it gets the same binding.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
The confirmation page's backTo pointed at the report the tracked expense lives on (the self DM), but the user may have drilled into the expense thread before starting the flow. A report route resolves to TAB_NAVIGATOR -> REPORTS_SPLIT_NAVIGATOR -> REPORT, and because the RHP is focused, goUp cannot descend into the tab navigator: it matches the tab navigator at the root and dispatches POP_TO, which rebuilds the central pane from the payload. So going back closed the RHP and swapped the central pane to the self DM. Point backTo at the report actually displayed behind the RHP, falling back to the expense's report when no report is the topmost fullscreen (e.g. the flow was started from Search).
The flow's unit tests mock isReportTopmostSplitNavigator, so nothing verified that the real helper resolves the report behind an RHP. Assert it against a real navigation container for both the report tab and the Search tab.
|
@hungvu193 this is ready for review |
|
Sorry for the ping @dmkt9. I'll handle it |
|
Both issues are fixed. I'm reviewing the codes Screen.Recording.2026-07-28.at.10.12.26.movScreen.Recording.2026-07-28.at.10.11.11.mov |
|
@abzokhattab When I try to create an expense it shows "Unvailable Workspace", could you check? I'm not able to reproduce it on main. Screen.Recording.2026-07-28.at.10.10.55.mov |
|
Here's on main: Screen.Recording.2026-07-28.at.13.44.50.movScreen.Recording.2026-07-28.at.13.47.14.mov |
…mployer-draft-report-id
|
Hmm, I am trying to reproduce that but i dont have it .. do u have specfic reproduce steps ? Screen.Recording.2026-07-28.at.12.20.07.movalso i just merged to main to resync let me know if that fixes it |
|
Yep, I'm also not able to reproduce it after merge main |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-07-28.at.10.12.26.movScreen.Recording.2026-07-28.at.10.11.11.mov |
|
🚧 iwiznia 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 staging by https://github.com/iwiznia in version: 9.4.46-0 🚀
|
|
🤖 No help site changes required — no draft PR created. I reviewed the changes in this PR against the help site articles in Both changes are bug fixes that restore the flow's already-intended behavior, not new or changed user-facing functionality:
There are no new features, settings, tabs, buttons, or workflows to document, and no existing help article describes the "Submit to my employer" self-DM tracked-expense flow — so nothing on the help site is now inaccurate or missing as a result of this PR. @abzokhattab, if you believe there's a customer-facing behavior here that should be documented (e.g. a new help article for the "Submit to my employer" flow), let me know and I'll draft the help site PR for you to review and mark |
|
Deploy Blocker #97437 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.4.46-10 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Two bugs in the "Submit to my employer" flow, both caused by the destination picker being auto-skipped.
1. Report field shows "None" instead of "New report" (#96798)
The picker is what rebinds the draft transaction from the self DM's unreported
reportIDto the destination expense chat. The two branches that skip it (exactly one accessible workspace, and restricted to a preferred workspace) set the participants but never thereportID, so the confirmation page still reads the draft as unreported: it renders "None" and resolves the policy from the self DM instead of the destination workspace. Both branches now callsetMoneyRequestReportID, like every other path that binds an expense to a destination. The multi-workspace path is untouched.2. Back button swaps the central pane to the self DM (#96796)
The confirmation page's
backTopointed at the report the expense lives on (the self DM), not the report the user is looking at — they may have drilled into the expense thread first. Going back to a report route resolves to aPOP_TOon the tab navigator, which rebuilds the central pane and swaps the report out from under them.backTonow points at the report displayed behind the RHP, falling back to the expense's report when no report is visible (e.g. the flow was started from Search).Fixed Issues
$ #96798
$ #96796
PROPOSAL:
Tests
Test 1 — Report field shows "New report" (#96798). With the
submit2026beta enabled, on an account that is a member of exactly one paid workspace:Test 2 — Back button keeps the report you were on (#96796). On an account with no workspace:
Offline tests
QA Steps
submit2026beta and exactly one paid workspace, create a tracked expense in the self DM and click Submit it to my employer.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
Screen.Recording.2026-07-27.at.21.39.05.mov
iOS: mWeb Safari
Screen.Recording.2026-07-27.at.21.40.43.mov
MacOS: Chrome / Safari
Screen.Recording.2026-07-27.at.21.29.57.mov