Skip to content

[HOLD for payment 2024-08-02] [$250] Concierge chat is read as it's selected during the onboarding flow #44728

Closed

Description

@kbecciv

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


Reproducible in staging?: y
Reproducible in production?: y
Issue reported by: Applause - Internal Team

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Log in with a new Gmail account
  3. Choose "Something else" on the onboarding modal

Expected Result:

Concierge chat should be BOLD/UNREAD as the user didn't select the chat yet.

Actual Result:

Concierge chat is read as it's selected during the onboarding flow. When the onboarding option is selected, "Expensify" is auto opened from the LHN so Concierge becomes UNBOLD/READ

Workaround:

n/a

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

343725496-bfa52b82-54b1-412f-b9e1-ba7591d58c2f.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011f41040f43fc1324
  • Upwork Job ID: 1810426799057333975
  • Last Price Increase: 2024-07-08
  • Automatic offers:
    • DylanDylann | Reviewer | 103085030
    • dominictb | Contributor | 103085032

Activity

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

    @melvin-bot

    Triggered auto assignment to @Christinadobrzyn (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. dominictb commented on Jul 2, 2024

    @dominictb
    Contributor

    Proposal

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

    Concierge chat is read as it's selected during the onboarding flow. When the onboarding option is selected, "Expensify" is auto opened from the LHN so Concierge becomes read.

    What is the root cause of that problem?

    At the first time users login to App, we have the logic to get the opened report in

    return ReportUtils.findLastAccessedReport(

    we're trying to remove the system chat in

    App/src/libs/ReportUtils.ts

    Lines 1228 to 1233 in bedfeac

    // If we only have two reports and one of them is the system chat, filter it out so we don't
    // overwrite showing the concierge chat
    const hasSystemChat = sortedReports.find((report) => isSystemChat(report)) ?? false;
    if (sortedReports.length === 2 && hasSystemChat) {
    sortedReports = sortedReports.filter((report) => !isSystemChat(report)) ?? [];
    }

    so the concierge chat is always opened -> it's read

    But after complete the onboard flow, we open the system chat if the account id is odd

    if (AccountUtils.isAccountIDOddNumber(accountID ?? 0)) {
    Report.navigateToSystemChat();
    } else {
    Report.navigateToConciergeChat();

    In this case, the accountID is odd -> system chat is opened

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

    We should keep the opened report consistency.

    Solution 1: Keep open the concierge chat

    Remove these logic

    Solution 2: Keep open the system chat if account id is odd, otherwise concierge

    In findLastAccessedReport function, we can check if the onboarding flow (NVP_ONBOARDING) is not complete, we can simply return the report based on this logic

        if (shouldUseOnboardFlow) {
            if (AccountUtils.isAccountIDOddNumber(currentUserAccountID ?? 0)) {
                return getSystemChat()
            } else {
                return Object.values(allReports ?? {}).find((report) => isConciergeChatReport(report));
            }
        }
    

    shouldUseOnboardFlow = !isSmallScreenWidth && !hasCompletedGuidedSetupFlow

    What alternative solutions did you explore? (Optional)

    1. For solution 2, isFirstTimeNewExpensifyUser can be used but it's always false -> need to be fixed from BE side
    2. We can check if the onboarding flow is not complete, then prevent reading newest action.
  4. Christinadobrzyn commented on Jul 2, 2024

    @Christinadobrzyn
    Contributor

    I'm not able to reproduce this - the chat has a green icon meaning it's not read

    2024-07-02_12-55-05.mp4

    asking QA to test again - https://expensify.slack.com/archives/C9YU7BX5M/p1719946606312839

  5. kavimuru commented on Jul 2, 2024

    @kavimuru

    @Christinadobrzyn tester is still able to reproduce

    bandicam.2024-07-02.21-14-26-792.mp4
  6. Christinadobrzyn commented on Jul 2, 2024

    @Christinadobrzyn
    Contributor

    I'm still not able to reproduce this - @dominictb are you able to reproduce this?

  7. MelvinBot commented on Jul 2, 2024

    @MelvinBot
    Contributor

    This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

  8. dominictb commented on Jul 3, 2024

    @dominictb
    Contributor

    @Christinadobrzyn Yes, I still can reproduce

  9. Christinadobrzyn commented on Jul 3, 2024

    @Christinadobrzyn
    Contributor

    Thanks @dominictb I'm confused what I am doing differently here #44728 (comment) there must be a setting or something?

    I'm no longer seeing the three LHN chats -
    image

  10. dominictb commented on Jul 4, 2024

    @dominictb
    Contributor

    @Christinadobrzyn It depends on the accountID, if's odd value, we'll be redirected to system chat. I also mentioned it in my proposal:

    But after complete the onboard flow, we open the system chat if the account id is odd

  11. dominictb commented on Jul 4, 2024

    @dominictb
    Contributor

    I don't have the consistent way to reproduce. You can try to create the new account several time util it's the odd accountID. Hope this help

  12. dominictb commented on Jul 8, 2024

    @dominictb
    Contributor

    @Christinadobrzyn Can you reproduce this issue with the context above?

  13. 36 remaining items

  14. melvin-bot commented on Jul 26, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  15. melvin-bot commented on Jul 26, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.12-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-08-02. 🎊

    For reference, here are some details about the assignees on this issue:

  16. melvin-bot commented on Jul 26, 2024

    @melvin-bot

    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:
    • [@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:
    • [@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:
    • [@DylanDylann] Determine if we should create a regression test for this bug.
    • [@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.
    • [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. Christinadobrzyn commented on Aug 1, 2024

    @Christinadobrzyn
    Contributor

    Payouts due:

    @DylanDylann do we need a regression test?

  18. DylanDylann commented on Aug 2, 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. No
    [@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.

    Do we agree 👍 or 👎

  19. Christinadobrzyn commented on Aug 2, 2024

    @Christinadobrzyn
    Contributor

    Paid this out based on this payment summary - #44728 (comment)

    I'll leave this open for @thienlnam or @dominictb to give an opinion on #44728 (comment)

    Then we can close it out!

  20. Christinadobrzyn commented on Aug 5, 2024

    @Christinadobrzyn
    Contributor

    let's close this out without a regression test.

  21. DylanDylann commented on Aug 26, 2024

    @DylanDylann
    Contributor

    @dominictb This PR caused another bug

    BUG: Infinity loading in the second login

    1. Login
    2. Logout
    3. Login again
    4. Infinity loading happen on the main screen
    Screen.Recording.2024-08-22.at.16.09.21.mov
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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions