Skip to content

[Due for payment 2026-09-23] Android & iOS - Agents - Back button on Profile reopens Profile after copiloting into agent #99074

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


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.
  1. Launch Expensify app.
  2. Go to Account > Agents.
  3. Tap on the agent.
  4. Tap Chat with agent.
  5. Tap on the chat header.
  6. Tap Copilot into account.
  7. Tap app back button.

Expected Result:

App will return to Account page.

Actual Result:

Back button on Profile reopens Profile after copiloting into agent.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7238277_1787232872880.ScreenRecording_08-20-2026_21-32-40_1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7238277

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 20, 2026
  2. applause-bot commented on Aug 20, 2026

    @applause-bot
    Author

    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

  3. melvin-bot commented on Aug 20, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #98589

  4. melvin-bot commented on Aug 20, 2026

    @melvin-bot

    @chuckdries @eVoloshchak @trjExpensify you have been assigned to this deploy blocker because you reviewed the offending PR: #98589

  5. melvin-bot commented on Aug 20, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  6. github-actions commented on Aug 20, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  7. chuckdries commented on Aug 20, 2026

    @chuckdries
    Contributor

    Ooooh weird one. Taking a look

  8. MelvinBot commented on Aug 20, 2026

    @MelvinBot
    Contributor

    🔍 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 DeployBlockerCash is present (App deploy) — kept, since this is a frontend bug and it is not reproducible in production. No DeployBlocker present to remove.

    📋 Detailed Analysis

    Evidence

    Verification

    Root Cause

    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.

  9. 50 remaining items

  10. eVoloshchak commented on Sep 28, 2026

    @eVoloshchak
    Contributor

    This is not ready for payment, the follow-up PR is pending, will post when it is

  11. yusufdeveloper2903 commented on Sep 28, 2026

    @yusufdeveloper2903
    Contributor

    @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

  12. mallenexpensify commented on Sep 28, 2026

    @mallenexpensify
    Contributor

    @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)

  13. yusufdeveloper2903 commented on Sep 29, 2026

    @yusufdeveloper2903
    Contributor

    @mallenexpensify Thanks! I've accepted the job offer on Upwork

  14. eVoloshchak commented on Oct 2, 2026

    @eVoloshchak
    Contributor

    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:

    • An account with an agent created under Account > Agents.

    Test:

    1. Go to Account > Agents and tap the agent.
    2. Tap Chat with agent.
    3. Tap the chat header.
    4. Tap Copilot into account.
    5. Verify you land on the Profile page.
    6. Tap the back button.
    7. Verify the Account page opens and Profile does not reopen.
    8. Repeat pressing back and verify you are never redirected to Profile again.
    9. Account > Agents → tap the agent → Copilot into account → back → verify the Account page opens.
    10. Copilot into a regular member account and verify the current page is not reset and back behaves as before.

    Do we agree 👍 or 👎

  15. eVoloshchak commented on Oct 2, 2026

    @eVoloshchak
    Contributor

    @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))

  16. mallenexpensify commented on Oct 3, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @yusufdeveloper2903 paid $250 via Upwork
    Contributor+: @eVoloshchak due $250 via NewDot

    Thx!

  17. JmillsExpensify commented on Nov 10, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @eVoloshchak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions