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 - Infinite skeleton on concierge chat page when deleting a task and going back #40918

Closed
1 of 6 tasks
lanitochka17 opened this issue Apr 24, 2024 · 43 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Apr 24, 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: 1.4.65-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:
Slack conversation:

Issue found when executing PR #39687

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Sign in with a new Gmail account
  3. On the Onboarding select "Track business spend for taxes" as a purpose and click on continue
  4. Input first name and last name and click on continue
  5. Input a business name and click on continue
  6. Open Concierge chat
  7. Open "Track an expense" task
  8. Delete the task
  9. Click on the link on the header to go back to Concierge

Expected Result:

Concierge chat loads without any problem

Actual Result:

Infinite skeleton loading screen is seen

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

Add any screenshot/video evidence

Bug6460267_1713964177563.bandicam_2024-04-24_15-55-10-302.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d84dc757a6672e78
  • Upwork Job ID: 1784968718723895296
  • Last Price Increase: 2024-05-07
  • Automatic offers:
    • eh2077 | Reviewer | 0
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 24, 2024
Copy link

melvin-bot bot commented Apr 24, 2024

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

@lanitochka17
Copy link
Author

@CortneyOfstad FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@melvin-bot melvin-bot bot added the Overdue label Apr 26, 2024
@CortneyOfstad
Copy link
Contributor

Sorry, I was OoO when this was assigned — reviewing everything now!

@melvin-bot melvin-bot bot removed the Overdue label Apr 29, 2024
@CortneyOfstad
Copy link
Contributor

Was able to recreate this, as shown below:

2024-04-29_10-28-05.mp4

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

melvin-bot bot commented Apr 29, 2024

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

@melvin-bot melvin-bot bot changed the title Onboarding - Infinite skeleton on concierge chat page when deleting a task and going back [$250] Onboarding - Infinite skeleton on concierge chat page when deleting a task and going back Apr 29, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 29, 2024
Copy link

melvin-bot bot commented Apr 29, 2024

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

@eh2077
Copy link
Contributor

eh2077 commented May 1, 2024

Posted on slack to attract proposals

@CortneyOfstad
Copy link
Contributor

Thank you @eh2077!!

@vradriano
Copy link
Contributor

vradriano commented May 2, 2024

Proposal

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

Encountering an infinite skeleton issue when attempting to delete a workspace and then returning to Expensify Concierge.

What is the root cause of that problem?

The problem originates from the completeOnboarding function in src/libs/actions/Report.ts. This function creates task objects from the concierge without assigning a parentReportActionID, leading to object issues when deleting these tasks in the deleteTask function in src/libs/actions/Task.ts. Consequently, when a user deletes one of these tasks created by completeOnboarding it generates malformed objects containing only two parameters: {linkedMetadata: [empty], message: ""}. As a result, when the View attempts to iterate over these objects, it crashes because it is missing required fields and continues to call the `OlderReportActions' route indefinitely, leading to the eternal skeleton.

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

The solution involves adding the parameter parentReportActionID generated by taskReportAction to the currentTask object when it's in the process onboarding at the function completeOnboarding. We can't pass it directly because we need to generate the parentReportActionID in the const taskReportAction, then retrieve the value to assign it to the currentTask.

App/src/libs/actions/Report.ts

Lines 3049 to 3074 in 64695c8

const tasksData = data.tasks.map((task, index) => {
const currentTask = ReportUtils.buildOptimisticTaskReport(
actorAccountID,
undefined,
targetChatReportID,
task.title,
undefined,
targetChatPolicyID,
CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN,
);
const taskCreatedAction = ReportUtils.buildOptimisticCreatedReportAction(targetEmail);
const taskReportAction = ReportUtils.buildOptimisticTaskCommentReportAction(
currentTask.reportID,
task.title,
0,
`task for ${task.title}`,
targetChatReportID,
actorAccountID,
index + 3,
{
childVisibleActionCount: 2,
childCommenterCount: 1,
childLastVisibleActionCreated: DateUtils.getDBTime(),
childOldestFourAccountIDs: `${actorAccountID}`,
},
);
After the line(3074) we can add this line:

currentTask.parentReportActionID = taskReportAction.reportAction.reportActionID 

or for better readability code:

const parentReportActionID = taskReportAction.reportAction.reportActionID 
currentTask.parentReportActionID = parentReportActionID

What alternative solutions did you explore? (Optional)

We also can create a map specifically to assign it to the tasksData. Like this:

tasksData = tasksData.map((taskData, index) => {
	taskData.currentTask.parentReportActionID = taskData.taskReportAction.reportAction.reportActionID;
	return taskData;
});

Copy link

melvin-bot bot commented May 2, 2024

📣 @vradriano! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@vradriano
Copy link
Contributor

Contributor details
Your Expensify account email: vradriano@hotmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0153de4aa593214c8f

Copy link

melvin-bot bot commented May 2, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@eh2077
Copy link
Contributor

eh2077 commented May 3, 2024

@vradriano Thanks for your proposal!

I'm not following your root cause analysis. Can you investigate why we have issue for onboarding tasks but normal tasks work fine?

@vradriano
Copy link
Contributor

vradriano commented May 5, 2024

Proposal

[Updated] #40918 (comment)

@vradriano
Copy link
Contributor

vradriano commented May 5, 2024

@eh2077 I apologize for the initial analysis misunderstanding. I misunderstood the problem at first, but I hope everything is clear now. Normal tasks are functioning as expected because the function that creates the task object includes code similar to this, ensuring the reportActionID is assigned to the task object.

@melvin-bot melvin-bot bot added the Overdue label May 6, 2024
@CortneyOfstad
Copy link
Contributor

@eh2077 bump on the updated proposal here — thanks!

@melvin-bot melvin-bot bot removed the Overdue label May 6, 2024
@eh2077
Copy link
Contributor

eh2077 commented May 6, 2024

Re-reviewing the proposal!

Copy link

melvin-bot bot commented May 7, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented May 7, 2024

Current assignee @cristipaval is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@vradriano
Copy link
Contributor

vradriano commented May 7, 2024

@eh2077 I was initially hesitant to write a big proposal, so I decided to remove it. Now, as you stated, I've added it again to make it clear. About my PR, if i don't face any issue, i will create it today (May 7th). It's my first one, and i promise will do better in the future. Thanks for the suggestion and for your help.

@eh2077
Copy link
Contributor

eh2077 commented May 7, 2024

@vradriano Please only open the PR after you're assigned by the internal engineer. Let's wait for @cristipaval 's review.

Copy link

melvin-bot bot commented May 8, 2024

@CortneyOfstad @cristipaval @eh2077 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!

@eh2077
Copy link
Contributor

eh2077 commented May 9, 2024

@cristipaval Friendly bump! This is waiting for your review #40918 (comment)

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 9, 2024
@cristipaval
Copy link
Contributor

Thanks for bumping me!

Copy link

melvin-bot bot commented May 9, 2024

📣 @eh2077 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented May 9, 2024

📣 @vradriano You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@vradriano
Copy link
Contributor

vradriano commented May 9, 2024

Hi, i'm going to create the pull request for review today (May 9) if i don't encounter any issues.

UPDATE: I'm setting the native apps to run the tests, so it can take time.

@CortneyOfstad
Copy link
Contributor

Sounds good — thanks @vradriano!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels May 11, 2024
@CortneyOfstad
Copy link
Contributor

Deployed to staging 7 hours ago!

@CortneyOfstad
Copy link
Contributor

We're in a merge freeze until Wednesday, so it will be a bit before this is launched to production

@CortneyOfstad
Copy link
Contributor

Merge freeze is planned to end today 🤞

@vradriano
Copy link
Contributor

vradriano commented Jun 2, 2024

Hi @CortneyOfstad, I hope you're well. Since the PR was merged to production #42022 (comment), could i get an update on it?
Thanks!

@vradriano
Copy link
Contributor

@CortneyOfstad can i have an update on this?

@CortneyOfstad
Copy link
Contributor

@vradriano sorry about that! I am not sure why the reviewing label was not automatically removed, so I am getting that adjusted now. Will begin processing payment ASAP.

@CortneyOfstad CortneyOfstad added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Jun 10, 2024
@CortneyOfstad
Copy link
Contributor

@vradriano I am having trouble finding your Upwork profile — can you link it here, so I can send you a proposal for payment? Thanks!

@vradriano
Copy link
Contributor

@CortneyOfstad No problem. Here is my profile on Upwork: https://www.upwork.com/freelancers/~0153de4aa593214c8f

@CortneyOfstad
Copy link
Contributor

Thank you! I just sent you an offer — let me know once you accept and I'll get that paid ASAP!

@vradriano
Copy link
Contributor

I accepted the proposal. I'm not sure if it was the correct way, but it's done.

@CortneyOfstad
Copy link
Contributor

Payment Summary

@eh2077 — paid $250 via Upwork
@vradriano — paid $250 via Upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

5 participants