Skip to content

[HOLD for payment 2024-08-19] [$250] LHN – Concierge chat opens when change priority mode to Most recent #46110

Closed

Description

@lanitochka17

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.0.11-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4761236&group_by=cases:section_id&group_order=asc&group_id=296775
Email or phone of affected tester (no customers): gocemate+a686@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Login with new gmail account
  2. Go to Account settings> Preferences> Focus
  3. Go to Account settings> Preferences> Most recent

Expected Result:

User should stay on Preferences page

Actual Result:

User navigates to Concierge chat

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6551399_1721815858022.Recording__3548.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cd28acd2df01cf0e
  • Upwork Job ID: 1816460956793747307
  • Last Price Increase: 2024-07-25
  • Automatic offers:
    • DylanDylann | Reviewer | 103326560
    • nkdengineer | Contributor | 103326561
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    DeployBlockerIndicates it should block deploying the API
    on Jul 24, 2024
  2. melvin-bot commented on Jul 24, 2024

    @melvin-bot

    Triggered auto assignment to @arosiclair (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. github-actions commented on Jul 24, 2024

    @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.
  4. lanitochka17 commented on Jul 24, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #vip-vsp

  5. francoisl commented on Jul 24, 2024

    @francoisl
    Contributor

    Hm interestingly, it doesn't happen if you already have multiple chats or rooms. Doesn't seem like something worth blocking for, going to demote.

  6. added and removed
    DeployBlockerIndicates it should block deploying the API
    DeployBlockerCashThis issue or pull request should block deployment
    on Jul 24, 2024
  7. nkdengineer commented on Jul 25, 2024

    @nkdengineer
    Contributor

    Proposal

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

    User navigates to Concierge chat

    What is the root cause of that problem?

    When the onboarding data is changed we resolve the onboarding value here. If we log in with a new account and complete the onboarding flow and then isOnboardingFlowCompleted the second time, isOnboardingFlowStatusKnownPromise promise will return the onboarding data to the old data because after we complete the onboarding flow, the onboarding data is changed and we don't reset the isOnboardingFlowStatusKnownPromise promise.

    resolveOnboardingFlowStatus(value);

    The problem happens when we change the priority mode from focus to recent, we have a logic here to call the OpenApp API again.

    if (nextPriorityMode === CONST.PRIORITY_MODE.DEFAULT && priorityMode === CONST.PRIORITY_MODE.GSD) {
    // eslint-disable-next-line @typescript-eslint/no-use-before-define
    openApp();
    }
    priorityMode = nextPriorityMode;

    It leads isLoadingApp changing and this useEffect is triggered again. As I explained above because the onboarding data is the old data onNotCompleted callback is called and the navigation state is reset. Then the concierge chat is opened as the recent chat.

    Welcome.isOnboardingFlowCompleted({
    onNotCompleted: () => {
    const {adaptedState} = getAdaptedStateFromPath(ROUTES.ONBOARDING_ROOT, linkingConfig.config);
    navigationRef.resetRoot(adaptedState);
    },

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

    We should reset the isOnboardingFlowStatusKnownPromise promise when the onboarding data is changed

    isOnboardingFlowStatusKnownPromise = new Promise<OnboardingData>((resolve) => {
        resolveOnboardingFlowStatus = resolve;
    });
    resolveOnboardingFlowStatus(value);
    

    if (nextPriorityMode === CONST.PRIORITY_MODE.DEFAULT && priorityMode === CONST.PRIORITY_MODE.GSD) {
    // eslint-disable-next-line @typescript-eslint/no-use-before-define
    openApp();
    }
    priorityMode = nextPriorityMode;

    What alternative solutions did you explore? (Optional)

    Or we can revert the change in this PR #45327 to use an onboarding variable and update it every time the onboarding data changes.

    if (nextPriorityMode === CONST.PRIORITY_MODE.DEFAULT && priorityMode === CONST.PRIORITY_MODE.GSD) {
    // eslint-disable-next-line @typescript-eslint/no-use-before-define
    openApp();
    }
    priorityMode = nextPriorityMode;

  8. 39 remaining items

  9. olya-ivanochko commented on Aug 19, 2024

    @olya-ivanochko

    There were regressions fixed by other contributors:
    #46110 (comment)
    #46110 (comment)

  10. melvin-bot commented on Aug 19, 2024

    @melvin-bot

    📣 @olya-ivanochko! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  11. mallenexpensify commented on Aug 20, 2024

    @mallenexpensify
    Contributor

    @DylanDylann , @nkdengineer , can you confirm if there are regressions on this issue? See one revert after staging in the PR. Thx

  12. nkdengineer commented on Aug 20, 2024

    @nkdengineer
    Contributor

    @mallenexpensify We had a regression on this issue and I fixed it here. All revert PRs were closed.

  13. mallenexpensify commented on Aug 21, 2024

    @mallenexpensify
    Contributor

    Thx @nkdengineer per CONTRIBUTING.md

    a 50% penalty will be applied to the Contributor and Contributor+ for each regression on an issue

    Contributor: @nkdengineer paid $125 via Upwork
    Contributor+: @DylanDylann paid $125 via Upwork.

    @DylanDylann plz complete the BZ checklist above. , thanks

  14. DylanDylann commented on Aug 21, 2024

    @DylanDylann
    Contributor

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    [@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: NA
    [@DylanDylann] 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. Link to comment: NA
    [@DylanDylann] A discussion in #expensify-bugs 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
    [@DylanDylann] Determine if we should create a regression test for this bug. Yes
    [@DylanDylann] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

    Regression Test Proposal

    1. Login with new gmail account
    2. Go to Account settings> Preferences> Focus
    3. Go to Account settings> Preferences> Most recent
    4. Verify that: User should stay on Preferences page

    Do we agree 👍 or 👎

  15. DylanDylann commented on Aug 26, 2024

    @DylanDylann
    Contributor

    Not overdue. Waiting for @mallenexpensify

  16. mallenexpensify commented on Aug 26, 2024

    @mallenexpensify
    Contributor
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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions