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

Context menu not updating immediately after deleting an original thread comment #21632

Closed
1 of 6 tasks
kbecciv opened this issue Jun 26, 2023 · 9 comments
Closed
1 of 6 tasks
Assignees
Labels

Comments

@kbecciv
Copy link

kbecciv commented Jun 26, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Post a comment
  2. Hover over the comment and click on reply in thread
  3. Go back to the previous originating chat and delete the comment
  4. Hover over the [Deleted message] comment
  5. Reload the page and do step 4 again

Expected Result:

Context menu should update to show only Reply in thread and mark as unread options immediately

Actual Result:

Context menu doesn't update immediately unless user manually reloads the page or switches chat and comes back to the previous chat again.

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.30-5
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

2023-06-22.22.35.04.1.mp4
Recording.902.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687462733210969

View all open jobs on GitHub

@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 26, 2023

Proposal

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

Context menu not updating immediately after deleting an original thread comment

What is the root cause of that problem?

For the deleteComment optimisticReportActions we are updating the message field with isDeletedParentAction here.

const deletedMessage = [
{
type: 'COMMENT',
html: '',
text: '',
isEdited: true,
isDeletedParentAction: true,
},
];
const optimisticReportActions = {
[reportActionID]: {
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
previousMessage: reportAction.message,
message: deletedMessage,

But from this PR we are validating the field originalMessage.isDeletedParentAction which seems to be a issue here.

function isMessageDeleted(reportAction) {
return lodashGet(reportAction, 'originalMessage.isDeletedParentAction', false);
}

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

We should check the message[0].isDeletedParentAction which we are setting for the optimisticData.
return lodashGet(reportAction, 'message[0].isDeletedParentAction', false);

@hungvu193
Copy link
Contributor

hungvu193 commented Jun 27, 2023

Dupe of this one: #21103

@melvin-bot melvin-bot bot added the Overdue label Jun 28, 2023
@mallenexpensify mallenexpensify changed the title Context menu not updating immediately after deleting an original thread comment [HOLD #21103] Context menu not updating immediately after deleting an original thread comment Jun 30, 2023
@mallenexpensify mallenexpensify added Weekly KSv2 and removed Daily KSv2 Overdue Bug Something is broken. Auto assigns a BugZero manager. labels Jun 30, 2023
@mallenexpensify
Copy link
Contributor

This issue was reported 6/22 at noon
image

Other is from 6/13, so putting this on hold, pending that.

Thanks @hungvu193 for linking the other issue

@melvin-bot melvin-bot bot added the Overdue label Jul 10, 2023
@mallenexpensify
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label Jul 11, 2023
@melvin-bot melvin-bot bot added the Overdue label Jul 20, 2023
@mallenexpensify mallenexpensify changed the title [HOLD #21103] Context menu not updating immediately after deleting an original thread comment Context menu not updating immediately after deleting an original thread comment Jul 26, 2023
@mallenexpensify
Copy link
Contributor

Off hold, the PR for the below hit production.

I'm unable to reproduce, I don't get a [Deleted Message] comment after deleting.
@Nathan-Mulugeta, can you try to reproduce? and post a vid if you're able to? Thx

image

@melvin-bot melvin-bot bot removed the Overdue label Jul 26, 2023
@Nathan-Mulugeta
Copy link

Yes @mallenexpensify, it has been fixed by this PR. I also can't reproduce this issue anymore. I have a question though, since the PR that fixed this issue was created and merged last week which was after this issue's creation, does that make me eligible for the reporting bonus?

@mallenexpensify
Copy link
Contributor

@Nathan-Mulugeta , unfortunately not because the other bug report came first and someone was compensated for that.
image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants