App icon indicating copy to clipboard operation
App copied to clipboard

[$500] mWeb - Welcome to Expensify is shown for existing user after logging in from public room

Open lanitochka17 opened this issue 1 year ago β€’ 6 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.34-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: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause -Internal Team Slack conversation:

Action Performed:

  1. Log out of New Expensify
  2. Navigate to this link - https://staging.new.expensify.com/r/5408450846930023
  3. Click on Sign In
  4. Login in with an existing account

Expected Result:

Public room chat history should be displayed. Welcome to Expensify message should be either shown before logging in or not at all for existing users

Actual Result:

Welcome to Expensify screen is shown after log in, user is forced to close it to view public room chat history

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • [x] Android: Native
  • [ ] Android: mWeb Chrome
  • [ ] iOS: Native
  • [ ] iOS: mWeb Safari
  • [ ] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/3f604c28-8b55-4362-a461-5ce749700fe1

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01adefc3ca63c114f2
  • Upwork Job ID: 1752868613105299456
  • Last Price Increase: 2024-02-01

lanitochka17 avatar Feb 01 '24 01:02 lanitochka17

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

melvin-bot[bot] avatar Feb 01 '24 01:02 melvin-bot[bot]

Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] avatar Feb 01 '24 01:02 melvin-bot[bot]

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

melvin-bot[bot] avatar Feb 01 '24 01:02 melvin-bot[bot]

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

lanitochka17 avatar Feb 01 '24 01:02 lanitochka17

Proposal

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

Engagement modal is shown while visiting a public room via deep link as an anonymous user.

What is the root cause of that problem?

The check for showing engagement model is performed inside BottomTabBar in a useEffect.

https://github.com/Expensify/App/blob/3e7744556f7e7f797051af2d00e2f38878f98965/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabBar.tsx#L55

Inside Welcome.show method, the engamement modal is shown if current user is isFirstTimeNewExpensifyUser.

https://github.com/Expensify/App/blob/3e7744556f7e7f797051af2d00e2f38878f98965/src/libs/actions/Welcome.ts#L130-L132

https://github.com/Expensify/App/blob/3e7744556f7e7f797051af2d00e2f38878f98965/src/libs/actions/Welcome.ts#L171-L173

However the above check doesn't consider whether the current user is an anonymous user. That's why the engagement modal gets shown for anonymous user.

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

Check if current user is an anonymous user before showing engagement modal.

// Add check for anonymous user
if (!Session.isAnonymousUser() && !Policy.isAdminOfFreePolicy(allPolicies ?? undefined) && !isExitingToWorkspaceRoute && !hasSelectedChoice && !hasDismissedModal && Object.keys(allPolicies ?? {}).length === 1) {
  showEngagementModal();
}

What alternative solutions did you explore? (Optional)

None

aswin-s avatar Feb 01 '24 05:02 aswin-s

I asked in #vip-vsb if this is a bug or expected behavior: https://expensify.slack.com/archives/C066HJM2CAZ/p1707178252015419

sakluger avatar Feb 06 '24 00:02 sakluger

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Feb 08 '24 16:02 melvin-bot[bot]

@sakluger, @Santhosh-Sellavel Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Feb 09 '24 15:02 melvin-bot[bot]

I asked in #vip-vsb if this is a bug or expected behavior: https://expensify.slack.com/archives/C066HJM2CAZ/p1707178252015419

Any update @sakluger

Santhosh-Sellavel avatar Feb 09 '24 15:02 Santhosh-Sellavel

@sakluger, @Santhosh-Sellavel Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Feb 12 '24 15:02 melvin-bot[bot]

Yes, sorry for the delay. This is confirmed as a bug - we should only show the welcome message to new users.

sakluger avatar Feb 12 '24 18:02 sakluger

Issue not reproducible during KI retests. (First week)

mvtglobally avatar Feb 13 '24 04:02 mvtglobally

@sakluger Seems the issue is not reproducible, if any C+ assistance please reassign it, thanks! Unassigning due to low bandwidth as am planning for OOO

Santhosh-Sellavel avatar Feb 13 '24 20:02 Santhosh-Sellavel

I can take over since I already have context while reviewing original PR of this new feature


I am not able to reproduce on Step 4 (after sign in).

But instead I am seeing welcome page on Step 2 (after deep link). Is this expected or bug? I believe bug

https://github.com/Expensify/App/assets/108292595/2af9a455-7ed4-41c7-975d-80983acc147e

situchan avatar Feb 13 '24 22:02 situchan

@sakluger this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Feb 15 '24 15:02 melvin-bot[bot]

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Feb 15 '24 16:02 melvin-bot[bot]

πŸ“£ @situchan πŸŽ‰ 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[bot] avatar Feb 15 '24 22:02 melvin-bot[bot]

@situchan thanks for taking over!

Did you see the welcome message before signing in? Yes, that's definitely a bug.

sakluger avatar Feb 15 '24 22:02 sakluger

yes, I am seeing welcome message as anonymous user. Just tested again on latest staging

https://github.com/Expensify/App/assets/108292595/edf19842-a06b-4254-87f7-78847b6060f7

situchan avatar Feb 15 '24 22:02 situchan

@sakluger, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Feb 19 '24 15:02 melvin-bot[bot]

Looking for proposals

situchan avatar Feb 19 '24 15:02 situchan

@situchan Any comments on this proposal : https://github.com/Expensify/App/issues/35531#issuecomment-1920555540

aswin-s avatar Feb 19 '24 16:02 aswin-s

@aswin-s your proposal was posted 3 weeks ago. Was it supposed to fix Step 4 issue or Step 2 issue or both?

situchan avatar Feb 19 '24 16:02 situchan

@aswin-s could you clarify which issue your proposal was fixing? Was it step 2 or 4 of the reproduction steps?

sakluger avatar Feb 21 '24 21:02 sakluger

@situchan @sakluger The app behaviour has changed since I posted my proposal. I can no longer reproduce the issue at Step 4. However engagement modal is being shown for anonymous user. I've updated my proposal to address this issue.

aswin-s avatar Feb 22 '24 03:02 aswin-s

@sakluger @situchan this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

melvin-bot[bot] avatar Feb 22 '24 15:02 melvin-bot[bot]

Thanks @aswin-s! @situchan what do you think of the updated proposal?

sakluger avatar Feb 25 '24 19:02 sakluger

@aswin-s's proposal looks good to me.

Alternatively, set isFirstTimeNewExpensifyUser to false in backend for anonymous user but I don't think we'll do that.

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed

situchan avatar Feb 28 '24 10:02 situchan

Triggered auto assignment to @luacmartins, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Feb 28 '24 10:02 melvin-bot[bot]

@luacmartins Bug not reproducible on Step 4 (after sign in) which was OP. But instead seeing welcome page on Step 2 (after deep link). This is the bug to fix.

situchan avatar Feb 28 '24 10:02 situchan