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 2024-07-24] [$250] Group chat - User mention is not copied when copying "made an admin" whisper to clipboard #40477

Closed
6 tasks done
m-natarajan opened this issue Apr 18, 2024 · 75 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

@m-natarajan
Copy link

m-natarajan commented Apr 18, 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: 1.4.63-0
Reproducible in staging?: y
Reproducible in production?: No
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):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to FAB > Start chat
  3. Create a group chat with User B.
  4. Send a message to the group chat.
  5. Click on the chat header > Members.
  6. Invite User B.
  7. As User B, go to the group chat.
  8. Right click on the whisper "made @user an admin" > Copy to clipboard.
  9. Paste the content.

Expected Result:

The user mention in the whisper is copied.

Actual Result:

The user mention in the whisper is not copied.
The user mention is also missing in LHN.

Workaround:

unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6453668_1713448661144.20240418_215156.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c22e43e02e5a0415
  • Upwork Job ID: 1785752223998607360
  • Last Price Increase: 2024-06-26
  • Automatic offers:
    • eh2077 | Reviewer | 102966441
    • ahmedGaber93 | Contributor | 102966443
Issue OwnerCurrent Issue Owner: @isabelastisser
@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 18, 2024
Copy link

melvin-bot bot commented Apr 18, 2024

Triggered auto assignment to @francoisl (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Apr 18, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 18, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@m-natarajan
Copy link
Author

@isabelastisser FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@m-natarajan
Copy link
Author

We think this bug might be related to #vip-vsb

@francoisl
Copy link
Contributor

I feel like this has to do more with how we copy text from mentions specifically, because the message is in the format "<muted-text>made <mention-user accountID=NNN></mention-user> an admin</muted-text>".

image

Not sure it needs to be a blocker as it doesn't stop you from doing anything critical though.
In the meantime, cc @puneetlath if you have any idea off the top of your head what this could be from.

@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Apr 18, 2024

Proposal

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

Group chat - User mention is not copied when copying "made an admin" whisper to clipboard

What is the root cause of that problem?

When We copy <mention-user accountID="1234" /> as HTML to clipboard in the web here.

new ClipboardItem({
/* eslint-disable @typescript-eslint/naming-convention */
'text/html': new Blob([html], {type: 'text/html'}),
'text/plain': new Blob([text], {type: 'text/plain'}),
}),

the paste value here paste with different format <meta charset='utf-8'><html><head></head><body><mention-user accountid="1234"></mention-user></body></html> (<openTag></closeTag> not <closedTag />), and this format not match rule reportMentions in ExpensiMark

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

Edit userMention here to match both <closedTag /> and <openTag></closeTag>

// regex: /<mention-user accountID="(\d+)" *\/>/gi,
regex: /<mention-user accountID="(\d+)"(?: *\/>|><\/mention-user>)/gi,

we will do the same for #40403

// regex: /<mention-report reportID="(\d+)" *\/>/gi,
regex: /<mention-report reportID="(\d+)"(?: *\/>|><\/mention-report>)/gi,

What alternative solutions did you explore? (Optional)

@marcaaron
Copy link
Contributor

marcaaron commented Apr 18, 2024

I don't think this worth blocking deploy over so gonna demote. Also can we check to see if the behavior works for Rooms? If not, then it's more or less something we haven't built out yet.

@francoisl if you want me to grab this I can as it's related to Group Chats.

@marcaaron marcaaron added Weekly KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Apr 18, 2024
@francoisl
Copy link
Contributor

@marcaaron if you have the bandwidth, yes feel free to grab this one 🙏 I'm still catching up on some overdue issues from OOO.

@puneetlath
Copy link
Contributor

I'm guessing it's something we just haven't built yet for accountID-based mentions.

@francoisl francoisl removed their assignment Apr 22, 2024
@melvin-bot melvin-bot bot added the Overdue label May 1, 2024
@isabelastisser
Copy link
Contributor

@marcaaron, are you able to work on this?

@melvin-bot melvin-bot bot removed the Overdue label May 1, 2024
@marcaaron
Copy link
Contributor

Yeah, let's put an External label on it? C+ can review any proposals.

@marcaaron marcaaron added the External Added to denote the issue can be worked on by a contributor label May 1, 2024
@melvin-bot melvin-bot bot changed the title Group chat - User mention is not copied when copying "made an admin" whisper to clipboard [$250] Group chat - User mention is not copied when copying "made an admin" whisper to clipboard May 1, 2024
@melvin-bot melvin-bot bot changed the title [$250] Group chat - User mention is not copied when copying "made an admin" whisper to clipboard [HOLD for payment 2024-07-24] [$250] Group chat - User mention is not copied when copying "made an admin" whisper to clipboard Jul 17, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

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

Copy link

melvin-bot bot commented Jul 17, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 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 2024-07-24. 🎊

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

Copy link

melvin-bot bot commented Jul 17, 2024

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:

  • [@ahmedGaber93 / @eh2077] The PR that introduced the bug has been identified. Link to the PR:
  • [@ahmedGaber93 / @eh2077] 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:
  • [@ahmedGaber93 / @eh2077] 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:
  • [@ahmedGaber93 / @eh2077] Determine if we should create a regression test for this bug.
  • [@ahmedGaber93 / @eh2077] 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.
  • [@isabelastisser] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@isabelastisser isabelastisser removed their assignment Jul 18, 2024
@isabelastisser isabelastisser added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jul 18, 2024
Copy link

melvin-bot bot commented Jul 18, 2024

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 18, 2024
@isabelastisser
Copy link
Contributor

I will be OOO tomorrow and next week, so I am reassigning this until I return on July 29. Thanks, @mallenexpensify!

Status:

  • @ahmedGaber93 needs to complete the BZ checklist.
  • Payment is due on July 24.

@isabelastisser isabelastisser self-assigned this Jul 18, 2024
@ahmedGaber93
Copy link
Contributor

@ahmedGaber93 needs to complete the BZ checklist.

@eh2077 is the C+ for this issue. @eh2077 Could you please complete it when you have a chance? Thanks!

@melvin-bot melvin-bot bot added the Overdue label Jul 21, 2024
@eh2077
Copy link
Contributor

eh2077 commented Jul 22, 2024

Checklist

  • [@eh2077] The PR that introduced the bug has been identified. Link to the PR: I can't figure out the specific PR caused this bug. We have waited for a while to get this fixed based on this feat
  • [@eh2077] 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: N/A
  • [@eh2077] 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: N/A
  • [@eh2077] Determine if we should create a regression test for this bug. No, as we have unit tests to cover it.

@eh2077
Copy link
Contributor

eh2077 commented Jul 22, 2024

@isabelastisser I think you can handle the payment together with #40403 because we fixed them together here. The bounty should be $250 + $250 = $500 as mentioned earlier, see #40477 (comment)

We can still treat them like two separate bugs (and get paid for both) - but let's work on the solution a bit more. @ahmedGaber93 What do you think about that?

cc @marcaaron @lakchote

@mallenexpensify
Copy link
Contributor

@eh2077 is there any reason to keep the other issue open? Possibly we need a regression test for that use flow?
If not, lit seems best to close that one and manage payment ($500/each) here.

@eh2077
Copy link
Contributor

eh2077 commented Jul 22, 2024

@mallenexpensify Yes, we can close the other issue #40403.

Regression test

  1. Open any workspace chat
  2. Send a message contain mention user and mention report and other text @MENTION_USER text after #MENTION_REPORT text after
  3. Right click on the sent message then Copy to clipboard.
  4. Paste the copied text in comopser and Verify the message pasted successfully with mentions

Do we agree 👍 or 👎

@marcaaron
Copy link
Contributor

LGTM

@mallenexpensify
Copy link
Contributor

Thanks @eh2077, issue closed, Test case created

@eh2077
Copy link
Contributor

eh2077 commented Jul 27, 2024

@mallenexpensify Can you help to issue the payment as discussed here #40477 (comment)

@mallenexpensify
Copy link
Contributor

Contributor: @ahmedGaber93 paid $500 via Upwork
Contributor+: @eh2077 paid $500 via Upwork.

@eh2077 thanks for the reminder, sorry I missed this (likely thought payment was via the other issue)

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