Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.53k stars 2.88k forks source link

[$250] LHN - Expense preview and GBR still displayed in LHN after deleting expense in search #49297

Closed IuliiaHerets closed 3 weeks ago

IuliiaHerets commented 1 month ago

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: 9.0.35-4 Reproducible in staging?: Y Reproducible in production?: Y Issue reported by: Applause Internal Team

Action Performed:

  1. Open the staging.new.expensify.com website.
  2. Open the FAB.
  3. Tap on "Submit Expense"
  4. Tap on "Manual"
  5. Complete the expense amount.
  6. Tap on "Next"
  7. Select a workspace to submit the expense to.
  8. Add a merchant to the expense.
  9. Tap on "Submit"
  10. Once redirected to workspace chat. tap on the arrown on the top left corner.
  11. Verify the chat preview displays the expense information and a green dot.
  12. Tap on the search section on the bottom of the screen.
  13. Select the just created expense.
  14. Tap on "1 selected" on the top of the screen.
  15. Tap on "Delete"
  16. Return to LHN.
  17. Verify if the expense details and the green dot, disappeared from the workspace chat preview.

Expected Result:

Once the expense is deleted on the search section, the expense details and the green dot, should disappear from the workspace chat preview in LHN.

Actual Result:

After the user deletes the just created expense on the search section, the workspace chat preview on LHN still displays the expense details and the Green Dot.

Workaround:

Unknown

Platforms:

Screenshots/Videos

Bug6605687_1726505284432!LHN_Delete

https://github.com/user-attachments/assets/bfa03d25-294e-4ff0-ae2d-37ae045e1d6a

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021836835077314050335
  • Upwork Job ID: 1836835077314050335
  • Last Price Increase: 2024-09-26
Issue OwnerCurrent Issue Owner: @luacmartins
melvin-bot[bot] commented 1 month ago

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

IuliiaHerets commented 1 month ago

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

IuliiaHerets commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

zanyrenney commented 1 month ago

search related bug.

JKobrynski commented 1 month ago

Hi, I'm Julian from Callstack - expert agency - and I would like to work on this issue.

rojiphil commented 1 month ago

Tagging @luacmartins since this is a search related bug. A Callstack member would like to work on this issue as mentioned here. Can we assign and take this further?

luacmartins commented 1 month ago

I think we can take proposals for this one.

zanyrenney commented 1 month ago

Just an FYI I'll be OOO until Tuesday 1st, please reapply the bug label if this needs urgent action in my absence. Otherwise I will get to it when I return. Thanks!

JKobrynski commented 1 month ago

This actually happens on all platforms, the only difference is that on the bigger screens (web and desktop) it quickly changes as the reports list is rendered in LHN, but for a brief moment you can see it's still there.

iOS

https://github.com/user-attachments/assets/db21f8ec-656b-4140-8081-d2de2e91f778

Web

https://github.com/user-attachments/assets/7fcbc2ac-d78f-4d5d-b259-16f30053e293

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

@rojiphil, @zanyrenney Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

rojiphil commented 1 month ago

@luacmartins I could also reproduce this issue on small screen platforms. And on digging a little deeper, the root cause is that the report's lastMessageText is not updated in Onyx to reflect the deletion of the money request via DeleteMoneyRequestOnSearch API request. That is why it is not updated in LHN.

This could have been resolved if the BE response included the updated lastMessageText in report. So, I am wondering if this can be considered a BE issue. What do you think?

melvin-bot[bot] commented 1 month ago

@rojiphil @zanyrenney 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!

JKobrynski commented 1 month ago

The reason why the Green Dot Indicator is shown, is the ReportUtils.requiresAttentionFromCurrentUser() that returns true in <OptionRowLHN />. It returns true because of the hasOutstandingChildTask field on the report that is not updated after the request is deleted from the search tab.

Do you think this could also be fixed on the backend?

rojiphil commented 1 month ago

Do you think this could also be fixed on the backend?

@JKobrynski I think so if the response from BE includes the updated report as well. This will ensure that there is no discrepancy between FE and BE report and the FE UI will display correctly. Do you think this will fix the issue?

JKobrynski commented 1 month ago

As far as I'm aware that should fix it.

luacmartins commented 1 month ago

And on digging a little deeper, the root cause is that the report's lastMessageText is not updated in Onyx to reflect the deletion of the money request via DeleteMoneyRequestOnSearch API request.

Interesting. The DeleteMoneyRequestOnSearch command calls the DeleteMoneyRequest command under the hood, so I'd expect the API response in both cases to be the same. Is that not the case?

rojiphil commented 1 month ago

Interesting. The DeleteMoneyRequestOnSearch command calls the DeleteMoneyRequest command under the hood, so I'd expect the API response in both cases to be the same. Is that not the case?

@luacmartins That does not seem to be the case. The screenshots for the responses of both these API requests are as shown below:

Screenshot 2024-10-01 at 8 48 36 PM

Screenshot 2024-10-01 at 8 55 50 PM

luacmartins commented 1 month ago

Ok, I started working on a PR to make those updates the same.

melvin-bot[bot] commented 1 month ago

@rojiphil, @luacmartins, @zanyrenney Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] commented 1 month ago

@rojiphil, @luacmartins, @zanyrenney Eep! 4 days overdue now. Issues have feelings too...

luacmartins commented 4 weeks ago

PRs still in draft. I'll get back to them tomorrow.

luacmartins commented 3 weeks ago

PR in review

luacmartins commented 3 weeks ago

Closing since the PR was deployed. Please reopen if you can still reproduce the issue.