Skip to content

[$250] Expense preview in Reports > Chats keeps switching between main account and copilot avatar #66874

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.1.84-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://test-management.browserstack.com/projects/2148171/test-runs/TR-137/39317262/797467963?q=copilot&issue_type=jira
Email or phone of affected tester (no customers): applausetester+210701kh@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Search

Action Performed:

Precondition:

  • User A adds User B as copilot.
  • Perform the steps as User B.
  1. Go to staging.expensify.com
  2. Go to Account.
  3. Open account switcher.
  4. Select User A account.
  5. Open 1:1 DM.
  6. Submit an expense to the user.
    → Note that the report preview in 1:1 DM shows the copilot (User B) avatar.
  7. Go to Reports > Chats.
  8. Look for the expense preview submitted in Step 6.
    → Note that the report preview in Reports shows the main account (User A) avatar.
  9. Click outside the expense preview to open the main chat in RHP.
    → The expense preview in the background changes from main account (User A) to copilot (User B) avatar.
  10. Go back to Inbox and back to Reports > Chats.
    → The expense preview avatar changes back to the main account (User A).

Expected Result:

In Reports page, the expense preview avatar should display the copilot avatar.

Actual Result:

In Reports page, the expense preview avatar displays the main account avatar, and changes to copilot avatar when the main chat is opened in RHP. It changes back to main account avatar when switching to Inbox and back to Reports.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021951347255422601720
  • Upwork Job ID: 1951347255422601720
  • Last Price Increase: 2025-08-15
Issue OwnerCurrent Issue Owner: @danieldoglas

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 22, 2025
  2. melvin-bot commented on Jul 22, 2025

    @melvin-bot

    Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. melvin-bot commented on Jul 25, 2025

    @melvin-bot

    @abekkala Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  4. melvin-bot commented on Jul 31, 2025

    @melvin-bot

    @abekkala Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 1, 2025
  6. changed the title [-]Expense preview in Reports > Chats keeps switching between main account and copilot avatar[/-] [+][$250] Expense preview in Reports > Chats keeps switching between main account and copilot avatar[/+] on Aug 1, 2025
  7. melvin-bot commented on Aug 1, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 1, 2025
  9. melvin-bot commented on Aug 1, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (External)

  10. akil4270 commented on Aug 1, 2025

    @akil4270

    Hi, The issue appears to stem from how the avatar is selected during report preview rendering, depending on the current session or navigation context. In Reports > Chats, the avatar fallback logic likely defaults to the main account instead of maintaining the copilot session identity.

    Fix Plan:
    Update the avatar selection logic in the report preview component (likely ReportActionItem or related utils like ReportUtils.js).

    Ensure session.accountID or currentUserAccountID correctly reflects the copilot identity when switched.

    Add a condition to check if the report is being accessed via copilot mode and use the copilot avatar accordingly.

    Test avatar consistency across:

    1:1 DM

    Reports > Chats

    Inbox > Reports > RHP navigation

    Validate on all supported platforms (web, desktop, iOS, Android).

  11. 32 remaining items

  12. lorretheboy commented on Aug 18, 2025

    @lorretheboy
    Contributor

    Hi @ZhenjaHorbach, the PR is ready for review. Thanks

  13. ZhenjaHorbach commented on Sep 5, 2025

    @ZhenjaHorbach
    Contributor

    @abekkala
    Oh
    The PR for this issue has been in production for a week already
    So we are ready to move on!

  14. ZhenjaHorbach commented on Sep 5, 2025

    @ZhenjaHorbach
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Unfortunately, I did not find a suitable PR

    • [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: NA

    • [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:

    • User A adds User B as a copilot.
    • Perform the steps as User B.

    Test:

    1. Go to ND
    2. Go to Account.
    3. Open account switcher.
    4. Select User A account.
    5. Open 1:1 DM.
    6. Submit an expense to the user and note that the report preview in 1:1 DM shows the copilot (User B) avatar.
    7. Go to Reports > Chats.
    8. Look for the expense preview submitted in Step 6 and verify that, in Reports page, the expense preview avatar should display the copilot avatar (even after click outside the expense preview to open the main chat in RHP)

    Do we agree 👍 or 👎

  15. abekkala commented on Sep 8, 2025

    @abekkala
    Contributor

    Ah yeah, the automation didn't trigger on this one
    I'll comment the payment summary and get the regression test GH created!

  16. abekkala commented on Sep 8, 2025

    @abekkala
    Contributor

    PAYMENT SUMMARY FOR SEPT 02

  17. lorretheboy commented on Sep 8, 2025

    @lorretheboy
    Contributor

    Thanks @abekkala, I have accepted the offer

  18. abekkala commented on Sep 8, 2025

    @abekkala
    Contributor

    @lorretheboy payment sent and contract ended - thank you! 🎉

    @ZhenjaHorbach you can request payment in NewDot - thank you! 🎉

  19. ZhenjaHorbach commented on Sep 8, 2025

    @ZhenjaHorbach
    Contributor

    Requested in ND!

  20. flaviadefaria commented on Sep 19, 2025

    @flaviadefaria
    Contributor

    Approved $250 for @ZhenjaHorbach

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions