Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 6 tasks
kbecciv opened this issue Jul 2, 2024 · 36 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jul 2, 2024

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
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 2, 2024
Copy link

melvin-bot bot commented Jul 2, 2024

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.

@dominictb
Copy link
Contributor

dominictb commented Jul 2, 2024

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.

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Jul 2, 2024

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

@kavimuru
Copy link

kavimuru commented Jul 2, 2024

@Christinadobrzyn tester is still able to reproduce

bandicam.2024-07-02.21-14-26-792.mp4

@Christinadobrzyn
Copy link
Contributor

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

@Christinadobrzyn Christinadobrzyn added the Needs Reproduction Reproducible steps needed label Jul 2, 2024
@MelvinBot
Copy link

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

@dominictb
Copy link
Contributor

@Christinadobrzyn Yes, I still can reproduce

@Christinadobrzyn
Copy link
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

@dominictb
Copy link
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

@dominictb
Copy link
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

@dominictb
Copy link
Contributor

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

@Christinadobrzyn
Copy link
Contributor

Sorry @dominictb I was ooo - testing now!

Yes, I can reproduce this - so the issue is that the Concierge chat should be BOLD because it's unread. It's less about the green dot which is what I was originally looking for. I think this can be external

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Jul 8, 2024
@melvin-bot melvin-bot bot changed the title Concierge chat is read as it's selected during the onboarding flow [$250] Concierge chat is read as it's selected during the onboarding flow Jul 8, 2024
Copy link

melvin-bot bot commented Jul 8, 2024

Job added to Upwork: https://www.upwork.com/jobs/~011f41040f43fc1324

@Christinadobrzyn Christinadobrzyn removed the Needs Reproduction Reproducible steps needed label Jul 8, 2024
@melvin-bot melvin-bot bot added Help Wanted Apply this label when an issue is open to proposals by contributors and removed Overdue labels Jul 8, 2024
Copy link

melvin-bot bot commented Jul 8, 2024

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

@DylanDylann
Copy link
Contributor

It seems we randomly redirect to the Concierge chat or Expensify persona (more information here)

after onboarding flow you're redirected either to the Concierge chat or Expensify persona

@DylanDylann
Copy link
Contributor

@dominictb Thanks for your proposal.

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

I think that during the initial login, we should redirect users to either the Concierge or Expensify system based on their account ID as what we have done in
BaseOnboardingPersonalDetails.tsx

@dominictb
Copy link
Contributor

I think that during the initial login, we should redirect users to either the Concierge or Expensify system based on their account ID as what we have done in

@DylanDylann Yah, my second solution can do that

@dominictb
Copy link
Contributor

Updated proposal for detail implementation

Copy link

melvin-bot bot commented Jul 11, 2024

📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Jul 11, 2024

📣 @dominictb 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 13, 2024
@Christinadobrzyn
Copy link
Contributor

Update for Melvin - working on the PR

1 similar comment
@Christinadobrzyn
Copy link
Contributor

Update for Melvin - working on the PR

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 26, 2024
@melvin-bot melvin-bot bot changed the title [$250] Concierge chat is read as it's selected during the onboarding flow [HOLD for payment 2024-08-02] [$250] Concierge chat is read as it's selected during the onboarding flow Jul 26, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

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

Copy link

melvin-bot bot commented Jul 26, 2024

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:

Copy link

melvin-bot bot commented Jul 26, 2024

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:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Aug 1, 2024
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Aug 1, 2024

Payouts due:

@DylanDylann do we need a regression test?

@melvin-bot melvin-bot bot removed the Overdue label Aug 1, 2024
@DylanDylann
Copy link
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 👎

@Christinadobrzyn
Copy link
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!

@melvin-bot melvin-bot bot added the Overdue label Aug 5, 2024
@Christinadobrzyn
Copy link
Contributor

let's close this out without a regression test.

@DylanDylann
Copy link
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
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests

7 participants