Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.57k stars 2.91k forks source link

[hold] Web - Concierge - Take a 2-minute tour task not autocomplete after finishing tour #52098

Open IuliiaHerets opened 2 weeks ago

IuliiaHerets commented 2 weeks ago

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.58.0 Reproducible in staging?: Y Reproducible in production?: N/A - new feature, doesn't exist in prod Issue was found when executing this PR: https://github.com/Expensify/App/pull/51153 Issue reported by: Applause Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/ and log in with a new account
  2. On the onboarding modal select any option other than 'Something else"
  3. Complete the onboarding flow
  4. Navigate to the Concierge chat
  5. Select the Take a 2-minute tour task
  6. Click on the link and finish the tour

Expected Result:

The task is marked complete automatically upon finishing the tour like other Concierge tasks

Actual Result:

The "Take a 2-minute tour" task is not marked complete automatically

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/a25c96b3-1f0b-47c7-9a02-aa39928ecc07

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @c3024
melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @OfstadC (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[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

github-actions[bot] commented 2 weeks ago

:wave: 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.
c3024 commented 2 weeks ago

I don't think this needs to be a deploy blocker.

For all tasks, backend sets the task as completed after the action is complete like "Track an expense" task, "Meet your setup specialist" task etc. I think this should also be handled from backend.

To handle this on frontend, the task needs to be marked as complete on clicking the external link included in the text markdown. I think this is difficult.

cc: @mountiny

c3024 commented 2 weeks ago

51153 is related to this.

lakchote commented 2 weeks ago

I do agree that it's not a blocker and that it should be handled on the backend for the reasons mentioned above by @c3024.

Waiting for your input @mountiny too

nyomanjyotisa commented 2 weeks ago

Proposal

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

Concierge - Take a 2-minute tour task not autocomplete after finishing tour

What is the root cause of that problem?

BE not autocomplete the task on SelfTourViewed API call and on the task description we directly open the self tour link so we can't call SelfTourViewed API

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

BE need to be updated, when SelfTourViewed API call should set the task as completed, and return the onyx data

And for the FE fix: Create new route and new screen for self tour, which when opened will call the SelfTourViewed API and redirect user to the self tour link

function SelfTour() {
    const {environment} = useEnvironment();
    const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);

    useEffect(() => {
        Welcome.setSelfTourViewed();
        Link.openExternalLink(getNavatticURL(environment, introSelected?.choice));
        Navigation.goBack();
    }, []);

    return null;
}

And navigate to the new route on link click https://github.com/Expensify/App/blob/7b9a0cd644ea36e1543ae63a23ea72f610029dc4/src/libs/actions/Report.ts#L3490

navatticURL: `${environmentURL}/${ROUTES.SELF_TOUR}`,

Might need to apply to other places as well if needed https://github.com/Expensify/App/blob/7b9a0cd644ea36e1543ae63a23ea72f610029dc4/src/pages/Search/EmptySearchView.tsx#L126 https://github.com/Expensify/App/blob/7b9a0cd644ea36e1543ae63a23ea72f610029dc4/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx#L449-L452

Navigation.navigate(ROUTES.SELF_TOUR);

image

What alternative solutions did you explore? (Optional)

nyomanjyotisa commented 2 weeks ago

IMO updating/fixing the BE alone won’t fix this issue, so I posted a proposal for the FE fix

mountiny commented 2 weeks ago

@c3024 @rushatgabhane should be assigned and we should mark this optimistically as completed and call the SelfTourViewed command and update the BE to mark the task as complete too

melvin-bot[bot] commented 1 week ago

@OfstadC, @lakchote, @rushatgabhane, @c3024 Eep! 4 days overdue now. Issues have feelings too...

lakchote commented 1 week ago

Didn't have time to focus on it internally as I'm focusing on a #stability issue.

@c3024 you can still raise a frontend PR to set this optimistically in the meantime (see @mountiny's comment above).

rushatgabhane commented 1 week ago

yes I'll raise a PR

lakchote commented 1 week ago

If you could do it today that'd be great @rushatgabhane

melvin-bot[bot] commented 1 week ago

@OfstadC, @lakchote, @rushatgabhane, @c3024 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

c3024 commented 1 week ago

Raised a PR.