You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-08-05] Expense - Expense report RHP closes after clicking Save on Attendees RHP #97165
Version Number: 9.4.45-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#95930 Email or phone of affected tester (no customers):jomisjndojsidosnj@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Enable Rules.
Enable Attendee tracking in Rules.
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense.
Open the expense.
Click Attendees field.
Click Save.
Expected Result:
Expense report RHP will not close after clicking Save on Attendees RHP.
Actual Result:
Expense report RHP closes after clicking Save on Attendees RHP.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #95930 - "migrate money request part 2" by @huult (High confidence) Related Issues: none
Recommendation: REVERT
PR #95930 replaced the explicit backTo navigation param on the Attendees step with a URL-derived backPath from the new useDynamicBackPath hook. When Attendees is opened from the expense report RHP (the repro flow), that derived path resolves to the underlying report route, so saving dismisses the whole RHP modal instead of returning one step to the expense details view. Reverting is the cleanest fix; if a targeted fix is preferred, see the concrete pointer below.
Assigned: @huult (PR author), @mjasikowski and @suneox (approving reviewers) from the highest-confidence causing PR only Labels: No changes. Kept DeployBlockerCash (App deploy is blocked by an App PR). No DeployBlocker label was present, so nothing to remove.
📋 Detailed Analysis
Evidence
The issue is a new regression on staging (9.4.45-0), not reproducible on production, so the cause is a PR in the current StagingDeployCash #97134 checklist.
PR migrate money request part 2 #95930 (merged 2026-07-24, in this staging deploy) is titled "migrate money request part 2" and directly modifies the exact affected code path: it renames IOURequestStepAttendees.tsx → DynamicIOURequestStepAttendees.tsx, changes MoneyRequestView.tsx (the expense detail RHP that opens Attendees), and rewrites the Attendees route/navigation config.
The PR's own QA steps only cover opening Attendees from the confirmation step of the Create Expense flow ("On the confirmation step, tap Attendee"). It does not cover opening Attendees from an already-created expense's detail RHP (the exact repro path in this issue), which is why the regression slipped through.
The regressing change in DynamicIOURequestStepAttendees.tsx:
Before (used an explicit caller-provided back target):
params: {transactionID,reportID,iouType,backTo,action},// ...Navigation.goBack(backTo,{shouldSkipFocusRestore: true});// in saveAttendeesNavigation.goBack(backTo);// in navigateBack
After (PR #95930 — derives the back target from the current URL):
params: {transactionID,reportID,iouType,action},// backTo removedconstbackPath=useDynamicBackPath(DYNAMIC_ROUTES.MONEY_REQUEST_ATTENDEE.path);// ...Navigation.goBack(backPath,{shouldSkipFocusRestore: true});// in saveAttendeesNavigation.goBack(backPath);// in navigateBack
Root Cause
MoneyRequestView opens Attendees from the expense detail RHP via Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.MONEY_REQUEST_ATTENDEE.getRoute(EDIT, iouType, transactionID, reportID))). createDynamicRoute appends attendees?... to Navigation.getActiveRoute(), producing a URL like /r/<reportID>/attendees?action=edit&iouType=...&transactionID=...&reportID=....
On Save, useDynamicBackPath(MONEY_REQUEST_ATTENDEE.path) strips the attendees suffix (via getPathWithoutDynamicSuffix) and returns /r/<reportID> — the report route, which lives outside the RHP. Navigation.goBack('/r/<reportID>') therefore tears down the entire RHP modal stack and dumps the user back to the workspace chat, instead of popping a single step back to the expense details view.
The old backTo param pointed at the specific RHP screen to return to; the URL-derived backPath does not account for the RHP nesting (note that MONEY_REQUEST_ATTENDEE.entryScreens includes SCREENS.RIGHT_MODAL.EXPENSE_REPORT, so this Attendees step is expected to be reachable from inside the expense RHP). The sibling Tax steps migrated in the same PR use the identical useDynamicBackPath pattern, so they should be re-verified from the expense RHP as well.
Targeted roll-forward alternative: in src/pages/iou/request/step/DynamicIOURequestStepAttendees.tsx (lines 45, 102, 127), the useDynamicBackPath-derived backPath needs to resolve to the expense RHP screen rather than the bare /r/<reportID> report route — i.e. useDynamicBackPath / getPathWithoutDynamicSuffix must preserve the RHP context when the entry screen is RIGHT_MODAL.EXPENSE_REPORT, or the step should fall back to the explicit backTo for RHP entry points.
Root Cause: PR #95930 ("migrate money request part 2") changed the Attendees step to derive its "go back" target from the current URL instead of the explicit backTo param. When Attendees is opened from the expense report RHP, that derived path resolves to the underlying report route (/r/<reportID>), so saving dismisses the whole RHP modal instead of returning one step to the expense details view. High confidence — the causing PR is confirmed and on the current staging deploy.
What is the root cause of that problem?
The expense detail RHP opens Attendees via createDynamicRoute(...) in MoneyRequestView.tsx:1507, which appends attendees?... onto the active route, producing a URL like /r/<reportID>/attendees?....
On Save, the migrated step calls Navigation.goBack(backPath, ...) where backPath comes from useDynamicBackPath(...). That hook strips the attendees suffix via getPathWithoutDynamicSuffix.ts:18 and returns /r/<reportID> — the report route, which lives outside the RHP. Navigation.goBack('/r/<reportID>') therefore tears down the entire RHP modal stack and dumps the user back to the workspace chat.
Before this PR, the step used an explicit backTo param pointing at the specific RHP screen to return to; the URL‑derived backPath does not account for RHP nesting, even though MONEY_REQUEST_ATTENDEE.entryScreens includes SCREENS.RIGHT_MODAL.EXPENSE_REPORT. This is why it reproduces only when opening Attendees from an already‑created expense's detail RHP — the flow the PR's QA didn't cover.
Evidence & verification
New regression on staging (9.4.45‑0), not reproducible on production → cause is a PR in the current StagingDeployCash Expensify/App#97134 checklist.
PR migrate money request part 2 #95930 is on that deploy and directly rewrites the affected code path: it renamed IOURequestStepAttendees.tsx → DynamicIOURequestStepAttendees.tsx, changed MoneyRequestView.tsx (the expense RHP that opens Attendees), and rewrote the Attendees route/navigation config.
The regressing change — the save/back handlers switched from Navigation.goBack(backTo) to Navigation.goBack(backPath) at DynamicIOURequestStepAttendees.tsx:102 and :127, with backTo removed from the route params.
The sibling Tax steps migrated in the same PR use the identical useDynamicBackPath pattern, so they should be re‑verified from the expense RHP as well.
What changes do you think we should make in order to solve the problem?
Recommended: revert #95930 — it's a deploy blocker and reverting cleanly restores the explicit backTo‑based navigation.
If a targeted roll‑forward is preferred instead of a revert: make the Attendees step resolve back to the expense RHP screen rather than the bare /r/<reportID> report route when its entry screen is RIGHT_MODAL.EXPENSE_REPORT — i.e. have useDynamicBackPath / getPathWithoutDynamicSuffix preserve the RHP context for RHP entry points, or fall back to the explicit backTo there. Re‑verify the Tax steps from the same PR under the same flow.
What alternative solutions did you explore? (Optional)
Considered whether another staging PR could cause an over‑dismiss on Save, but no other PR on this deploy touches the Attendees step or MoneyRequestView's open path — the navigation change in #95930 fully explains the symptom on all affected platforms.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/97165) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
MoneyRequestAttendeeSelector is memoized with a comparator that ignores onFinish, so it retains a stale callback with an outdated backPath. After backPath updates, clicking Save still uses the stale value, causing Navigation.goBack() to pop an extra screen and close the Expense RHP.
Fix by storing backPath in a ref so goBack() always reads the latest value.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.45-14 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-08-05. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
changed the title [-]Expense - Expense report RHP closes after clicking Save on Attendees RHP[/-][+][Due for payment 2026-08-05] Expense - Expense report RHP closes after clicking Save on Attendees RHP[/+]on Jul 29, 2026
Activity
applause-bot commentedon Jul 27, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/5e65e54b3360fb633b0253fbc083345485950f348261151fdc17ca4ac75ca856
melvin-bot commentedon Jul 27, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #95930
melvin-bot commentedon Jul 27, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 27, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
MelvinBot commentedon Jul 27, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #95930 - "migrate money request part 2" by @huult (High confidence)
Related Issues: none
Recommendation: REVERT
PR #95930 replaced the explicit
backTonavigation param on the Attendees step with a URL-derivedbackPathfrom the newuseDynamicBackPathhook. When Attendees is opened from the expense report RHP (the repro flow), that derived path resolves to the underlying report route, so saving dismisses the whole RHP modal instead of returning one step to the expense details view. Reverting is the cleanest fix; if a targeted fix is preferred, see the concrete pointer below.Assigned: @huult (PR author), @mjasikowski and @suneox (approving reviewers) from the highest-confidence causing PR only
Labels: No changes. Kept
DeployBlockerCash(App deploy is blocked by an App PR). NoDeployBlockerlabel was present, so nothing to remove.📋 Detailed Analysis
Evidence
IOURequestStepAttendees.tsx→DynamicIOURequestStepAttendees.tsx, changesMoneyRequestView.tsx(the expense detail RHP that opens Attendees), and rewrites the Attendees route/navigation config.Verification
Affected files confirmed modified by #95930:
src/pages/iou/request/step/DynamicIOURequestStepAttendees.tsx(renamed fromIOURequestStepAttendees.tsx)src/components/ReportActionItem/MoneyRequestView.tsx(opens the Attendees step from the expense RHP)src/ROUTES.ts,src/libs/Navigation/linkingConfig/config.ts,src/libs/Navigation/linkingConfig/OldRoutes.tsThe regressing change in
DynamicIOURequestStepAttendees.tsx:Before (used an explicit caller-provided back target):
After (PR #95930 — derives the back target from the current URL):
Root Cause
MoneyRequestViewopens Attendees from the expense detail RHP viaNavigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.MONEY_REQUEST_ATTENDEE.getRoute(EDIT, iouType, transactionID, reportID))).createDynamicRouteappendsattendees?...toNavigation.getActiveRoute(), producing a URL like/r/<reportID>/attendees?action=edit&iouType=...&transactionID=...&reportID=....On Save,
useDynamicBackPath(MONEY_REQUEST_ATTENDEE.path)strips theattendeessuffix (viagetPathWithoutDynamicSuffix) and returns/r/<reportID>— the report route, which lives outside the RHP.Navigation.goBack('/r/<reportID>')therefore tears down the entire RHP modal stack and dumps the user back to the workspace chat, instead of popping a single step back to the expense details view.The old
backToparam pointed at the specific RHP screen to return to; the URL-derivedbackPathdoes not account for the RHP nesting (note thatMONEY_REQUEST_ATTENDEE.entryScreensincludesSCREENS.RIGHT_MODAL.EXPENSE_REPORT, so this Attendees step is expected to be reachable from inside the expense RHP). The sibling Tax steps migrated in the same PR use the identicaluseDynamicBackPathpattern, so they should be re-verified from the expense RHP as well.Fix pointers:
backTo-based navigation.src/pages/iou/request/step/DynamicIOURequestStepAttendees.tsx(lines 45, 102, 127), theuseDynamicBackPath-derivedbackPathneeds to resolve to the expense RHP screen rather than the bare/r/<reportID>report route — i.e.useDynamicBackPath/getPathWithoutDynamicSuffixmust preserve the RHP context when the entry screen isRIGHT_MODAL.EXPENSE_REPORT, or the step should fall back to the explicitbackTofor RHP entry points.MelvinBot commentedon Jul 27, 2026
Proposal
Root Cause: PR #95930 ("migrate money request part 2") changed the Attendees step to derive its "go back" target from the current URL instead of the explicit
backToparam. When Attendees is opened from the expense report RHP, that derived path resolves to the underlying report route (/r/<reportID>), so saving dismisses the whole RHP modal instead of returning one step to the expense details view. High confidence — the causing PR is confirmed and on the current staging deploy.What is the root cause of that problem?
The expense detail RHP opens Attendees via
createDynamicRoute(...)inMoneyRequestView.tsx:1507, which appendsattendees?...onto the active route, producing a URL like/r/<reportID>/attendees?....On Save, the migrated step calls
Navigation.goBack(backPath, ...)wherebackPathcomes fromuseDynamicBackPath(...). That hook strips theattendeessuffix viagetPathWithoutDynamicSuffix.ts:18and returns/r/<reportID>— the report route, which lives outside the RHP.Navigation.goBack('/r/<reportID>')therefore tears down the entire RHP modal stack and dumps the user back to the workspace chat.Before this PR, the step used an explicit
backToparam pointing at the specific RHP screen to return to; the URL‑derivedbackPathdoes not account for RHP nesting, even thoughMONEY_REQUEST_ATTENDEE.entryScreensincludesSCREENS.RIGHT_MODAL.EXPENSE_REPORT. This is why it reproduces only when opening Attendees from an already‑created expense's detail RHP — the flow the PR's QA didn't cover.Evidence & verification
IOURequestStepAttendees.tsx→DynamicIOURequestStepAttendees.tsx, changedMoneyRequestView.tsx(the expense RHP that opens Attendees), and rewrote the Attendees route/navigation config.Navigation.goBack(backTo)toNavigation.goBack(backPath)atDynamicIOURequestStepAttendees.tsx:102and:127, withbackToremoved from the route params.useDynamicBackPathpattern, so they should be re‑verified from the expense RHP as well.What changes do you think we should make in order to solve the problem?
Recommended: revert #95930 — it's a deploy blocker and reverting cleanly restores the explicit
backTo‑based navigation.If a targeted roll‑forward is preferred instead of a revert: make the Attendees step resolve back to the expense RHP screen rather than the bare
/r/<reportID>report route when its entry screen isRIGHT_MODAL.EXPENSE_REPORT— i.e. haveuseDynamicBackPath/getPathWithoutDynamicSuffixpreserve the RHP context for RHP entry points, or fall back to the explicitbackTothere. Re‑verify the Tax steps from the same PR under the same flow.What alternative solutions did you explore? (Optional)
Considered whether another staging PR could cause an over‑dismiss on Save, but no other PR on this deploy touches the Attendees step or
MoneyRequestView's open path — the navigation change in #95930 fully explains the symptom on all affected platforms.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/97165)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
huult commentedon Jul 28, 2026
Checking
huult commentedon Jul 28, 2026
App/src/pages/iou/request/step/DynamicIOURequestStepAttendees.tsx
Line 94 in 58081b1
MoneyRequestAttendeeSelectoris memoized with a comparator that ignoresonFinish, so it retains a stale callback with an outdatedbackPath. After backPath updates, clicking Save still uses the stale value, causingNavigation.goBack()to pop an extra screen and close the Expense RHP.Fix by storing
backPathin a ref sogoBack()always reads the latest value.IuliiaHerets commentedon Jul 29, 2026
Web and Android,
Not repro
But there is a blink error when open Attendees tab, #97163
7beeae6ddcc1587e23a1590f3e6e0b1d.mp4
d866527570ba6d65de05d9077504effa.mp4
mjasikowski commentedon Jul 29, 2026
@huult @suneox is this related? I don't think so but just want to confirm
suneox commentedon Jul 29, 2026
@mjasikowski This issue was fixed in #97176
mjasikowski commentedon Jul 29, 2026
Thanks!
melvin-bot commentedon Jul 29, 2026
@suneox / @huult
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.45-14 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-08-05. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
[-]Expense - Expense report RHP closes after clicking Save on Attendees RHP[/-][+][Due for payment 2026-08-05] Expense - Expense report RHP closes after clicking Save on Attendees RHP[/+]