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

[HOLD for payment 2025-01-13] [$250] Bulk deleted categories reappear. #53035

Open
1 of 8 tasks
m-natarajan opened this issue Nov 23, 2024 · 50 comments
Open
1 of 8 tasks
Assignees
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers 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 Needs Reproduction Reproducible steps needed Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Nov 23, 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:
Reproducible in staging?: need reproduction
Reproducible in production?: need reproduction
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @trjExpensify
Slack conversation (hyperlinked to channel name): Expensify - Convert

Action Performed:

Be on a slow network 3g

  1. Go to workspace setting
  2. Select category
  3. Bulk select the categories
  4. Delete all the categories

Expected Result:

Deleted categories should not reappear

Actual Result:

Deleted categories reappear

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Add any screenshot/video evidence
2024-11-22_00-46-04.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021861090857183886137
  • Upwork Job ID: 1861090857183886137
  • Last Price Increase: 2024-12-02
  • Automatic offers:
    • ZhenjaHorbach | Contributor | 105437121
Issue OwnerCurrent Issue Owner: @sakluger
@m-natarajan m-natarajan added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. AutoAssignerNewDotQuality Used to assign quality issues to engineers labels Nov 23, 2024
Copy link

melvin-bot bot commented Nov 23, 2024

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

Copy link

melvin-bot bot commented Nov 23, 2024

Triggered auto assignment to @justinpersaud (AutoAssignerNewDotQuality)

@melvin-bot melvin-bot bot added the Weekly KSv2 label Nov 23, 2024
@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@sakluger sakluger added the External Added to denote the issue can be worked on by a contributor label Nov 25, 2024
@melvin-bot melvin-bot bot changed the title Bulk deleted categories reappear. [$250] Bulk deleted categories reappear. Nov 25, 2024
Copy link

melvin-bot bot commented Nov 25, 2024

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

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

melvin-bot bot commented Nov 25, 2024

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

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Nov 25, 2024
@muttmuure muttmuure moved this to CRITICAL in [#whatsnext] #quality Nov 25, 2024
@justinpersaud
Copy link
Contributor

Just leaving a note here that I'm going to be OOO starting tomorrow until Dec 9th. If anything requires engineering before then and I'm not around, feel free to reassign.

@melvin-bot melvin-bot bot added the Overdue label Nov 28, 2024
Copy link

melvin-bot bot commented Nov 29, 2024

@justinpersaud, @sakluger, @Pujan92 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@muttmuure
Copy link
Contributor

@Pujan92 any ideas on this one?

@zirgulis
Copy link
Contributor

zirgulis commented Dec 2, 2024

Hi, I'm Povilas from Callstack and I would like to work on this issue.

Copy link

melvin-bot bot commented Dec 2, 2024

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

@melvin-bot melvin-bot bot removed Help Wanted Apply this label when an issue is open to proposals by contributors Overdue labels Dec 2, 2024
@sakluger
Copy link
Contributor

sakluger commented Dec 2, 2024

Thanks @zirgulis! I've assigned you to the issue. Please let us know once you have a proposal for how to fix the issue.

@zirgulis
Copy link
Contributor

zirgulis commented Dec 4, 2024

@sakluger it's very difficult to reproduce this bug reliably, it seems to happen randomly. I've managed to only reproduce this a couple of times, not sure what are the exact steps to reproduce this. It might take quite some time to fully understand what's going on here. I have noticed an error in the browser console coming from onyx that it's not able to set policyCategories_ will keep investigating this
image

@Pujan92
Copy link
Contributor

Pujan92 commented Dec 21, 2024

@trjExpensify Could you plz assign the issue to @ZhenjaHorbach, Thanks!

Copy link

melvin-bot bot commented Dec 21, 2024

@justinpersaud @sakluger @Pujan92 @zirgulis this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

Copy link

melvin-bot bot commented Dec 23, 2024

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

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Dec 23, 2024

@zirgulis
Thanks for your proposal !
When we talk about an issue related to the fact that some of the remaining elements do not appear immediately
I agree with you and your proposal works !
The only thing that worries me is the issue of optimization
Perhaps instead of increasing windowSize and updateCellsBatchingPeriod we should filter the list before displaying?

And about this comment

I was not able to fully replicate the part where old categories appear and then disappear

Could this issue be similar to the one I described in the second case in this comment?
What do you think ?

@zirgulis
Copy link
Contributor

Perhaps instead of increasing windowSize and updateCellsBatchingPeriod we should filter the list before displaying?

@ZhenjaHorbach regarding your suggestion to filter: we can do this either before displaying the list (as you mentioned) or we could use Onyx.METHOD.SET instead of MERGE when deleting the categories and just pass the categories which we want to keep. This way we will have the latest data policyCategories and we will just display it.

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Dec 23, 2024

Perhaps instead of increasing windowSize and updateCellsBatchingPeriod we should filter the list before displaying?

@ZhenjaHorbach regarding your suggestion to filter: we can do this either before displaying the list (as you mentioned) or we could use Onyx.METHOD.SET instead of MERGE when deleting the categories and just pass the categories which we want to keep. This way we will have the latest data policyCategories and we will just display it.

Sounds good
But here it is also important that in offline mode we must display the removed elements

Снимок экрана 2024-12-23 в 14 58 40

@zirgulis
Copy link
Contributor

@ZhenjaHorbach after I did more testing with a larger list the onyx.set + remaining categories approach is slow, elements do not appear immediately. Filtering out the items when displaying is faster, here are the changes needed

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Dec 23, 2024

@zirgulis
Nice
Thanks !
Could you update your proposal please ?

@Pujan92 Pujan92 removed their assignment Dec 24, 2024
@melvin-bot melvin-bot bot added the Overdue label Dec 26, 2024
@zirgulis
Copy link
Contributor

@ZhenjaHorbach updated the proposal below:

Problem:

In the WorkspaceCategoriesPage users are experiencing visual glitches in the SelectionListWithModal component where:

  • previously deleted items briefly reappear
  • not deleted items are appearing slowly.

Root Cause:

The List component is slow to render and sometimes displays stale data when switching from optimistic to success onyx data.

Proposed Changes:

  • Add a filter function to filter out the list items immediately after list items are marked as pendingAction: delete. Code line to be added
  • When offline, do not filter out the list since we want to display them in the disabled state.

Tests:
There could be an automated test introduced to measure proper render times after the categories are deleted

What alternative solutions did you explore? (Optional)
The previously proposed solution was to increase the list render cycles but there were some concerns regarding the performance regression.

@melvin-bot melvin-bot bot removed the Overdue label Dec 27, 2024
@ZhenjaHorbach
Copy link
Contributor

@zirgulis
Thanks for update !
This proposal makes sense to me !

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 27, 2024

Triggered auto assignment to @blimpich, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Dec 27, 2024
@zirgulis
Copy link
Contributor

@ZhenjaHorbach @mountiny PR open: #54613

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Dec 27, 2024

@zirgulis
I think we need to wait for @blimpich decision 😅

Updates: but never mind
I'll do a review in a few hours following this thread !

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 6, 2025
@melvin-bot melvin-bot bot changed the title [$250] Bulk deleted categories reappear. [HOLD for payment 2025-01-13] [$250] Bulk deleted categories reappear. Jan 6, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 6, 2025
Copy link

melvin-bot bot commented Jan 6, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Jan 6, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-01-13. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jan 6, 2025

@ZhenjaHorbach @sakluger @ZhenjaHorbach The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers 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 Needs Reproduction Reproducible steps needed Weekly KSv2
Projects
Status: CRITICAL
Development

No branches or pull requests

10 participants