-
Notifications
You must be signed in to change notification settings - Fork 3k
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-02-04] [$250] Search - Expense from the list does not disappear after deletion #53687
Comments
Triggered auto assignment to @mallenexpensify ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Expense from the list does not disappear after deletion What is the root cause of that problem?In
What changes do you think we should make in order to solve the problem?Change condition to update Search data if number of transaction is different:
if (transactionsLength && typeof previousTransactionsLength === 'number' && transactionsLength !== previousTransactionsLength) { What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?What alternative solutions did you explore? (Optional) |
Edited by proposal-police: This proposal was edited at 2024-12-06 15:01:26 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Search - Expense from the list does not disappear after deletion What is the root cause of that problem?We only send search request if there is an increase in transaction length, i.e. the currentTransaction length is greater than the previous transaction length
but here we are deleting the expense that will decrease the transactions length we have What changes do you think we should make in order to solve the problem?The conditions that depend on transaction length are incorrect in both
because transaction length equality can even mean there is a change that needs a search request to be sent. For instance, if a user creates a new expense but deletes another expense which could result in the transaction lengths to be equal but still there is a change that requires a fetch. We should instead depend on a condition where the previous and current transaction IDs list are not equal (of course with deep comparison between the values they hold) App/src/hooks/useSearchHighlightAndScroll.ts Lines 76 to 80 in b9107bf
and replace this with it
we can optionally add more condition of the existence of previous transaction ids and current transactionIDs to exclude the case where the values are undefined on first render 👍
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?We can render the Search page (or optionally test only What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~021865183017070238528 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rayane-djouah ( |
@rayane-djouah can you attempt reproduction and, if you're able to, review the above proposals? I tried to test and staging.new.expensify.com froze for me :/ |
Reproducible Screen.Recording.2024-12-10.at.1.52.09.AM.mov |
@FitseTLT Is the user currently able to create a new expense and delete another one at the same time? |
@luacmartins would you like to be assigned to this one as CME since it's related to the search project? |
@rayane-djouah We are not only tracking the creation/deletion of transactions created by the current user, for instance, another user member of the current user's workspace can create an expense and delete another one and when the update of transaction reaches the current user's onyx the transaction length will be equal that's what I am indicating. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Will review today |
@luacmartins, @mallenexpensify, @rayane-djouah Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@luacmartins - Some thoughts:
I think we can go with @FitseTLT proposal 🎀👀🎀 C+ reviewed |
@luacmartins I am a bit confused here. Currently useSearchHighlightAndScroll hook checks for a change in |
@FitseTLT yes, the data is being pushed to other users, but for some reason we're not returning it in the http response to the caller. So my PRs are adding all the onyxData updates to the http response. Does that make sense? |
Yep. But if you want to test you can do with branch of the PR because the BE change should solve it without any more FE change 👍 |
@FitseTLT doesn't seem to work. Check out the video below: Screen.Recording.2025-01-10.at.1.44.26.PM.mov |
@luacmartins Did you apply any BE changes? Because now it is working I remember invoice deletion was not updated too but it is working now. 2025-01-11.00-10-20.mp42025-01-11.00-07-46.mp4 |
No BE changes that I'm aware of. |
Ok but now the BE is correctly updating transactions_ list so it seems fixed. I will work on the rest of the tasks left but let u know if any BE change is needed. Maybe some other BE PR might have fixed it Thx 👍 |
This issue has not been updated in over 15 days. @luacmartins, @mallenexpensify, @FitseTLT, @rayane-djouah eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
PR under review |
PR is merged |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.89-8 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-02-04. 🎊 For reference, here are some details about the assignees on this issue:
|
@rayane-djouah @mallenexpensify @rayane-djouah 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] |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test Proposal
Do we agree 👍 or 👎 |
📣 @rayane-d! 📣
|
Contributor: @FitseTLT paid $250 via Upwork Test case - https://github.com/Expensify/Expensify/issues/467599 Thx! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.72-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5309274
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
After deleting an expense, it should immediately disappear from the list without refreshing the page
Actual Result:
Expense from the list does not disappear after deletion
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6685819_1733443178341.ScreenRecording_12-06-2024_04-50-37_1.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mallenexpensifyThe text was updated successfully, but these errors were encountered: