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] Onboarding - "Start a free trial" banner and button appear in Concierge then disappear #53526

Open
8 tasks done
IuliiaHerets opened this issue Dec 4, 2024 · 16 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 4, 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.71-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): didjojdojjdidjo2@gmail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Sign up with a new Gmail account (random email without +).
  3. On onboarding purpose, choose Manage my team's expenses.
  4. Select organization size.
  5. Select an accounting.
  6. Complete the onboarding.

Expected Result:

"Start a free trial" banner and button should appear consistently.

Actual Result:

After the onboarding is complete, "Start a free trial" banner (LHN) and button appear in Concierge.
Then, "Start a free trial" banner" disappears from Concierge report in LHN when #admins room shows up.
When switching to #admins and back to Concierge, "Start a free trial" banner (LHN) and button disappear from Concierge.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6683821_1733279795626.20241204_100133.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021864974056851982720
  • Upwork Job ID: 1864974056851982720
  • Last Price Increase: 2024-12-06
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @c3024
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Dec 4, 2024
Copy link

melvin-bot bot commented Dec 4, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Dec 4, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Dec 4, 2024
Copy link
Contributor

github-actions bot commented Dec 4, 2024

👋 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.

@puneetlath puneetlath added DeployBlockerCash This issue or pull request should block deployment and removed DeployBlockerCash This issue or pull request should block deployment labels Dec 4, 2024
Copy link

melvin-bot bot commented Dec 4, 2024

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

Copy link

melvin-bot bot commented Dec 4, 2024

💬 A slack conversation has been started in #expensify-open-source

Copy link
Contributor

github-actions bot commented Dec 4, 2024

👋 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.

@twisterdotcom
Copy link
Contributor

The button does appear, I just think the only issue is that the "Start a free trial" tip beside the room name for Concierge disappears when the #admins room appears:

53526.mp4

I wouldn't call it a deploy blocker.

@puneetlath puneetlath added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Dec 4, 2024
@truph01
Copy link
Contributor

truph01 commented Dec 5, 2024

Edited by proposal-police: This proposal was edited at 2024-12-05 04:36:14 UTC.

Proposal

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

After the onboarding is complete, "Start a free trial" banner (LHN) and button appear in Concierge.
Then, "Start a free trial" banner" disappears from Concierge report in LHN when #admins room shows up.
When switching to #admins and back to Concierge, "Start a free trial" banner (LHN) and button disappear from Concierge.

What is the root cause of that problem?

  • The logic to display "Start a free trial" are:

{ReportUtils.isChatUsedForOnboarding(report) && <FreeTrial badgeStyles={[styles.mnh0, styles.pl2, styles.pr2, styles.ml1]} />}

{!shouldUseNarrowLayout && isChatUsedForOnboarding && freeTrialButton}

both of them use ReportUtils.isChatUsedForOnboarding(report). But this function also use onboarding data:

App/src/libs/ReportUtils.ts

Lines 8293 to 8300 in 0e28aa4

function isChatUsedForOnboarding(optionOrReport: OnyxEntry<Report> | OptionData): boolean {
// onboarding can be an array or an empty object for old accounts and accounts created from olddot
if (onboarding && !Array.isArray(onboarding) && !isEmptyObject(onboarding) && onboarding.chatReportID) {
return onboarding.chatReportID === optionOrReport?.reportID;
}
return (optionOrReport as OptionData)?.isConciergeChat ?? isConciergeChatReport(optionOrReport);
}

  • If the onboarding data is updated, isChatUsedForOnboarding is not called again, so that the condition to display "Start a free trial" can be outdated.

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

  • We should update function isChatUsedForOnboarding so that it receives onboarding as the 2nd param. And then when using it:

{ReportUtils.isChatUsedForOnboarding(report) && <FreeTrial badgeStyles={[styles.mnh0, styles.pl2, styles.pr2, styles.ml1]} />}

should be:

                                                {ReportUtils.isChatUsedForOnboarding(report, onboarding) && <FreeTrial badgeStyles={[styles.mnh0, styles.pl2, styles.pr2, styles.ml1]} />}

with

    const [onboarding] = useOnyx(ONYXKEYS.NVP_ONBOARDING);

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

  • We should update isChatUsedForOnboarding function so that it will match the new isChatUsedForOnboarding version.

What alternative solutions did you explore? (Optional)

@twisterdotcom
Copy link
Contributor

@truph01 this isn't external yet, and we will assign @c3024 after they comment here. Thanks for the proposal anyway!

@c3024
Copy link
Contributor

c3024 commented Dec 5, 2024

Please assign me.

@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Dec 6, 2024
@melvin-bot melvin-bot bot changed the title Onboarding - "Start a free trial" banner and button appear in Concierge then disappear [$250] Onboarding - "Start a free trial" banner and button appear in Concierge then disappear Dec 6, 2024
Copy link

melvin-bot bot commented Dec 6, 2024

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

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

melvin-bot bot commented Dec 6, 2024

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

@twisterdotcom twisterdotcom removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 6, 2024
@melvin-bot melvin-bot bot added the Overdue label Dec 9, 2024
@iwiznia
Copy link
Contributor

iwiznia commented Dec 9, 2024

@c3024 any update here?

@melvin-bot melvin-bot bot removed the Overdue label Dec 9, 2024
@c3024
Copy link
Contributor

c3024 commented Dec 9, 2024

This issue arose because of moving the tasks to the #admins room for the “newDotManageTeam” intent. That PR was reverted because it uncovered a backend bug. This is being fixed in these PRs. The revert of this revert will be merged after the backend fixes are deployed.

So, I think we should hold this issue until #53661 is merged.

@twisterdotcom twisterdotcom changed the title [$250] Onboarding - "Start a free trial" banner and button appear in Concierge then disappear [HOLD on #53661] [$250] Onboarding - "Start a free trial" banner and button appear in Concierge then disappear Dec 9, 2024
@twisterdotcom twisterdotcom added Weekly KSv2 and removed Daily KSv2 labels Dec 9, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Dec 11, 2024
@thesahindia
Copy link
Member

@twisterdotcom, I’m assigned as the reviewer for the PR, but I’m unsure if it requires a C+ reviewer. Please let me know.

@twisterdotcom
Copy link
Contributor

Probably. Given the revert is done, does this still need to be held @c3024?

@c3024
Copy link
Contributor

c3024 commented Dec 16, 2024

This can be removed from hold. I think a C+ review of the PR opened for this issue will be useful too.

@twisterdotcom twisterdotcom changed the title [HOLD on #53661] [$250] Onboarding - "Start a free trial" banner and button appear in Concierge then disappear [$250] Onboarding - "Start a free trial" banner and button appear in Concierge then disappear Dec 17, 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. Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants