-
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
[$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 |
Current assignee @luacmartins is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
I agree. Thanks for the detailed summary! |
📣 @rayane-djouah 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @FitseTLT 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@luacmartins @mallenexpensify @FitseTLT @rayane-djouah 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! |
Ok, I have PRs to update the responses from When deleting the last transaction on a report (no snapshot key is sent, since live updates should automatically update the snapshot) When deleting a single transaction on a report with multiple expenses (snapshot key is returned to update isOneTransactionReport, etc) @rayane-djouah @FitseTLT Does that update look correct to you? |
@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 👍 |
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: @rayane-djouahThe text was updated successfully, but these errors were encountered: