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.56k stars 2.9k forks source link

[$250] Web - Chat - Temporary thread message disappearance when deleting a thread message #52146

Open lanitochka17 opened 1 week ago

lanitochka17 commented 1 week 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.58-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Open a chat
  3. Send a message in the chat
  4. Click on "Reply in thread" to create a thread message
  5. Delete the threaded message

Expected Result:

A thread message should remain visible and not disappear after deleting it

Actual Result:

When the user deletes a thread message, it disappears for a short while and then reappears

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/3c526c02-1b86-4831-8557-40220d894b0d

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021856693071374545175
  • Upwork Job ID: 1856693071374545175
  • Last Price Increase: 2024-11-13
Issue OwnerCurrent Issue Owner: @thesahindia
melvin-bot[bot] commented 1 week ago

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.

mkzie2 commented 1 week ago

Proposal

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

When the user deletes a thread message, it disappears for a short while and then reappears

What is the root cause of that problem?

This arises from https://github.com/Expensify/App/pull/43518, the reportID now contains the reportID of the report where the action belongs to (the ancestor tree is lifted 1 level above).

So when we delete the comment, reportID does not point to the current thread report >> isDeletedParentAction is false because it compares the reportID with childReportID >> Comment is hidden instead of [Deleted message]:

https://github.com/Expensify/App/blob/77b483c50f3669540fa37b530afd87ba709baf3a/src/libs/actions/Report.ts#L1433

https://github.com/Expensify/App/blob/e05545549299f2f0ce6117cbfb62b97fbf15d39a/src/pages/home/report/ReportActionItemFragment.tsx#L108-L110

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

Let's hold this for https://github.com/Expensify/App/pull/51721 where they introduced isThreadFirstChat prop. This will help determining isDeletedParentAction based on whether it is rendered by ReportActionItemParentAction instead of relying on reportID.

melvin-bot[bot] commented 5 days ago

@JmillsExpensify Huh... This is 4 days overdue. Who can take care of this?

JmillsExpensify commented 4 days ago

Low priority but we have two proposals outstanding, so I'm going to open this up to the community.

melvin-bot[bot] commented 4 days ago

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

melvin-bot[bot] commented 4 days ago

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

thesahindia commented 3 days ago

Let's hold this for #51721 where they introduced isThreadFirstChat prop. This will help determining isDeletedParentAction based on whether it is rendered by ReportActionItemParentAction instead of relying on reportID.

Waiting on ^