Skip to content

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

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.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: @

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    DeployBlockerIndicates it should block deploying the API
    on Jul 10, 2024
  2. melvin-bot commented on Jul 10, 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 10, 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 10, 2024

    @lanitochka17
    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

  5. lanitochka17 commented on Jul 10, 2024

    @lanitochka17
    Author

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

  6. lanitochka17 commented on Jul 10, 2024

    @lanitochka17
    Author

    Production:

    Recording.2094.mp4
  7. mountiny commented on Jul 10, 2024

    @mountiny
    Contributor

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

  8. BrtqKr commented on Jul 10, 2024

    @BrtqKr
    Contributor

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

  9. 6 remaining items

  10. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 10, 2024
  11. 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[/+] on Jul 10, 2024
  12. melvin-bot commented on Jul 10, 2024

    @melvin-bot
  13. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 10, 2024
  14. melvin-bot commented on Jul 10, 2024

    @melvin-bot

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

  15. mountiny commented on Jul 10, 2024

    @mountiny
    Contributor

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

  16. NJ-2020 commented on Jul 11, 2024

    @NJ-2020
    Contributor

    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)

  17. NJ-2020 commented on Jul 11, 2024

    @NJ-2020
    Contributor

    @allgandalf Please kindly review my proposal

  18. BrtqKr commented on Jul 11, 2024

    @BrtqKr
    Contributor

    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
  19. mountiny commented on Jul 12, 2024

    @mountiny
    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

Metadata

Metadata

Labels

EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions