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 2023-09-20] [$1000] Web - Close message error button can be clicked but nothing happens #23066

Closed
1 of 6 tasks
kbecciv opened this issue Jul 18, 2023 · 61 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jul 18, 2023

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:

  1. Create a workspace
  2. Go announce room
  3. Chat any message
  4. Delete above workspace
  5. Hover on above message in the announce room
  6. Click reply in thread
  7. Hover on message in thread, click delete icon, Observe that an error message appears
  8. Click the close button at the error message

Expected Result:

After click close the error message disappear

Actual Result:

After click close the error message not disappear

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.41-2
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

Screen.Recording.2023-07-16.at.18.10.09.mov
Recording.3701.mp4

Expensify/Expensify Issue URL:
Issue reported by: @namhihi237
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689506265018749

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015d5aa7db1e165a4f
  • Upwork Job ID: 1683597910586687488
  • Last Price Increase: 2023-08-28
  • Automatic offers:
    • abdulrahuman5196 | Reviewer | 26488191
    • namhihi237 | Contributor | 26488192
    • namhihi237 | Reporter | 26488195
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 18, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 18, 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

@kbecciv
Copy link
Author

kbecciv commented Jul 18, 2023

Proposal

by @namhihi237

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

After clicking close the error message disappears

What is the root cause of that problem?

Khi click the close button to it will call the function clearReportActionErrors at here
This is function clearReportActionErrors We have a reportID params to remove error.
But in case we delete or edit the parent message of the thread, the value passed here is not the reportID of the parent message. That's why when I click it, nothing happens.

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

We can update onClose here like this, to get correct reportID

