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

[$250] Chat - Onboarding modal opens briefly, Concierge chat is with red dot in LHN if open public room #45157

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 10, 2024 · 18 comments
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 10, 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!


Version Number: 9.0.6-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/4706407
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log out
  3. Navigate via public room link (my link https://staging.new.expensify.com/r/1353086947735283
    )

Expected Result:

The onboarding modal should not show for anonymous accounts and Concierge chat loads without red dot in LHN

Actual Result:

Onboarding modal opens for a moment and Concierge chat is with red dot in LHN if open public room as anon user

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

Bug6537870_1720617431686.Public_room.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01da353289531b3f7e
  • Upwork Job ID: 1811184307888769870
  • Last Price Increase: 2024-07-10
Issue OwnerCurrent Issue Owner: @
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Jul 10, 2024
Copy link

melvin-bot bot commented Jul 10, 2024

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

Copy link
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.

@lanitochka17
Copy link
Author

@arosiclair FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

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

@lanitochka17
Copy link
Author

Production:

Recording.2094.mp4

@mountiny mountiny removed the DeployBlocker Indicates it should block deploying the API label Jul 10, 2024
@mountiny
Copy link
Contributor

cc @filip-solecki @allgandalf @adamgrzybowski I believe this might be related to or change here #44536

@BrtqKr
Copy link
Contributor

BrtqKr commented Jul 10, 2024

Hey, I'm developer from SWM. I'd like to take care of this ticket

@allgandalf
Copy link
Contributor

Please assign me too, I would review the fix

@mountiny
Copy link
Contributor

@BrtqKr Thank you! Do you think you can raise the PR for the fix today?

@BrtqKr
Copy link
Contributor

BrtqKr commented Jul 10, 2024

I'll look into it in a moment, but I haven't researched it yet, so I'm not sure. I'll try to handle it until the end of the day, but I'll give you an update later if that's ok

@mountiny
Copy link
Contributor

Thank you, appreciated

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Jul 10, 2024
@melvin-bot melvin-bot bot changed the title Chat - Onboarding modal opens briefly, Concierge chat is with red dot in LHN if open public room [$250] Chat - Onboarding modal opens briefly, Concierge chat is with red dot in LHN if open public room Jul 10, 2024
Copy link

melvin-bot bot commented Jul 10, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01da353289531b3f7e

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 10, 2024
Copy link

melvin-bot bot commented Jul 10, 2024

Current assignee @allgandalf is eligible for the External assigner, not assigning anyone new.

@mountiny
Copy link
Contributor

The onboarding modal should not show for anonymous accounts and Concierge chat loads without red dot in LHN

@NJ-2020
Copy link
Contributor

NJ-2020 commented Jul 11, 2024

Proposal

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

The onboarding modal opens briefly and the Concierge chats with a red dot in LHN if we open a public room

What is the root cause of that problem?

On Navigation root, we redirect the user to Onboarding when the user has not yet completed

if (!hasCompletedGuidedSetupFlow) {
const {adaptedState} = getAdaptedStateFromPath(ROUTES.ONBOARDING_ROOT, linkingConfig.config);
return adaptedState;
}

But we didn't check here if the user is anonymous and inside the hasCompletedGuidedSetupFlowSelector function we didn't check if the onboarding value is undefined.

Because when onboarding data has not yet been applied or is still in the process the value is undefined, so if we check if it's an array it will return false and will return the user has not yet completed onboarding

function hasCompletedGuidedSetupFlowSelector(onboarding: OnyxValue<typeof ONYXKEYS.NVP_ONBOARDING>): boolean {
// onboarding is an array for old accounts and accounts created from olddot
if (Array.isArray(onboarding)) {
return true;
}
return onboarding?.hasCompletedGuidedSetupFlow ?? false;
}

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

We can check if the user is not anonymous inside this condition

if (!hasCompletedGuidedSetupFlow) {
const {adaptedState} = getAdaptedStateFromPath(ROUTES.ONBOARDING_ROOT, linkingConfig.config);
return adaptedState;
}

And we can use this logic for the hasCompletedGuidedSetupFlowSelector function
if (Array.isArray(onboarding) || onboarding?.hasCompletedGuidedSetupFlow === undefined) {
return;
}

And by doing this, it also resolves the Concierge red dot

What alternative solutions did you explore? (Optional)

@NJ-2020
Copy link
Contributor

NJ-2020 commented Jul 11, 2024

@allgandalf Please kindly review my proposal

@BrtqKr
Copy link
Contributor

BrtqKr commented Jul 11, 2024

Regarding the onboarding it was enough to apply the condition for authenticated as in this commit from yesterday.

Correction: There was another case for empty onyx state. I've moved to the public user + empty user check.

I wanted to verify the red dot though and I think we shouldn't handle it on the front-end at all, because it's coming from the errorFields on the back-end side

image

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Jul 11, 2024
@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Jul 12, 2024
@mountiny
Copy link
Contributor

I believe we have reverted the offending PR and the fix will be handled in the original scope of that change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants