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

[C+ Checklist Needs Completion] [$1000] Delete option is shown for threaded chat but not parent in deleted workspace #23604

Closed
1 of 6 tasks
kavimuru opened this issue Jul 26, 2023 · 50 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Jul 26, 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. Go to announce room
  2. Send a message
  3. Delete the workspace
  4. Notice that the delete option doesn't show when hovering over the message
  5. Click on reply in thread of the message
  6. Hover over the thread first chat

Expected Result:

App should removed the red dot from LHN as soon as we dismiss the error

Actual Result:

App does not dismiss red dot from LHN when we delete message in archived room from reply in thread and dismiss the triggered error

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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

red.dot.in.LHN.is.not.dismissed.from.archived.room.mp4
Recording.1341.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690268782561039

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d9f5ac42d3564a9d
  • Upwork Job ID: 1684533698073559040
  • Last Price Increase: 2023-08-03
  • Automatic offers:
    • s77rt | Contributor | 26038579
    • dhanashree-sawant | Reporter | 26038580
    • dukenv0307 | Contributor | 26142842
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 26, 2023
@dukenv0307
Copy link
Contributor

dukenv0307 commented Jul 26, 2023

Proposal

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

Red dot from LHN is not removed when we dismiss error in archived workspace room

What is the root cause of that problem?

When the error appears, reportActions is changed but we don't subscribe it in OptionRowLHNData to re-render OptionRowLHN. That is the reason LHN doesn't update when the error appears.

}, [fullReport, personalDetails, preferredLocale, policy]);

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

We should subscribe reportActions in OptionRowLHNData and add it as dependence here to re-render OptionRowLHN if the error appears

}, [fullReport, personalDetails, preferredLocale, policy]);

OPTION:
We should hide replyInThread option if the room is archived by add the check !isArchivedRoom here

shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) =>
type === CONTEXT_MENU_TYPES.REPORT_ACTION && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID),

What alternative solutions did you explore? (Optional)

We can hide the delete option if the message is the thread's first chat and the parent report is archived

shouldShow: (type, reportAction, isArchivedRoom, betas, menuTarget, isChronosReport, reportID) =>
// Until deleting parent threads is supported in FE, we will prevent the user from deleting a thread parent
type === CONTEXT_MENU_TYPES.REPORT_ACTION &&
ReportUtils.canDeleteReportAction(reportAction, reportID) &&

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

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

@melvin-bot
Copy link

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

@greg-schroeder
Copy link
Contributor

Reviewing

@greg-schroeder greg-schroeder added the External Added to denote the issue can be worked on by a contributor label Jul 27, 2023
@melvin-bot melvin-bot bot changed the title Red dot from LHN is not removed when we dismiss error in archived workspace room [$1000] Red dot from LHN is not removed when we dismiss error in archived workspace room Jul 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

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

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

melvin-bot bot commented Jul 27, 2023

Current assignee @greg-schroeder is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

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

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

@0xmiroslav mind taking a look at @dukenv0307's proposal here? #23604 (comment)

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

LM0305 commented Jul 31, 2023

Proposal

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

In archived workspace room, error indicator(red dot) from LHN is not removed when we dismiss error

What is the root cause of that problem?

The Report screen page doesn't re-render when close report action alert description. this is the reason that doesn't update LHN.

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

Need to add re-render action script in ReportActions.js

function clearReportActionErrors(reportID, reportAction) {
if (reportAction.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD) {
// Delete the optimistic action
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {
[reportAction.reportActionID]: null,
});
// If there's a linked transaction, delete that too
const linkedTransactionID = ReportActionUtils.getLinkedTransactionID(reportID, reportAction.reportActionID);
if (linkedTransactionID) {
Onyx.set(`${ONYXKEYS.COLLECTION.TRANSACTION}${linkedTransactionID}`, null);
}
return;
}
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {
[reportAction.reportActionID]: {
errors: null,
},
});

Add this code in the last line

Report.openReport(reportID);

What alternative solutions did you explore? (Optional)

Result

20230731-082255.mov

@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

📣 @LM0305! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@LM0305
Copy link

LM0305 commented Jul 31, 2023

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~018ef9deb21c95d972

@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

⚠️ Invalid email. Please make sure to create an Expensify account with this email first here.

@LM0305
Copy link

LM0305 commented Jul 31, 2023

Contributor details
Your Expensify account email:[email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~018ef9deb21c95d972

@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@luckyman0305
Copy link
Contributor

@LM0305's proposal looks good

@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

📣 @StanislavLavrenchuk1! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@luckyman0305
Copy link
Contributor

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~011bbf31f557541361

@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@greg-schroeder
Copy link
Contributor

Just waiting on proposal review from @0xmiroslav :)

@melvin-bot
Copy link

melvin-bot bot commented Aug 3, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Aug 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 10, 2023

Triggered auto assignment to @srikarparsi, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@s77rt
Copy link
Contributor

s77rt commented Aug 10, 2023

@LM0305 Thanks for the proposal. Your RCA makes sense but opening the report every time we clear the errors seems an overkill and a workaround.

@s77rt
Copy link
Contributor

s77rt commented Aug 10, 2023

@dukenv0307 The whole error shouldn't be there. The delete, edit and flag options should not be displayed because they are not displayed in the parent. Your alternative solution seems the best to do here.

@melvin-bot melvin-bot bot added the Overdue label Aug 14, 2023
@greg-schroeder
Copy link
Contributor

Hey @srikarparsi! can you confirm #23604 (comment) is g2g? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Aug 14, 2023
@srikarparsi
Copy link
Contributor

Hey! Sorry for the delayed response, was OOO friday and monday. I'm also not able to reproduce the posted issue on dev. @dukenv0307, do you think you could write down reproducible test steps for the new issue you're describing? I also think we should create a new issue for this since it doesn't seem related to the first issue posted.

@dukenv0307
Copy link
Contributor

dukenv0307 commented Aug 15, 2023

@greg-schroeder @srikarparsi

Do you think we should create new issue or update the title and test step in this issue?.

The bug: Delete option still show in the thread's first chat
Step:

  1. Go to announce room
  2. Send a message
  3. Delete the workspace
  4. Notice that the delete option doesn't show when hovering over the message
  5. Click on reply in thread of the message
  6. Hover over the thread first chat

Actual: The delete option show in thread first chat bu doesn't show in parent action

Expected: The context menu of thread first chat and parent action should be the same

@srikarparsi
Copy link
Contributor

Cool, thanks! Yup, I'll just update the title and test steps. The proposal to hide delete, edit and flag to match the parent also makes sense.

@srikarparsi srikarparsi changed the title [$1000] Red dot from LHN is not removed when we dismiss error in archived workspace room [$1000] Delete option is shown for threaded chat but not parent in deleted workspace Aug 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 15, 2023

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

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 16, 2023
@dukenv0307
Copy link
Contributor

@s77rt The PR is ready to review.

@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 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 @dukenv0307 got assigned: 2023-08-15 23:22:10 Z
  • when the PR got merged: 2023-08-21 15:53:23 UTC
  • days elapsed: 3

On to the next one 🚀

@dukenv0307
Copy link
Contributor

@greg-schroeder The PR is deployed to production but the title doesn't update.

@greg-schroeder
Copy link
Contributor

I'm not sure what's up with the automation... maybe it's delayed for some reason? the date would be 9/4 if it doesn't work

@dukenv0307
Copy link
Contributor

@greg-schroeder This has been in production for 7 days Is this ready for payout now?

@greg-schroeder
Copy link
Contributor

@dukenv0307 payout date would have been 9/4 but that was a holiday. So it's today! I'll take care of it

@greg-schroeder greg-schroeder changed the title [$1000] Delete option is shown for threaded chat but not parent in deleted workspace [HOLD for payment 2023-09-05] [$1000] Delete option is shown for threaded chat but not parent in deleted workspace Sep 5, 2023
@greg-schroeder
Copy link
Contributor

Issue Participants:

Issue reported by: @dhanashree-sawant
Contributor: @dukenv0307
C+: @s77rt

Was this issue merged in time to be eligible for the speed bonus? ✅
Were their any regressions? ❌

Payment summary:

Reporter: $250
Contributor: $1,500
C+: $1,500

@greg-schroeder greg-schroeder changed the title [HOLD for payment 2023-09-05] [$1000] Delete option is shown for threaded chat but not parent in deleted workspace [C+ Checklist Needs Completion] [$1000] Delete option is shown for threaded chat but not parent in deleted workspace Sep 6, 2023
@greg-schroeder
Copy link
Contributor

@s77rt The automation didn't work on this issue but can you please complete the checklist so we can close this out?

@s77rt
Copy link
Contributor

s77rt commented Sep 6, 2023

  • The PR that introduced the bug has been identified: This existed since the implementation of threads. This is basically a missing feature - context menu didn't support threads well.
  • The offending PR has been commented on: n/a
  • A discussion in #expensify-bugs has been started: Not needed. This is more like a feature request
  • Determine if we should create a regression test for this bug: No

@s77rt
Copy link
Contributor

s77rt commented Sep 6, 2023

@greg-schroeder Completed ^

@greg-schroeder
Copy link
Contributor

Thanks @s77rt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants