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
Agents - App returns to LHN after creating agent and tapping back button on agent chat #97832
Version Number: 9.4.50-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#95631 Email or phone of affected tester (no customers):koinjojoinjionjioiojoinjoi@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: User Settings
Action Performed:
Launch Expensify app.
Go to Account > Agents.
Tap New agent.
Create a new agent.
Tap app back button.
Expected Result:
App will return to Agents after tapping back button on agent chat.
Actual Result:
App returns to LHN after creating agent and tapping back button on agent chat.
👋 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: #95631 - "Open the agent DM via an optimistic reportID" by @mjasikowski (High confidence) Related Issues: #94395 (the feature this PR implements)
Recommendation: ROLL FORWARD
This is a brand-new feature (immediate agent DM after creation) that ships with already-deployed backend dependencies (Auth#22772, Web-Expensify#54367), and the regression is a contained navigation-stack issue on narrow layouts — a targeted fix is safer and smaller than reverting the whole feature. Reverting is a viable fallback if a quick fix isn't ready, since it cleanly restores the old dismissModal() flow that returned to the Agents list.
Assigned: @mjasikowski (PR author), @eVoloshchak (approving reviewer), @chuckdries (approving reviewer) — already auto-assigned as author/reviewers of the causing PR. Labels: No changes. DeployBlockerCash is correctly applied (App deploy is blocked by a frontend regression) and is kept. No DeployBlocker (Web) label is present.
📋 Detailed Analysis
Evidence
The bug is reproducible only on staging (v9.4.50-0) and is N/A on production because the "open agent DM immediately after creation" behavior is brand new — introduced by PR Open the agent DM via an optimistic reportID #95631, which merged 2026-08-04T15:27:29Z, hours before this blocker was filed.
The reported flow (create agent → tap back on the agent chat → land on LHN instead of the Agents list) is exactly the navigation path this PR rewrote. It is reported on Android: App and iOS: App (native = narrow layout), which is precisely the branch the PR changed.
revealRouteBeforeDismissingModal(ROUTES.REPORT_WITH_ID.getRoute(optimisticReportID)) inserts the DM as a fullscreen route under the RHP and then dismisses the entire RHP modal stack:
Because the whole Settings → Agents → New agent modal stack is dismissed and the DM is opened as a top-level fullscreen report split, the Agents list is no longer anywhere in the back stack. Tapping the back button on the agent chat therefore falls through to the LHN (report list) rather than returning to the Agents list.
By contrast, the wide-layout branch keeps the DM inside the RHP:
so the discrepancy is confined to the narrow-layout revealRouteBeforeDismissingModal path.
Targeted fix direction: on narrow layouts, navigate to the new DM in a way that preserves the Agents settings screen in the back stack (e.g. push/replace the report onto the existing settings modal stack instead of revealing it under the modal and dismissing the whole stack), so back returns to the Agents list as expected.
Activity
applause-bot commentedon Aug 4, 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/36c9384525e5f078af880427f578c3101686bb530344638bac887af747872803
melvin-bot commentedon Aug 4, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #95631
melvin-bot commentedon Aug 4, 2026
@chuckdries @eVoloshchak you have been assigned to this deploy blocker because you reviewed the offending PR: #95631
melvin-bot commentedon Aug 4, 2026
@mjasikowski you have been assigned to this deploy blocker because you authored the offending PR: #95631
melvin-bot commentedon Aug 4, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Aug 4, 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 Aug 4, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #95631 - "Open the agent DM via an optimistic reportID" by @mjasikowski (High confidence)
Related Issues: #94395 (the feature this PR implements)
Recommendation: ROLL FORWARD
This is a brand-new feature (immediate agent DM after creation) that ships with already-deployed backend dependencies (Auth#22772, Web-Expensify#54367), and the regression is a contained navigation-stack issue on narrow layouts — a targeted fix is safer and smaller than reverting the whole feature. Reverting is a viable fallback if a quick fix isn't ready, since it cleanly restores the old
dismissModal()flow that returned to the Agents list.Assigned: @mjasikowski (PR author), @eVoloshchak (approving reviewer), @chuckdries (approving reviewer) — already auto-assigned as author/reviewers of the causing PR.
Labels: No changes.
DeployBlockerCashis correctly applied (App deploy is blocked by a frontend regression) and is kept. NoDeployBlocker(Web) label is present.📋 Detailed Analysis
Evidence
2026-08-04T15:27:29Z, hours before this blocker was filed.StagingDeployCashdeploy checklist (Deploy Checklist: New Expensify 2026-08-04 #97828).Verification
src/pages/settings/Agents/AddAgentPage.tsx→handleSubmit, and the navigation helpersrc/libs/Navigation/Navigation.ts→revealRouteBeforeDismissingModal.handleSubmitended withNavigation.dismissModal(), which popped the RHP modal stack back to the Agents list.gh pr diff 95631and the current checked-out source.Root Cause
On narrow (native) layouts,
handleSubmitnow runs:App/src/pages/settings/Agents/AddAgentPage.tsx
Lines 128 to 133 in f30bca2
revealRouteBeforeDismissingModal(ROUTES.REPORT_WITH_ID.getRoute(optimisticReportID))inserts the DM as a fullscreen route under the RHP and then dismisses the entire RHP modal stack:App/src/libs/Navigation/Navigation.ts
Lines 1077 to 1097 in f30bca2
Because the whole Settings → Agents → New agent modal stack is dismissed and the DM is opened as a top-level fullscreen report split, the Agents list is no longer anywhere in the back stack. Tapping the back button on the agent chat therefore falls through to the LHN (report list) rather than returning to the Agents list.
By contrast, the wide-layout branch keeps the DM inside the RHP:
App/src/pages/settings/Agents/AddAgentPage.tsx
Lines 135 to 138 in f30bca2
so the discrepancy is confined to the narrow-layout
revealRouteBeforeDismissingModalpath.Targeted fix direction: on narrow layouts, navigate to the new DM in a way that preserves the Agents settings screen in the back stack (e.g. push/replace the report onto the existing settings modal stack instead of revealing it under the modal and dismissing the whole stack), so back returns to the Agents list as expected.
45 remaining items
eVoloshchak commentedon Sep 14, 2026
Not overdue
mjasikowski commentedon Sep 17, 2026
Back from leave and on it
mjasikowski commentedon Sep 18, 2026
Just tested again and this is fixed
chuckdries commentedon Sep 29, 2026
@mjasikowski can we close it then?