You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Hold for payment][$500] Chat - Action menu for MP4 files has "Copy to clipboard" and "Edit comment" functions #35578
Version Number: v1.4.35-0 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 Expensify/Expensify Issue URL: Issue reported by: Applause- Internal Team Slack conversation:
Action Performed:
Pre-requisite: user must be logged in.
Go to any chat.
Send a MP4 file.
Right click on it for the action menu to appear
Expected Result:
"Copy to clipboard" and "Edit comment" should not be options for MP4 files.
Actual Result:
"Copy to clipboard" and "Edit comment" are functions available for MP4 files. When edited, the file is no longer available.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Chat - Action menu for MP4 files has "Copy to clipboard" and "Edit comment" functions[/-][+][$500] Chat - Action menu for MP4 files has "Copy to clipboard" and "Edit comment" functions[/+]on Feb 1, 2024
Please re-state the problem that we are trying to solve in this issue
"Copy to clipboard" and "Edit comment" are functions should not be available for MP4 files.
When edited, the file is no longer available.
What is the root cause of that problem?
The issue here is that for the context menu actions we don't check the attachment type so we can show / hide these actions depending on the attachment type.
Within ContextMenuActions, for every action we have a shouldShow prop where this check is currently missing for the mentioned file types.
What changes do you think we should make in order to solve the problem?
We should add logic similar to isVideo from FileUtils to check for the attachment types within ContextMenuActions and display the actions accordingly.
For this we should agree on an array of attachment file types and apply a ReportUtils lib where we're checking within reportAction.attachmentInfo.type against the array and if the file type exists we don't show the action.
We will apply this within ContextMenuActions for both the edit and copy to clipboard actions.
Please re-state the problem that we are trying to solve in this issue.
Chat - Action menu for MP4 files has "Copy to clipboard" and "Edit comment" functions.
What is the root cause of that problem?
In isReportActionAttachment we don't check for attachmentInfo existence before returning a value for isReportActionAttachment and in edit action we don't use isReportActionAttachment check.
What changes do you think we should make in order to solve the problem?
We should also check for attachmentInfo property in reportAction before returning a value for isReportActionAttachment.
@srikarparsi It seems like the backend is returning the original filename instead of the [Attachment] text. Were you able to look into it? There is also a comment from @mkhutornyi regarding the same: #35578 (comment).
CC @francoisl since you were involved with this project. 🙇
Also, it would be great to have this fixed as quickly as possible @DylanDylann@Tony-MK, since we had another issue created today that was marked as deploy blocker #36828.
It seems like the backend is returning the original filename instead of the [Attachment] text. Were you able to look into it? There is also a comment from
@techievivek I'm working on this already, we also need to make the backend return [Attachment] for the lastMessageText value when uploading a video.
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:
[@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: NA
[@DylanDylann] 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: NA
[@DylanDylann] 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: NA
[@DylanDylann] Determine if we should create a regression test for this bug. Yes
[@DylanDylann] 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.
changed the title [-][$500] Chat - Action menu for MP4 files has "Copy to clipboard" and "Edit comment" functions[/-][+][Hold for payment][$500] Chat - Action menu for MP4 files has "Copy to clipboard" and "Edit comment" functions[/+]on Mar 12, 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:
[@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: NA
[@DylanDylann] 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: NA
[@DylanDylann] 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: NA
[@DylanDylann] Determine if we should create a regression test for this bug. Yes
[@DylanDylann] 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.
Regression Test Proposal
Go to a chat that has a video that was not uploaded by the device.
Open the video's context menu by holding down or left-click.
Verify that "Download" is a menu option.
Verify "Copy to clipboard" and "Edit comment" are not menu options.
Upload a video.
Open the video's context menu by holding down or left-click.
Verify that "Download" is a menu option.
Verify "Copy to clipboard" and "Edit comment" are not menu options.
Activity
melvin-bot commentedon Feb 1, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01bd7a8a1a0e4bc08b
[-]Chat - Action menu for MP4 files has "Copy to clipboard" and "Edit comment" functions[/-][+][$500] Chat - Action menu for MP4 files has "Copy to clipboard" and "Edit comment" functions[/+]melvin-bot commentedon Feb 1, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann (
External)melvin-bot commentedon Feb 1, 2024
Triggered auto assignment to @kadiealexander (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.kbecciv commentedon Feb 1, 2024
We think that this bug might be related to #vip-vsb
CC @quinthar
ikevin127 commentedon Feb 1, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue
"Copy to clipboard" and "Edit comment" are functions should not be available for MP4 files.
When edited, the file is no longer available.
What is the root cause of that problem?
The issue here is that for the context menu actions we don't check the attachment type so we can show / hide these actions depending on the attachment type.
Within
ContextMenuActions, for every action we have ashouldShowprop where this check is currently missing for the mentioned file types.What changes do you think we should make in order to solve the problem?
We should add logic similar to
isVideofrom FileUtils to check for the attachment types withinContextMenuActionsand display the actions accordingly.For this we should agree on an array of attachment file types and apply a ReportUtils lib where we're checking within
reportAction.attachmentInfo.typeagainst the array and if the file type exists we don't show the action.We will apply this within
ContextMenuActionsfor both the edit and copy to clipboard actions.Videos
MacOS: Chrome / Safari
Screen.Recording.2024-02-01.at.19.58.06.mov
Screen.Recording.2024-02-01.at.20.00.00.mov
Krishna2323 commentedon Feb 1, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Chat - Action menu for MP4 files has "Copy to clipboard" and "Edit comment" functions.
What is the root cause of that problem?
In
isReportActionAttachmentwe don't check forattachmentInfoexistence before returning a value forisReportActionAttachmentand in edit action we don't useisReportActionAttachmentcheck.What changes do you think we should make in order to solve the problem?
We should also check for
attachmentInfoproperty inreportActionbefore returning a value forisReportActionAttachment.In
isReportActionAttachmentutil function.App/src/libs/ReportActionsUtils.ts
Lines 667 to 679 in ff23077
This property always exists on attachments.
Use
isReportActionAttachmentforeditActionalso instead of replacing isReportMessageAttachment with isReportActionAttachment incanEditReportAction.Or add
isReportActionAttachmentcheck incanEditReportActionResult
mkhutornyi commentedon Feb 1, 2024
I think this should be fixed in backend.
Backend is sending file name in
textproperty for some reason. It should be[Attachment]Krishna2323 commentedon Feb 1, 2024
@mkhutornyi, yeah its a backend issue, the
isAttachmentproperty is also returned asfalsefrom the backend.38 remaining items
mkhutornyi commentedon Feb 20, 2024
@Tony-MK can you please confirm your PR will fix #36828 as well?
techievivek commentedon Feb 20, 2024
@srikarparsi It seems like the backend is returning the original filename instead of the
[Attachment]text. Were you able to look into it? There is also a comment from @mkhutornyi regarding the same: #35578 (comment).CC @francoisl since you were involved with this project. 🙇
Also, it would be great to have this fixed as quickly as possible @DylanDylann @Tony-MK, since we had another issue created today that was marked as deploy blocker #36828.
melvin-bot commentedon Feb 20, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
DylanDylann commentedon Feb 20, 2024
@Tony-MK Please help to speed up our PR, because our PR will fix other deploy blocker issues
Tony-MK commentedon Feb 20, 2024
@DylanDylann Sorry for the delay. Let's finish the PR.
francoisl commentedon Feb 20, 2024
@techievivek I'm working on this already, we also need to make the backend return
[Attachment]for thelastMessageTextvalue when uploading a video.techievivek commentedon Feb 21, 2024
Ok great, thanks for confirming @francoisl 🙇
DylanDylann commentedon Mar 11, 2024
@kadiealexander The PR was deployed to production 2 weeks ago. Please help to process the next step
kadiealexander commentedon Mar 12, 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:
kadiealexander commentedon Mar 12, 2024
Payouts due:
Upwork job is here.
[-][$500] Chat - Action menu for MP4 files has "Copy to clipboard" and "Edit comment" functions[/-][+][Hold for payment][$500] Chat - Action menu for MP4 files has "Copy to clipboard" and "Edit comment" functions[/+]DylanDylann commentedon Mar 12, 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:
[@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: NA
[@DylanDylann] 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: NA
[@DylanDylann] 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: NA
[@DylanDylann] Determine if we should create a regression test for this bug. Yes
[@DylanDylann] 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.
Regression Test Proposal
Do we agree 👍 or 👎