onClose = {
    () => {
        if (ReportUtils.isThreadParent(props.action)) {
            const childReport = ReportUtils.getReport(props.action.childReportID);
            ReportActions.clearReportActionErrors(childReport.parentReportID, props.action)
            return;
        }
        ReportActions.clearReportActionErrors(props.report.reportID, props.action)
    }

What alternative solutions did you explore? (Optional)

We can hide the delete and edit button for a parent when a message on the thread if room was archived

@samh-nl
Copy link
Contributor

samh-nl commented Jul 18, 2023

Proposal

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

After clicking the close button the message does not disappear.

What is the root cause of that problem?

The buttons available in MiniReportActionContextMenu as well as the context menu depend on whether the report is archived. This is handled correctly when in the top-level workspace/report, but not when in a thread due to the report changing, this leads to these side effects:

  • The delete button remaining available
  • Edits remain possible
  • Users are being able to post new messages or start new subthreads.

ReportUtils.isArchivedRoom(props.report),

<MiniReportActionContextMenu
reportID={props.report.reportID}
reportAction={props.action}
isArchivedRoom={ReportUtils.isArchivedRoom(props.report)}
displayAsGroup={props.displayAsGroup}
isVisible={hovered && !props.draftMessage && !hasErrors}
draftMessage={props.draftMessage}
isChronosReport={ReportUtils.chatIncludesChronos(props.report)}
/>

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

When a workspace is archived, this should encompass everything within it. I.e., all threads within that workspace should also become archived.
Based on report.parentReportID, we can recursively check to see whether it's part of an archive, and if so, treat it the same.

What alternative solutions did you explore? (Optional)

N/A

@HLEDYA
Copy link
Contributor

HLEDYA commented Jul 18, 2023

Proposal

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

For archived rooms, comments can be replied in a new thread and when the new thread is opened comment cannot be deleted or closed.

What is the root cause of that problem?

The root cause of the problem is showing not applicable menu context icons when the room is archived.

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

I suppose, only copy context menu action can be shown for the archived rooms. In order to that ContextMenuAction list can be updated accordingly.

shouldShow: (type, reportAction) => type === CONTEXT_MENU_TYPES.REPORT_ACTION && _.has(reportAction, 'message') && !ReportActionUtils.isMessageDeleted(reportAction),

The line above can be changed as the following:

        shouldShow: (type, reportAction, isArchivedRoom) =>
            type === CONTEXT_MENU_TYPES.REPORT_ACTION && _.has(reportAction, 'message') && !ReportActionUtils.isMessageDeleted(reportAction) && !isArchivedRoom,

Related changes can be seen here

Result is (when hovered over the comment):

Screenshot 2023-07-18 at 16 36 53

What alternative solutions did you explore? (Optional)

ContextMenuAction can be hidden totally when the room is archived. But keeping at least copy action seems more reasonable.

@melvin-bot melvin-bot bot added the Overdue label Jul 20, 2023
@alexpensify
Copy link
Contributor

I need an extra day to continue testing this one.

@melvin-bot melvin-bot bot removed the Overdue label Jul 20, 2023
@alexpensify
Copy link
Contributor

I ran out of time yesterday, I'll review soon.

@melvin-bot melvin-bot bot added the Overdue label Jul 24, 2023
@alexpensify alexpensify added the External Added to denote the issue can be worked on by a contributor label Jul 24, 2023
@melvin-bot melvin-bot bot changed the title Web - Close message error button can be clicked but nothing happens [$1000] Web - Close message error button can be clicked but nothing happens Jul 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

Current assignee @alexpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@alexpensify
Copy link
Contributor

At this point, I don't think it's a dupe which I originally thought last week. I've assigned the external. @abdulrahuman5196 when you get a chance, can you please review the proposals? Thank you!

@melvin-bot melvin-bot bot removed the Overdue label Jul 24, 2023
@alexpensify
Copy link
Contributor

@abdulrahuman5196 - checking in to see if you were able to review the proposals. Thanks!

@alexpensify
Copy link
Contributor

No update yet

@melvin-bot melvin-bot bot added the Overdue label Jul 31, 2023
@abdulrahuman5196
Copy link
Contributor

Reviewing today

@melvin-bot melvin-bot bot removed the Overdue label Jul 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

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

@abdulrahuman5196
Copy link
Contributor

@alexpensify I don't get any errors. The message is succeeding. Is this fixed?

Screenshot 2023-08-01 at 4 38 42 PM

And curious question. Should we even allow to send message on a thread from a archived chat?

@namhihi237
Copy link
Contributor

@abdulrahuman5196 , Still get an error. Do you remove the parent message?

Screen.Recording.2023-08-01.at.18.28.26.mov

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

📣 @namhihi237 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@namhihi237
Copy link
Contributor

Thanks, I will raise PR asap. @mountiny I see the offer for reporter 50$. Since this was created before I think it should be $250. Can we update at payment time?

@mountiny
Copy link
Contributor

mountiny commented Sep 4, 2023

@namhihi237 yes just remind yourself once payment will be done

@namhihi237 namhihi237 mentioned this issue Sep 4, 2023
59 tasks
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @namhihi237 got assigned: 2023-09-04 11:55:37 Z
  • when the PR got merged: 2023-09-12 02:28:18 UTC
  • days elapsed: 5

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 13, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - Close message error button can be clicked but nothing happens [HOLD for payment 2023-09-20] [$1000] Web - Close message error button can be clicked but nothing happens Sep 13, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.68-17 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-09-20. 🎊

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.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

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:

  • [@abdulrahuman5196] The PR that introduced the bug has been identified. Link to the PR:
  • [@abdulrahuman5196] 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:
  • [@abdulrahuman5196] A discussion in #expensify-bugs 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:
  • [@abdulrahuman5196] Determine if we should create a regression test for this bug.
  • [@abdulrahuman5196] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@alexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 19, 2023
@alexpensify
Copy link
Contributor

The payment date is set for tomorrow. @abdulrahuman5196 can you please complete the checklist? Thanks!

@alexpensify
Copy link
Contributor

alexpensify commented Sep 19, 2023

Here is the payment summary:

Upwork Job: https://www.upwork.com/jobs/~015d5aa7db1e165a4f

*If applicable, the bonuses will be applied on the final payment

Extra Notes regarding payment: No urgency bonus here but it was completed in time for no deductions either. I'll complete the process tomorrow.

@alexpensify
Copy link
Contributor

Alright everyone has been paid in Upwork. @namhihi237 I added a bonus to cover the missing amount for the reporter payment.

@abdulrahuman5196 - please complete the checklist so we can close this GH. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Sep 25, 2023
@alexpensify
Copy link
Contributor

@abdulrahuman5196 bumping this GH, please complete the checklist. Thanks!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 25, 2023
@abdulrahuman5196
Copy link
Contributor

The PR that introduced the bug has been identified. Link to the PR:
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:
A discussion in #expensify-bugs 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:

Not a regression.

Determine if we should create a regression test for this bug.
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

No. Minor case, which is hard to reproduce in UI.

@melvin-bot melvin-bot bot removed the Overdue label Sep 27, 2023
@abdulrahuman5196
Copy link
Contributor

@alexpensify Sorry for the delay. Added the checklist.

@alexpensify
Copy link
Contributor

Thank you! Closing for now.

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. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants