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] Assign Task - When changing Assignee, the page lags when closing modal #43410

Closed
1 of 6 tasks
lanitochka17 opened this issue Jun 10, 2024 · 56 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jun 10, 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.81-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+emilio@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open New Expensify App
  2. Sign into a valid account (HT account is better for reproduction)
  3. Create a Task and then click on the IOU
  4. Change the Assignee and notice the page closing.

Expected Result:

User expects the page to close "clean"

Actual Result:

The page has a slight "lag/Delay" when closing, visible for a couple of seconds.

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

Bug6508417_1718040550665.When_changing_Assignee_the_page_lags.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01794355bb64abf4a9
  • Upwork Job ID: 1800741657347973622
  • Last Price Increase: 2024-07-10
  • Automatic offers:
    • allgandalf | Reviewer | 103151963
    • truph01 | Contributor | 103151965
Issue OwnerCurrent Issue Owner: @allgandalf
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

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

@JmillsExpensify 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

@JmillsExpensify JmillsExpensify added the Internal Requires API changes or must be handled by Expensify staff label Jun 12, 2024
@JmillsExpensify
Copy link

I'll open it up to the community for proposals.

@JmillsExpensify JmillsExpensify added External Added to denote the issue can be worked on by a contributor and removed Internal Requires API changes or must be handled by Expensify staff labels Jun 12, 2024
@melvin-bot melvin-bot bot changed the title Assign Task - When changing Assignee, the page lags when closing modal [$250] Assign Task - When changing Assignee, the page lags when closing modal Jun 12, 2024
Copy link

melvin-bot bot commented Jun 12, 2024

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

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

melvin-bot bot commented Jun 12, 2024

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

@truph01
Copy link
Contributor

truph01 commented Jun 12, 2024

Proposal

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

The page has a slight "lag/Delay" when closing, visible for a couple of seconds.

What is the root cause of that problem?

After selecting the assignee in

Navigation.dismissModal(report.reportID);
, some Onyx updates will occur that affect the JS thread. Those Onyx updates are from TaskActions.editTaskAssignee that was called here, they updates both the report and report actions which are heavy.

Right after that we goBack, so the navigation animation is affected by the Onyx updates.

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

Make use of useWaitForNavigation, we can navigate first, then handle the Onyx data update in the background, the Onyx data update is not user-visible so it's best done in the background so other user-visible things like navigation/animation is not obstructed

Navigation.dismissModal(report.reportID);

waitForNavigate(() => {
    // handle the data update here
});

The data update is this block

And do the same in the new task case

What alternative solutions did you explore? (Optional)

Run the navigation in InteractionManager.runAfterInteractions so it waits for the Onyx updates to complete before navigating

InteractionManager.runAfterInteractions(() => {
    Navigation.dismissModal(report.reportID);
});

And in here too

Another optional point to consider, in

, it's connecting to the full reports collection even though only 1 report from the route param is needed. We can change to connect to only that 1 report by withOnyx or useOnyx, it will also help it to be more smooth.

Some other notes:

@truph01
Copy link
Contributor

truph01 commented Jun 12, 2024

Proposal has been updated to add an optional change

@truph01
Copy link
Contributor

truph01 commented Jun 12, 2024

Proposal updated to add alternative fix

@allgandalf
Copy link
Contributor

@truph01 , Your current RCA is:

some Onyx updates will occur that affect the JS thread. Right after that we goBack, so the navigation animation is affected by the Onyx updates.

Can you please point as to what Onyx updates you are referring to? it's necessary to have a clear RCA for us to proceed with solution,

We should know why first then we can think of possible solution to a bug , thanks and looking forward to your reply

@melvin-bot melvin-bot bot added the Overdue label Jun 17, 2024
@truph01
Copy link
Contributor

truph01 commented Jun 17, 2024

Can you please point as to what Onyx updates you are referring to?

@allgandalf Appreciate the feedback! I added more details to the proposal.

@allgandalf
Copy link
Contributor

Chill melvin, will review the updated proposal today/tomorrow 👍

@melvin-bot melvin-bot bot removed the Overdue label Jun 17, 2024
Copy link

melvin-bot bot commented Jun 19, 2024

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

@allgandalf
Copy link
Contributor

@JmillsExpensify Discussing something internally

@allgandalf
Copy link
Contributor

Internal discussion on this issue was completed, will review the pending proposal tomorrow 👍

Copy link

melvin-bot bot commented Jun 24, 2024

@JmillsExpensify @allgandalf 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 melvin-bot bot added the Overdue label Jun 24, 2024
@allgandalf
Copy link
Contributor

allgandalf commented Jun 24, 2024

sorry was AFK, will review today/tomorrow, reviewing an urgent deploy blocker today

@melvin-bot melvin-bot bot removed the Overdue label Jun 24, 2024
@allgandalf
Copy link
Contributor

allgandalf commented Jun 25, 2024

@truph01 , your RCA is correct, and according to the expected result:

User expects the page to close "clean"

I think your solution is good to go!

@truph01 's Main Soution looks good to me here

🎀👀🎀 C+ reviewed

@roryabraham , please find the initial summary here

@MonilBhavsar
Copy link
Contributor

Okay, thanks for clarifying. Let's move ahead and we can update to use useOnyx

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

melvin-bot bot commented Jul 17, 2024

📣 @allgandalf 🎉 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 Jul 17, 2024

📣 @truph01 🎉 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 📖

@truph01 truph01 mentioned this issue Jul 18, 2024
50 tasks
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 18, 2024
@truph01
Copy link
Contributor

truph01 commented Jul 18, 2024

PR #45691 can be reviewed

@allgandalf
Copy link
Contributor

Left some comments over the PR @truph01 , thanks

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@allgandalf
Copy link
Contributor

Woah, @truph01 can you verify on staging if this is still reproducible ?

@allgandalf
Copy link
Contributor

friendly bump @truph01

@truph01
Copy link
Contributor

truph01 commented Jul 22, 2024

@allgandalf I tested it on my end, and the bug is still reproducible, but not consistently.

@allgandalf
Copy link
Contributor

allgandalf commented Jul 22, 2024

how should we proceed here @MonilBhavsar ?, Qa said the bug is not reproducible and contributor says it is reproducible but not consistently

@truph01
Copy link
Contributor

truph01 commented Jul 22, 2024

@allgandalf What about your end? Can you reproduce it?

@allgandalf
Copy link
Contributor

bump @MonilBhavsar

@MonilBhavsar
Copy link
Contributor

Sorry missed it somehow. i think we should still fix it and improve the code. I guess it will be constantly reproduced on high traffic accounts?

@allgandalf
Copy link
Contributor

I guess it will be constantly reproduced on high traffic accounts?

Let me check on current staging

@allgandalf
Copy link
Contributor

The issue is reproducible to me on staging, i will go forward with reviewing the PR

Screen.Recording.2024-07-31.at.11.09.56.AM.mov

@MonilBhavsar
Copy link
Contributor

Yes! Thank you for checking

@allgandalf
Copy link
Contributor

Still working on the PR, had one doubt, can you address that when you get time @MonilBhavsar

@allgandalf
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: 20354 task assignees list refactor #35841

  • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/35841/files#r1732183573

  • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A

  • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Proposal

  1. Open App
  2. Create a Task and then click on the IOU
  3. Change the Assignee and notice the page closing.

Verify that the page closes without delay/lag

Do we agree 👍 or 👎

@allgandalf
Copy link
Contributor

@JmillsExpensify , this is ready for payment 🙇

@JmillsExpensify
Copy link

Payment summary:

@JmillsExpensify
Copy link

All contributors paid out. I'm going to past on creating the regression test given the scale/type of bug, so closing this out!

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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Development

No branches or pull requests

7 participants