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] Sign up - "Welcome to Expensify" modal not appears on a new account #40432

Closed
3 of 6 tasks
izarutskaya opened this issue Apr 18, 2024 · 22 comments
Closed
3 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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

Comments

@izarutskaya
Copy link

izarutskaya commented Apr 18, 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: v1.4.63-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/cases/view/2616817
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Create new account
  2. Copy the Magic link from email and change it to staging
  3. Open a new tab and navigate to the staging magic link
  4. Navigate to the original tab

Expected Result:

The user is logged in with the new account, therefore the engagement modal "Welcome to Expensify" should be displayed - SEE THIS COMMENT FOR MODAL

image

Actual Result:

The user is logged in with the new account but the engagement modal "Welcome to Expensify" is not displayed.

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

Bug6453334_1713427876198.bandicam_2024-04-18_11-03-28-542.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e55bf0be53bd1320
  • Upwork Job ID: 1785452321885933568
  • Last Price Increase: 2024-04-30
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 18, 2024
Copy link

melvin-bot bot commented Apr 18, 2024

Triggered auto assignment to @jliexpensify (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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #vip-vsb.

@bernhardoj
Copy link
Contributor

Proposal

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

The welcome to expensify modal doesn't show.

What is the root cause of that problem?

There are a couple of root causes of this issue.

The modal doesn't show because the isFirstTimeNewExpensifyUser is undefined.

if (!isFirstTimeNewExpensifyUser) {
return;
}

First, isOnboardingFlowStatusKnownPromise promise is never reset. So, if it's resolved once, logging out and logging in as a new user will pass the promise immediately.

Second, isAbleToDetermineOnboardingStatus doesn't wait for isFirstTimeNewExpensifyUser data to be ready.

function isAbleToDetermineOnboardingStatus({onAble, onNotAble}: DetermineOnboardingStatusProps) {
const hasRequiredOnyxKeysBeenLoaded = [hasProvidedPersonalDetails, hasSelectedPurpose].every((value) => value !== undefined);

Last, isFirstTimeNewExpensifyUser is returned as false even for a new user.

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

  1. Reset isOnboardingFlowStatusKnownPromise promise and other data when signing out. We did this before but the code was removed.
function resetRequiredDataCheck() {
    isOnboardingFlowStatusKnownPromise = new Promise<void>((resolve) => {
        resolveOnboardingFlowStatus = resolve;
    });
    hasProvidedPersonalDetails = undefined;
    isFirstTimeNewExpensifyUser = undefined;
}

Call it in Session.cleanupSession

  1. Add isFirstTimeNewExpensifyUser to hasRequiredOnyxKeysBeenLoaded array

    const hasRequiredOnyxKeysBeenLoaded = [hasProvidedPersonalDetails, hasSelectedPurpose].every((value) => value !== undefined);

  2. Call isAbleToDetermineOnboardingStatus({onAble: resolveOnboardingFlowStatus}); in isFirstTimeNewExpensifyUser onyx callback.

Onyx.connect({
key: ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER,
initWithStoredValues: false,
callback: (value) => {
// If isFirstTimeNewExpensifyUser was true do not update it to false. We update it to false inside the Welcome.show logic
// More context here https://github.com/Expensify/App/pull/16962#discussion_r1167351359
isFirstTimeNewExpensifyUser = value ?? undefined;
checkOnReady();
},
});

  1. Fix in the BE to return correct isFirstTimeNewExpensifyUser value.

But since the comment here mentioning that isFirstTimeNewExpensifyUser is going to be removed, maybe we can skip 2-4.

// Remove once Stage 1 Onboarding Flow is ready
if (!isFirstTimeNewExpensifyUser) {
return;
}

@jliexpensify
Copy link
Contributor

@izarutskaya to me, this doesn't seem like a bug - a Magic link is designed to allow you to sign in. @bernhardoj curious to get your thoughts, as you've given a proposal already.

@bernhardoj
Copy link
Contributor

@jliexpensify the welcome modal doesn't show too if the user sign up normally with magic code input.

@jliexpensify
Copy link
Contributor

Yep, that's what i thought - so this isn't a bug right? It's working as intended.

@bernhardoj
Copy link
Contributor

bernhardoj commented Apr 19, 2024

Hmm, I think welcome modal should be shown for new user, right?

is it different now?

@jliexpensify
Copy link
Contributor

I'm not sure if anything has changed, but let me clarify what I think the intended behaviour should be, based off the repro steps:

  1. Create new account = see Welcome Modal
  2. Copy the Magic Link from email = Welcome Modal should still be active, as Magic Link is not used
  3. Change the URL to staging = Welcome Modal should still be active, as Magic Link is not used
  4. Open a new tab and navigate to the staging Magic Link = at this point, since we've clicked on the staging Magic Link, this "validates" or "activates" the new account.
  5. Navigate to the original tab = user should now be logged in, and no Welcome Modal is shown as the Magic Link has already been clicked on and their account is "activated"

So are you saying that the Modal should still be shown at step 4? What I think is the Magic Link has now been used at that step, so the Welcome Modal should be bypassed.

@bernhardoj
Copy link
Contributor

Hmm, maybe we are talking about a different welcome modal. The modal I'm thinking is this one,
image

I see that we are going to replace it with onboarding modal, but the root cause of the issue will still persist and potentially trigger a false alarm that the user already completes the onboarding flow even though they are not yet, but I don't know yet what would happen with that.

@jliexpensify
Copy link
Contributor

You're right, it's actually not very clear which Welcome Modal @izarutskaya is talking about. My assumption is this one, as it's the only one in the video:

image

@izarutskaya can you confirm which Welcome Modal? If it's the Onboarding Modal, then we need to change this GH body and re-test, and then we can move forward.

@jliexpensify
Copy link
Contributor

Bump @izarutskaya

@melvin-bot melvin-bot bot added the Overdue label Apr 25, 2024
@jliexpensify
Copy link
Contributor

Bump @izarutskaya to address this comment - I have posted in Slack here.

@melvin-bot melvin-bot bot removed the Overdue label Apr 26, 2024
@izarutskaya
Copy link
Author

izarutskaya commented Apr 26, 2024

Hello @jliexpensify
Sorry for waiting, I mean this Welcome Modal (Previously it looked like in this comment #40432 (comment)). Thank you
Screenshot 2024-04-26 144830

@jliexpensify
Copy link
Contributor

jliexpensify commented Apr 29, 2024

Got it - so you're actually referring to something completely different to @bernhardoj and myself.

I'm going to loop in @Expensify/design to review this one - maybe @dubielzyk-expensify can confirm if this and/or this are meant to pop up with the described flow.

@dubielzyk-expensify
Copy link
Contributor

Interesting. I believe we're killing this modal in favor of Stage 2 Onboarding.

We will wanna make sure they see the new onboarding flow and this new welcome modal.

So if I understand this bug correctly, we'll still wanna make sure they see the latest modal with the video.

cc @MitchExpensify and @Expensify/design in case they disagree

@jliexpensify
Copy link
Contributor

Awesome, I thought so - thanks Jon. Once we get confirmation, happy to update the GH body with the screenshot/info and get this posted Externally.

@MitchExpensify
Copy link
Contributor

We will wanna make sure they see the new onboarding flow and #40432 (comment).

Agree this is our goal

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Apr 30, 2024
Copy link

melvin-bot bot commented Apr 30, 2024

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

@melvin-bot melvin-bot bot changed the title Sign up - "Welcome to Expensify" modal not appears on a new account [$250] Sign up - "Welcome to Expensify" modal not appears on a new account Apr 30, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 30, 2024
Copy link

melvin-bot bot commented Apr 30, 2024

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

@jliexpensify
Copy link
Contributor

Updated GH, assigned to External. @bernhardoj did you need to make adjustments to your proposal?

@bernhardoj
Copy link
Contributor

bernhardoj commented May 2, 2024

The root cause is already fixed in the new onboarding modal PR. I can see the onboarding modal after signing up.

@jliexpensify
Copy link
Contributor

Nice, thank you! I'll close this now.

@rojiphil rojiphil removed their assignment May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants