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

[$250] LHN - "Removed 0 user" displayed on #Admins preview when room member leaves room. #53702

Open
5 of 8 tasks
vincdargento opened this issue Dec 6, 2024 · 37 comments
Open
5 of 8 tasks
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

@vincdargento
Copy link

vincdargento commented Dec 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.72-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

Precondition: User B has to be an off-workspace member of the room.

  1. Create a workspace
  2. Create a workspace room (e.g #social)
  3. Invite someone to the room that is not a member of the workspace
  4. Log-in as the invited room member account
  5. Leave the workspace room
  6. Switch back to the inviter account
  7. Observe the LHN preview of the #social room reads: "left the chat"
  8. Observe the LHN preview of the #admins room reads: "left #social"
  9. Click into the #admins room
  10. Observe the LHN preview of the #admins room changes to "Removed 0 user"

Expected Result:

The #admins room LHN preview should continue to display the "left #%roomName" system message.

Actual Result:

The #admins room LHN preview changes to "Removed 0 user".

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021865059389537171212
  • Upwork Job ID: 1865059389537171212
  • Last Price Increase: 2024-12-13
  • Automatic offers:
    • FitseTLT | Contributor | 105371123
Issue OwnerCurrent Issue Owner: @eVoloshchak
@vincdargento vincdargento added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 6, 2024
Copy link

melvin-bot bot commented Dec 6, 2024

Triggered auto assignment to @trjExpensify (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.

@trjExpensify
Copy link
Contributor

Hm, I don't see anything at all:

image

@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 6, 2024

Me too

@trjExpensify
Copy link
Contributor

Ah, invite an off-workspace member perhaps?

@trjExpensify
Copy link
Contributor

Yep, got it.

image image

@trjExpensify
Copy link
Contributor

Updated the steps in the OP to hopefully make it clearer.

@trjExpensify trjExpensify moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 6, 2024
@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Dec 6, 2024
@melvin-bot melvin-bot bot changed the title LHN - "Removed 0 user" displayed on #Admins preview when room member leaves room. [$250] LHN - "Removed 0 user" displayed on #Admins preview when room member leaves room. Dec 6, 2024
Copy link

melvin-bot bot commented Dec 6, 2024

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

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

melvin-bot bot commented Dec 6, 2024

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

@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 6, 2024

Edited by proposal-police: This proposal was edited at 2024-12-06 16:03:54 UTC.

Proposal

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

LHN - "Removed 0 user" displayed on #Admins preview when room member leaves room.

What is the root cause of that problem?

We are not handling CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.LEAVE_ROOM separately

} else if (ReportActionsUtils.isTaskAction(lastAction)) {

so it is falling back to the lastMessageText here
} else if (lastAction?.actionName !== CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && lastActorDisplayName && lastMessageTextFromReport) {
result.alternateText = ReportUtils.formatReportLastMessageText(Parser.htmlToText(`${lastActorDisplayName}: ${lastMessageText}`));

which is 'remved 0 user'

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

We can add

else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.LEAVE_ROOM) {
            const actionMessage = ReportActionsUtils.getReportActionMessageText(lastAction);
            result.alternateText = actionMessage ? `${lastActorDisplayName}: ${actionMessage}` : '';

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

we can create a test for getOptionData by passing the correct params, like a report whose last action is CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.LEAVE_ROOM type and assert that the alternateText is returned same as the action message of that report action 👍

What alternative solutions did you explore? (Optional)

may be it might be correct to remove the colon here so that it will say user left #room or even leave out lastActorDisplayName 👍

@nkdengineer
Copy link
Contributor

Proposal

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

The #admins room LHN preview changes to "Removed 0 user".

What is the root cause of that problem?

We don't have any special cases to handle CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.LEAVE_ROOM action. Then it's displayed lastMessageText by default

And it's wrong because OpenReport API is returning the wrong lastMessageText

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

  1. We need to fix from the backend side to return the correct lastMessageText.

And it's wrong because OpenReport API is returning the wrong lastMessageText

  1. If we want to handle translation in the same way we do for CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.LEAVE_POLICY action. We can add a new case for this action in SidebarUtils, getReportName function, ReportActionItem, ContextMenuActions to handle translation for all places.

} else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.LEAVE_POLICY) {

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

What alternative solutions did you explore? (Optional)

NA

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

Copy link

melvin-bot bot commented Dec 10, 2024

@eVoloshchak, @trjExpensify 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 Dec 10, 2024
@trjExpensify
Copy link
Contributor

@eVoloshchak what do you think of the proposal? Thanks!

Copy link

melvin-bot bot commented Dec 12, 2024

@eVoloshchak, @trjExpensify Eep! 4 days overdue now. Issues have feelings too...

@trjExpensify
Copy link
Contributor

trjExpensify commented Dec 12, 2024

@eVoloshchak can you review or hand off please? Thanks.

Copy link

melvin-bot bot commented Dec 13, 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 Dec 16, 2024

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

@trjExpensify
Copy link
Contributor

@eVoloshchak bump again here.

@eVoloshchak
Copy link
Contributor

@FitseTLT's proposal looks good to me!

🎀👀🎀 C+ reviewed!

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

melvin-bot bot commented Dec 20, 2024

@eVoloshchak, @trjExpensify, @Gonals, @FitseTLT Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@trjExpensify
Copy link
Contributor

@eVoloshchak can you respond to this? #53702 (comment)

@FitseTLT
Copy link
Contributor

PR ready for review

@trjExpensify
Copy link
Contributor

Bumped in the PR for the ETA on review, now that the lint errors are fixed.

@parasharrajat
Copy link
Member

I can help review the PR if needed.

@trjExpensify
Copy link
Contributor

Thanks, Rajat. Looks like @eVoloshchak has reviewed today, question for @FitseTLT here.

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Jan 13, 2025
Copy link

melvin-bot bot commented Jan 13, 2025

This issue has not been updated in over 15 days. @eVoloshchak, @trjExpensify, @Gonals, @FitseTLT eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Jan 13, 2025
@trjExpensify
Copy link
Contributor

Bumped the PR.

@trjExpensify trjExpensify added Weekly KSv2 and removed Monthly KSv2 labels Jan 16, 2025
@FitseTLT
Copy link
Contributor

Resolved conflicts and addressed comments on the PR waiting for @eVoloshchak Review 👍

@FitseTLT
Copy link
Contributor

bump @eVoloshchak on the review Thx

@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 1, 2025

Bump @eVoloshchak

1 similar comment
@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 4, 2025

Bump @eVoloshchak

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Feb 10, 2025
Copy link

melvin-bot bot commented Feb 10, 2025

This issue has not been updated in over 15 days. @eVoloshchak, @trjExpensify, @Gonals, @FitseTLT eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Feb 10, 2025
@parasharrajat
Copy link
Member

I can still help with review if needed cc: @trjExpensify

@trjExpensify trjExpensify added Weekly KSv2 and removed Monthly KSv2 labels Feb 10, 2025
@trjExpensify
Copy link
Contributor

Thanks! Looks like it was marked as ready for a re-review 4 days ago. @eVoloshchak can you confirm you can finalise the review of this PR in the next couple of days?

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
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

7 participants