Skip to content

[$250] Onboarding-Missing actions in 1:1 DM after sent Test receipt switch to Concierge and return to 1:1 DM #65160

Closed

Description

@mitarachim

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: v9.1.72-0
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://expensify.testrail.io/index.php?/tests/view/6378642&group_by=cases:section_id&group_id=229043&group_order=asc
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Windows 10 / Chrome
App Component: Left Hand Navigation (LHN)

Action Performed:

  1. Open New Dot and create a new user
  2. Select the purpose "Chat and split expenses with friends"
  3. Click on "Continue"
  4. Enter any names
  5. Click on "Continue"
  6. Enter the boss's email in the Test Drive modal
  7. Click on the Start Test Drive
  8. Click on the Create Test Receipt
  9. Click on the + button in the 1:1 DM
  10. Click on the Concierge chat in the LHN and click on the 1:1 DM
  11. Click on the + button in the 1:1 DM again
  12. Refresh the page
  13. Click on the + button in the 1:1 DM again

Expected Result:

All the actions in the + menu in the 1:1 DM can display normally

Actual Result:

After sending the Test receipt and navigate to the Concierge chat, and returning to 1:1 DM, some options are not displayed in the action menu

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

Bug6872262_1751103069521.missing_action_switch_concierge.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021940132591089571948
  • Upwork Job ID: 1940132591089571948
  • Last Price Increase: 2025-07-15
Issue OwnerCurrent Issue Owner: @ikevin127

Activity

  1. added
    Daily
    Bug
    on Jun 30, 2025
  2. melvin-bot commented on Jun 30, 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. added
    External
    on Jul 1, 2025
  4. changed the title [-]Onboarding-Missing actions in 1:1 DM after sent Test receipt switch to Concierge and return to 1:1 DM[/-] [+][$250] Onboarding-Missing actions in 1:1 DM after sent Test receipt switch to Concierge and return to 1:1 DM[/+] on Jul 1, 2025
  5. melvin-bot commented on Jul 1, 2025

    @melvin-bot
  6. added
    Help Wanted
    on Jul 1, 2025
  7. melvin-bot commented on Jul 1, 2025

    @melvin-bot

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

  8. nkdengineer commented on Jul 2, 2025

    @nkdengineer
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    After sending the Test receipt and navigate to the Concierge chat, and returning to 1:1 DM, some options are not displayed in the action menu

    What is the root cause of that problem?

    lastActorDetails is a direct reference to personalDetails?.[lastActorAccountID] from Onyx. In the DM the last action is report preview action, the line lastActorDetails.accountID = lastAction.The' actorAccountID directly mutates the Onyx data, causing the accountID of the current user to be changed to lastAction.actorAccountID, which is the boss.

    // to get data from.
    let lastActorDetails: Partial<PersonalDetails> | null = lastActorAccountID ? (personalDetails?.[lastActorAccountID] ?? null) : null;
    if (!lastActorDetails && lastAction) {
    const lastActorDisplayName = lastAction?.person?.[0]?.text;
    lastActorDetails = lastActorDisplayName
    ? {
    displayName: lastActorDisplayName,
    accountID: report.lastActorAccountID,
    }
    : null;
    }
    // Assign the actor account ID from the last action when it’s a REPORT_PREVIEW action.
    // to ensures that lastActorDetails.accountID is correctly set in case it's empty string
    if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && lastActorDetails) {
    lastActorDetails.accountID = lastAction.actorAccountID;
    }

    When we get the money request option in the DM, reportParticipantIDs filters out the current user and has only the boss

    const moneyRequestOptionsList = temporary_getMoneyRequestOptions(report, policy, reportParticipantIDs ?? []).map((option) => options[option]);

    Then, in this line, otherParticipants becomes an empty array because currentUserPersonalDetails?.accountID is the boss's account ID, as explained above.

    const otherParticipants = reportParticipants.filter((accountID) => currentUserPersonalDetails?.accountID !== accountID);

    As a result, canRequestMoney returns false here, and no money request action is shown in the DM.

    App/src/libs/ReportUtils.ts

    Lines 8526 to 8528 in 2846678

    if (isDM(report)) {
    return otherParticipants.length === 1;
    }

    What changes do you think we should make in order to solve the problem?

    We should create a new object here instead

    if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && lastActorDetails) {
        lastActorDetails = {
            ...lastActorDetails,
            accountID: lastAction.actorAccountID,
        };
    }
    

    // to get data from.
    let lastActorDetails: Partial<PersonalDetails> | null = lastActorAccountID ? (personalDetails?.[lastActorAccountID] ?? null) : null;
    if (!lastActorDetails && lastAction) {
    const lastActorDisplayName = lastAction?.person?.[0]?.text;
    lastActorDetails = lastActorDisplayName
    ? {
    displayName: lastActorDisplayName,
    accountID: report.lastActorAccountID,
    }
    : null;
    }
    // Assign the actor account ID from the last action when it’s a REPORT_PREVIEW action.
    // to ensures that lastActorDetails.accountID is correctly set in case it's empty string
    if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && lastActorDetails) {
    lastActorDetails.accountID = lastAction.actorAccountID;
    }

    Or we can create a clone of personalDetails with cloneDeep before using it in this function.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    NA

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  9. ikevin127 commented on Jul 3, 2025

    @ikevin127
  10. ikevin127 commented on Jul 4, 2025

    @ikevin127
    Contributor

    @nkdengineer Thanks for the proposal. The RCA makes sense and the first solution would be the best way to handle this. The problem is that I just tested the OP issue on both latest dev (main) and latest staging (v9.1.76-0) to verify if it's reproducible and I cannot reproduce it, tried multiple times and there's no issue on my side:

    MacOS: Chrome Android: mWeb Chrome
    Screen.Recording.2025-07-03.at.17.52.26.mov
    screen-20250703-191107.mp4

    🟡 Either I did not follow the steps correctly (100% sure I did, multiple times), or this issue was fixed in the meantime.

    Note

    I tested on both MacOS: Chrome and Android: mWeb Chrome, not sure if this is only reproducible on Windows 10 / Chrome as the OP mentioned on the device used section. Please let me know if you can consistently reproduce the issue, on what platform and share a video if you don't mind so I can clearly see the steps.

  11. nkdengineer commented on Jul 4, 2025

    @nkdengineer
    Contributor

    @ikevin127 This PR changed this line from const lastActorAccountID = report.lastActorAccountID || lastAction?.actorAccountID to

    const lastActorAccountID = report.lastActorAccountID || lastAction?.actorAccountID;
    

    Then the lastActorDetails is not changed. If you revert this line, you can reproduce this bug easily.

  12. ikevin127 commented on Jul 4, 2025

    @ikevin127
    Contributor

    I'm guessing you're refering to this PR:

    which interchanged the checks between each other, moving the last one to the front and vice versa:

    - const lastActorAccountID = report.lastActorAccountID || lastAction?.actorAccountID;
    + const lastActorAccountID = lastAction?.actorAccountID || report.lastActorAccountID;

    Given that the above-mentioned PR solved this issue (unintentionally), I think we're fine to close this one as fixed or maybe ask QA to confirm the issue was fixed before closing.

    cc @abekkala

  13. melvin-bot commented on Jul 7, 2025

    @melvin-bot

    @ikevin127 Whoops! This issue is 2 days overdue. Let's get this updated quick!

  14. ikevin127 commented on Jul 7, 2025

    @ikevin127
    Contributor

    Issue was fixed by PR mentioned above in #65160 (comment). @abekkala I think we're fine to close this one as fixed or maybe ask QA to confirm the issue was fixed before closing.

  15. melvin-bot commented on Jul 8, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  16. melvin-bot commented on Jul 11, 2025

    @melvin-bot

    @ikevin127 Whoops! This issue is 2 days overdue. Let's get this updated quick!

  17. ikevin127 commented on Jul 11, 2025

    @ikevin127
    Contributor

    Issue was fixed by PR mentioned above in #65160 (comment). @abekkala I think we're fine to close this one as fixed or maybe ask QA to confirm the issue was fixed before closing.

  18. melvin-bot commented on Jul 14, 2025

    @melvin-bot

    @abekkala @ikevin127 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  19. ikevin127 commented on Jul 14, 2025

    @ikevin127
    Contributor

    Issue was fixed by PR mentioned above in #65160 (comment). @abekkala I think we're fine to close this one as fixed or maybe ask QA to confirm the issue was fixed before closing.

  20. melvin-bot commented on Jul 15, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

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

Metadata

Metadata

Labels

BugDailyExternalHelp Wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions