-
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
[HOLD for payment 2023-07-26] [$1000] Chat - Inconsistent behavior on deleting message that have reply/thread #21103
Comments
Triggered auto assignment to @joekaufmanexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat - Inconsistent behavior on deleting message that have reply/thread What is the root cause of that problem?We are checking condition to show the App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 267 to 273 in e6c2704
In this case, after message is deleted, we deleted the reportAction by updating the optimisticData to this:
But in
What changes do you think we should make in order to solve the problem?We should also update the const optimisticReportActions = {
[reportActionID]: {
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
previousMessage: reportAction.message,
message: deletedMessage,
originalMessage: {
isDeletedParentAction: true,
html: '',
text: '',
},
errors: null,
},
}; What alternative solutions did you explore? (Optional)We can also use the message prop to identify if the message is deleted or not function isMessageDeleted(reportAction) {
return lodashGet(reportAction, ['message', 0, 'isDeletedParentAction'], false);
} |
i can reproduce this. I think this is related to the above issue. Sense checking next steps here. |
Still determining next steps |
Was advised on the other issue, that this one was out of scope there. Here is my reproduction of this bug. For expected behavior, once you delete a parent thread message. We should immediately change the comment actions menu to show only "reply in thread" and "mark Unread", which is what is shows once you leave the leave the chat and come back. 2023-06-20_16-43-23.mp4 |
Job added to Upwork: https://www.upwork.com/jobs/~019b1d6662d4b09fb2 |
Current assignee @joekaufmanexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh ( |
@fedirjh thoughts on the above proposal? |
@joekaufmanexpensify @aimane-chnaif @dhairyasenjaliya I think this is a regression from #20460 , Specifically this line App/src/libs/ReportActionsUtils.js Line 435 in f4ca4c8
We should use the App/src/libs/ReportActionsUtils.js Line 312 in 3531af2
Why ?When we delete a message the server response includes only the When we check if the message is deleted it will fail In the other hand the Solutionupdate function isMessageDeleted(reportAction) {
return lodashGet(reportAction, ['message', 0, 'isDeletedParentAction'], false);
} |
@fedirjh why do you think it's a regression? Did you test this issue before that PR and confirm it was working? And that was original logic. We just generalized that from download action to all actions. |
This case should have been handled in that PR. The PR introduced a new method and that method is causing this issue. From the context of that PR ,
hmm but we generalized the wrong code. |
There are 3 issues related to parent message deletion. As all of these have different root causes, it's fine these issues are handled separately. But I agree it would have been better if #20074 covered #21103 as well. |
My analysis is based on @joekaufmanexpensify's comment here #21103 (comment) which provide an updated expected result based on the merged PR. |
There's another dupe of this issue here: #21532 |
Yeah @techievivek and I chatted about this and are cool to treat this like a separate issue, rather than a regression. |
@MonilBhavsar @fedirjh #22956 is now ready for review! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.42-26 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 2023-07-26. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@fedirjh Could you please complete your portion of the BZ checklist so we can prep to issue payment here? |
BugZero Checklist:
|
BZ checklist is now complete, all set to issue payment. @hungvu193 was assigned on 2023-07-14, and the PR was merged on 2023-07-17. The 15th and 16th were weekend days, so the PR was merged in ~1 business day and qualifies for a bonus. So we need to make the following payments:
|
@hungvu193 $1,500 sent and contract ended! |
Thank you! 😄 |
@KALLL It looks like our automation incorrectly sent you two offers for this job in Upwork. I see the first automatically paid you $250 for the reporting bonus here on 2023-07-14. So I've gone ahead and closed out the second with no payment. Please let us know if you have any questions. Thanks! |
@KALLL you should have been sent an escrow refund request for $250 for the duplicate payment, since we ended the contract with no payment. Please confirm here once you've accepted it. Thanks! I also went ahead and ended the contract for which you received your $250 payment as well! |
@fedirjh could you please accept our offer here so we can pay you? Thanks! |
@joekaufmanexpensify Thank you. Accepted |
Great, thanks! @fedirjh $1,500 sent and contract ended! |
Upwork job closed. |
Bug is fixed, BZ checklist complete, and all payment issued. Closing as this is all set. Thanks everyone! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Note that: I am not saying the deleted message is reappearing but the label "[deleted message]" is appearing again after it is deleted
Expected Result:
When the [deleted message] is deleted it should permanently be not shown, or it always shouldn't allow the label [deleted message] to be deleted based on Expensify rule. At least, it should be consistent.
Actual Result:
Now, it is not consistent. When you delete the "[deleted message]" label in the conversation it will delete temporarily, then after you get in to the thread and get back to the conversation you will see it reappearing.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
**Version Number:**1.3.28-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
Screenshare.-.2023-06-13.11_18_59.AM.1.mp4
Recording.784.mp4
Expensify/Expensify Issue URL:
Issue reported by: @KALLL
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686645553886709
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: