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-09-23] Android & iOS - Agents - Back button on Profile reopens Profile after copiloting into agent #99074
Version Number: 9.4.57-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:#98589 Email or phone of affected tester (no customers):sdsiodjnosdjiodsj@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: iPhone 15 Pro Max / iOS 26.6.1 App Component: Other
Action Performed:
Precondition:
Create a new Gmail account. Do not verify the account.
Create an agent on Account > Agents.
Launch Expensify app.
Go to Account > Agents.
Tap on the agent.
Tap Chat with agent.
Tap on the chat header.
Tap Copilot into account.
Tap app back button.
Expected Result:
App will return to Account page.
Actual Result:
Back button on Profile reopens Profile after copiloting into agent.
👋 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 (navigation regression in Expensify/App) Causing PR: #98589 - "Fix agent chat RHP background reverting to Inbox on refresh" by @MelvinBot (Medium confidence) Related Issues: #97833 (the issue #98589 was fixing)
Recommendation: REVERT
This flow (Account > Agents → agent chat → Profile → Copilot into account) exists on staging but not production, and the only PR in this release that changes how the agent-chat RHP background is reconstructed is #98589. Reverting its one-line relation change restores the pre-#98589 navigation topology for this flow and cleanly unblocks the deploy; it can then be re-landed with the copilot/cross-account rebuild handled.
Assigned: PR reviewers @chuckdries, @eVoloshchak, @trjExpensify are already assigned (auto-assigned as reviewers of #98589). The PR author is a bot account, so no additional human author to assign. Labels: No changes. Only DeployBlockerCash is present (App deploy) — kept, since this is a frontend bug and it is not reproducible in production. No DeployBlocker present to remove.
Fix agent chat RHP background reverting to Inbox on refresh #98589 is tiny: it adds exactly one line — SCREENS.RIGHT_MODAL.AGENT_REPORT under SCREENS.SETTINGS.AGENTS.ROOT in SETTINGS_TO_RHP.ts (plus a unit test). That single line changes what full-screen background the navigator reconstructs behind the agent-chat RHP.
AGENT_REPORT is only ever an RHP, opened via AddAgentPage.tsx#L153; "Copilot into account" triggers the delegate connect at ProfilePage.tsx#L334-L336 → Delegate.connect clears Onyx and re-inits the app.
The reported flow ends with the Profile RHP (a/:accountID, carrying a backTo pointing at the agent-chat route settings/agents/r/:reportID) open over the Agents settings page. Tapping Copilot into account switches the session and re-initializes the app, which rebuilds the navigation state from the current path via getAdaptedStateFromPath.
During that rebuild, getMatchingFullScreenRoute(Profile) follows Profile's backTo to the AGENT_REPORT route and recurses. Before #98589, AGENT_REPORT had no entry in any RHP→background relation table, so the reconstruction fell through to the generic fallback. #98589 added AGENT_REPORT → SETTINGS.AGENTS.ROOT, so the reconstruction now resolves the agent-chat RHP's background to the Agents settings split instead.
That changed background topology is what the copilot account-switch rebuild now produces, and it is the single difference in this flow between production (no relation, no bug) and staging (relation added, back button loops back into Profile). Because production does not contain this relation and does not exhibit the bug, reverting the one-line addition restores the known-good behavior.
Confidence caveat: this is Medium rather than High because the regression could not be reproduced live to trace the exact "back re-opens Profile" step (the copiloted agent account may also lack access to the delegator's report, compounding the rebuild). But the causal surface is unambiguous: #98589 is the only change to this flow's background reconstruction in the release, and the symptom tracks it perfectly (staging-only). If the author can reproduce quickly, a targeted fix in the RHP-background reconstruction for the copilot cross-account case would be preferable to a plain revert, since the revert reintroduces the (lesser) refresh→Inbox bug that #98589 fixed.
@mallenexpensify Hi I was assigned to this issue and fixed it in #100686, which is now deployed to production. The payment summary shows I need a manual offer
@eVoloshchak can you help me understand this issue? For #100686 I don't see any mention of deploy blockers but I do on this issue. Regardless, it looks like @yusufdeveloper2903 is due full payment (I think/hope)
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: N/A
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: regression wasn't CRITICAL
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
An account with an agent created under Account > Agents.
Test:
Go to Account > Agents and tap the agent.
Tap Chat with agent.
Tap the chat header.
Tap Copilot into account.
Verify you land on the Profile page.
Tap the back button.
Verify the Account page opens and Profile does not reopen.
Repeat pressing back and verify you are never redirected to Profile again.
Account > Agents → tap the agent → Copilot into account → back → verify the Account page opens.
Copilot into a regular member account and verify the current page is not reset and back behaves as before.
@eVoloshchak can you help me understand this issue? For #100686 I don't see any mention of deploy blockers but I do on this issue. Regardless, it looks like @yusufdeveloper2903 is due full payment (I think/hope)
@mallenexpensify, never mind, this is ready for payment
It's not a regression and not part of #94395 it was originally linked to, this was present in production before (#99074 (comment))
Activity
applause-bot commentedon Aug 20, 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/b3d819d06d1f028fa58b466a87ba9e39479bdd8c6e1b329aa52234eca60a719c
melvin-bot commentedon Aug 20, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #98589
melvin-bot commentedon Aug 20, 2026
@chuckdries @eVoloshchak @trjExpensify you have been assigned to this deploy blocker because you reviewed the offending PR: #98589
melvin-bot commentedon Aug 20, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Aug 20, 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:
chuckdries commentedon Aug 20, 2026
Ooooh weird one. Taking a look
MelvinBot commentedon Aug 20, 2026
🔍 Investigation Summary
Classification: Frontend bug (navigation regression in
Expensify/App)Causing PR: #98589 - "Fix agent chat RHP background reverting to Inbox on refresh" by @MelvinBot (Medium confidence)
Related Issues: #97833 (the issue #98589 was fixing)
Recommendation: REVERT
This flow (Account > Agents → agent chat → Profile → Copilot into account) exists on staging but not production, and the only PR in this release that changes how the agent-chat RHP background is reconstructed is #98589. Reverting its one-line relation change restores the pre-#98589 navigation topology for this flow and cleanly unblocks the deploy; it can then be re-landed with the copilot/cross-account rebuild handled.
Assigned: PR reviewers @chuckdries, @eVoloshchak, @trjExpensify are already assigned (auto-assigned as reviewers of #98589). The PR author is a bot account, so no additional human author to assign.
Labels: No changes. Only
DeployBlockerCashis present (App deploy) — kept, since this is a frontend bug and it is not reproducible in production. NoDeployBlockerpresent to remove.📋 Detailed Analysis
Evidence
StagingDeployCashchecklist (Deploy Checklist: New Expensify 2026-08-20 #99018), Fix agent chat RHP background reverting to Inbox on refresh #98589 is the only PR in this release that touches the agent-report navigation flow. Every other candidate is docs/marketing/tax/perf/test work unrelated to copilot, profile, or the agent RHP.SCREENS.RIGHT_MODAL.AGENT_REPORTunderSCREENS.SETTINGS.AGENTS.ROOTinSETTINGS_TO_RHP.ts(plus a unit test). That single line changes what full-screen background the navigator reconstructs behind the agent-chat RHP.Verification
Expensify/App):src/libs/Navigation/linkingConfig/RELATIONS/SETTINGS_TO_RHP.ts#L83RHP_TO_SETTINGSbranch ofgetMatchingFullScreenRoute:getAdaptedStateFromPath.ts#L215-L223backTorecursion that pulls this in for the Profile RHP:getAdaptedStateFromPath.ts#L114-L138getAdaptedStateFromPath.ts#L376-L432AGENT_REPORTis only ever an RHP, opened viaAddAgentPage.tsx#L153; "Copilot into account" triggers the delegate connect atProfilePage.tsx#L334-L336→Delegate.connectclears Onyx and re-inits the app.SETTINGS_TO_RHP.ts(+1) andtests/navigation/agentReportBackgroundRelationTests.ts(+9). Nothing else.Root Cause
The reported flow ends with the Profile RHP (
a/:accountID, carrying abackTopointing at the agent-chat routesettings/agents/r/:reportID) open over the Agents settings page. Tapping Copilot into account switches the session and re-initializes the app, which rebuilds the navigation state from the current path viagetAdaptedStateFromPath.During that rebuild,
getMatchingFullScreenRoute(Profile)follows Profile'sbackToto theAGENT_REPORTroute and recurses. Before #98589,AGENT_REPORThad no entry in any RHP→background relation table, so the reconstruction fell through to the generic fallback. #98589 addedAGENT_REPORT → SETTINGS.AGENTS.ROOT, so the reconstruction now resolves the agent-chat RHP's background to the Agents settings split instead.That changed background topology is what the copilot account-switch rebuild now produces, and it is the single difference in this flow between production (no relation, no bug) and staging (relation added, back button loops back into Profile). Because production does not contain this relation and does not exhibit the bug, reverting the one-line addition restores the known-good behavior.
Confidence caveat: this is Medium rather than High because the regression could not be reproduced live to trace the exact "back re-opens Profile" step (the copiloted agent account may also lack access to the delegator's report, compounding the rebuild). But the causal surface is unambiguous: #98589 is the only change to this flow's background reconstruction in the release, and the symptom tracks it perfectly (staging-only). If the author can reproduce quickly, a targeted fix in the RHP-background reconstruction for the copilot cross-account case would be preferable to a plain revert, since the revert reintroduces the (lesser) refresh→Inbox bug that #98589 fixed.
50 remaining items
eVoloshchak commentedon Sep 28, 2026
This is not ready for payment, the follow-up PR is pending, will post when it is
yusufdeveloper2903 commentedon Sep 28, 2026
@mallenexpensify Hi I was assigned to this issue and fixed it in #100686, which is now deployed to production. The payment summary shows I need a manual offer
mallenexpensify commentedon Sep 28, 2026
@yusufdeveloper2903 can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022104692349452767720
@eVoloshchak can you help me understand this issue? For #100686 I don't see any mention of deploy blockers but I do on this issue. Regardless, it looks like @yusufdeveloper2903 is due full payment (I think/hope)
yusufdeveloper2903 commentedon Sep 29, 2026
@mallenexpensify Thanks! I've accepted the job offer on Upwork
eVoloshchak commentedon Oct 2, 2026
Contributor+ Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: N/A
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: regression wasn't CRITICAL
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
eVoloshchak commentedon Oct 2, 2026
@mallenexpensify, never mind, this is ready for payment
It's not a regression and not part of #94395 it was originally linked to, this was present in production before (#99074 (comment))
mallenexpensify commentedon Oct 3, 2026
Payment Summary
Contributor: @yusufdeveloper2903 paid $250 via Upwork
Contributor+: @eVoloshchak due $250 via NewDot
Thx!
JmillsExpensify commentedon Nov 10, 2026
$250 approved for @eVoloshchak