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 2024-12-19] [$250] Web - Chat - Temporary thread message disappearance when deleting a thread message #52146

Closed
8 tasks
lanitochka17 opened this issue Nov 6, 2024 · 40 comments
Assignees
Labels
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 Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Nov 6, 2024

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.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?

  • 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
Bug6645785_1729876009195.23139.mp4

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-27
  • Automatic offers:
    • mkzie2 | Contributor | 105206412
Issue OwnerCurrent Issue Owner: @JmillsExpensify
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 6, 2024
Copy link

melvin-bot bot commented Nov 6, 2024

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
Copy link
Contributor

mkzie2 commented Nov 7, 2024

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 #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]:

const isDeletedParentAction = ReportActionsUtils.isThreadParentMessage(reportAction, reportID);

if ((!isOffline && isThreadParentMessage && isPendingDelete) || fragment?.isDeletedParentAction) {
return <RenderHTML html={`<comment>${translate('parentReportAction.deletedMessage')}</comment>`} />;
}

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

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.

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

melvin-bot bot commented Nov 12, 2024

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

@JmillsExpensify
Copy link

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

@melvin-bot melvin-bot bot removed the Overdue label Nov 13, 2024
@JmillsExpensify JmillsExpensify added External Added to denote the issue can be worked on by a contributor Overdue labels Nov 13, 2024
@melvin-bot melvin-bot bot changed the title Web - Chat - Temporary thread message disappearance when deleting a thread message [$250] Web - Chat - Temporary thread message disappearance when deleting a thread message Nov 13, 2024
Copy link

melvin-bot bot commented Nov 13, 2024

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

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

melvin-bot bot commented Nov 13, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Nov 13, 2024
@thesahindia
Copy link
Member

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 ^

Copy link

melvin-bot bot commented Nov 18, 2024

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

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

melvin-bot bot commented Nov 20, 2024

@JmillsExpensify @thesahindia 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!

Copy link

melvin-bot bot commented Nov 20, 2024

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

Copy link

melvin-bot bot commented Nov 20, 2024

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

Copy link

melvin-bot bot commented Nov 22, 2024

@JmillsExpensify, @thesahindia 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@thesahindia
Copy link
Member

thesahindia commented Nov 22, 2024

@mkzie2, the PR has been merged.

@melvin-bot melvin-bot bot removed the Overdue label Nov 22, 2024
Copy link

melvin-bot bot commented Nov 26, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Nov 26, 2024
@mkzie2
Copy link
Contributor

mkzie2 commented Nov 26, 2024

Edited by proposal-police: This proposal was edited at 2024-11-26 10:45:35 UTC.

Updated 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 #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 >> isThreadParentMessage is false because it compares the reportID with childReportID >> shouldHideOnDelete is true causing the message to be hidden for a while...:

shouldHideOnDelete={!ReportActionsUtils.isThreadParentMessage(action, reportID)}

... until pendingAction is cleared by the BE:

const hideChildren = shouldHideOnDelete && !isOffline && pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && !hasErrors;

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

Thanks to #51721, we don't rely on reportID to check for isThreadParentMessage which is no longer correct. Instead, we use isThreadReportParentAction which is based on whether the action is rendered by ReportActionItemParentAction.

So we need to update:

shouldHideOnDelete={!isThreadReportParentAction}

@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Dec 12, 2024
@melvin-bot melvin-bot bot changed the title [$250] Web - Chat - Temporary thread message disappearance when deleting a thread message [HOLD for payment 2024-12-19] [$250] Web - Chat - Temporary thread message disappearance when deleting a thread message Dec 12, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

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

Copy link

melvin-bot bot commented Dec 12, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.74-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 2024-12-19. 🎊

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

Copy link

melvin-bot bot commented Dec 12, 2024

@thesahindia @JmillsExpensify @thesahindia 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]

@garrettmknight garrettmknight moved this from Bugs and Follow Up Issues to Hold for Payment in [#whatsnext] #expense Dec 17, 2024
@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Dec 18, 2024
@JmillsExpensify
Copy link

Payment summary:

@melvin-bot melvin-bot bot removed the Overdue label Dec 20, 2024
@JmillsExpensify
Copy link

Contributor has been paid out.

@melvin-bot melvin-bot bot added the Overdue label Dec 23, 2024
Copy link

melvin-bot bot commented Dec 24, 2024

@JmillsExpensify, @marcochavezf, @thesahindia, @mkzie2 Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Dec 26, 2024

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

Copy link

melvin-bot bot commented Dec 30, 2024

@JmillsExpensify, @marcochavezf, @thesahindia, @mkzie2 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

Copy link

melvin-bot bot commented Jan 1, 2025

@JmillsExpensify, @marcochavezf, @thesahindia, @mkzie2 10 days overdue. Is anyone even seeing these? Hello?

Copy link

melvin-bot bot commented Jan 3, 2025

@JmillsExpensify, @marcochavezf, @thesahindia, @mkzie2 12 days overdue now... This issue's end is nigh!

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jan 6, 2025
Copy link

melvin-bot bot commented Jan 6, 2025

This issue has not been updated in over 14 days. @JmillsExpensify, @marcochavezf, @thesahindia, @mkzie2 eroding to Weekly issue.

@melvin-bot melvin-bot bot removed the Overdue label Jan 6, 2025
@thesahindia
Copy link
Member

thesahindia commented Jan 9, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment: Reinstate fix get all ancestors in a thread #43518 (comment)

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion: N/A

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal Template
  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Test:

  1. Open any report
  2. Send a message
  3. Reply in thread
  4. Click on parent report action and delete the message
  5. Verify that the report action doesn't disappear
  6. Verify you see [Deleted message]

Do we agree 👍 or 👎

@thesahindia
Copy link
Member

@JmillsExpensify, could you please add the payment summary?

@JmillsExpensify
Copy link

Are you referring to this one?

@JmillsExpensify
Copy link

Closing this out though now that the BZ summary is complete.

@github-project-automation github-project-automation bot moved this from Hold for Payment to Done in [#whatsnext] #expense Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests

5 participants