[$500] mWeb - Welcome to Expensify is shown for existing user after logging in from public room
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:
- Log out of New Expensify
- Navigate to this link - https://staging.new.expensify.com/r/5408450846930023
- Click on Sign In
- 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
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01adefc3ca63c114f2
- Upwork Job ID: 1752868613105299456
- Last Price Increase: 2024-02-01
Job added to Upwork: https://www.upwork.com/jobs/~01adefc3ca63c114f2
Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (External)
We think that this bug might be related to #vip-vsp CC @quinthar
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
I asked in #vip-vsb if this is a bug or expected behavior: https://expensify.slack.com/archives/C066HJM2CAZ/p1707178252015419
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@sakluger, @Santhosh-Sellavel Whoops! This issue is 2 days overdue. Let's get this updated quick!
I asked in #vip-vsb if this is a bug or expected behavior: https://expensify.slack.com/archives/C066HJM2CAZ/p1707178252015419
Any update @sakluger
@sakluger, @Santhosh-Sellavel Whoops! This issue is 2 days overdue. Let's get this updated quick!
Yes, sorry for the delay. This is confirmed as a bug - we should only show the welcome message to new users.
Issue not reproducible during KI retests. (First week)
@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
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
@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!
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
π£ @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 π
@situchan thanks for taking over!
Did you see the welcome message before signing in? Yes, that's definitely a bug.
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
@sakluger, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!
Looking for proposals
@situchan Any comments on this proposal : https://github.com/Expensify/App/issues/35531#issuecomment-1920555540
@aswin-s your proposal was posted 3 weeks ago. Was it supposed to fix Step 4 issue or Step 2 issue or both?
@aswin-s could you clarify which issue your proposal was fixing? Was it step 2 or 4 of the reproduction steps?
@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.
@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!
Thanks @aswin-s! @situchan what do you think of the updated proposal?
@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
Triggered auto assignment to @luacmartins, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@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.