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-10-24] [$100] Attachment - Chat blinks when txt attachment is uploaded #48697

Closed
3 of 6 tasks
IuliiaHerets opened this issue Sep 6, 2024 · 39 comments
Closed
3 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 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.30-7
Reproducible in staging?: Y
Reproducible in production?: Y
Issue was found when executing this PR: #47778
Issue reported by: Applause Internal Team

Action Performed:

  1. Log in with a Gmail account
  2. Open any 1:1 chat
  3. Send a txt attachment

Expected Result:

It shouldn't blink.

Actual Result:

Chat blinks when txt attachment is uploaded.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6594960_1725596733523.OIMT0425.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021833566073242365431
  • Upwork Job ID: 1833566073242365431
  • Last Price Increase: 2024-09-27
  • Automatic offers:
    • nkdengineer | Contributor | 104162747
Issue OwnerCurrent Issue Owner: @isabelastisser
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 6, 2024
Copy link

melvin-bot bot commented Sep 6, 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.

@IuliiaHerets
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

@melvin-bot melvin-bot bot added the Overdue label Sep 9, 2024
@isabelastisser
Copy link
Contributor

review by EOD

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
@isabelastisser isabelastisser added External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Sep 10, 2024
@melvin-bot melvin-bot bot changed the title Attachment - Chat blinks when txt attachment is uploaded [$250] Attachment - Chat blinks when txt attachment is uploaded Sep 10, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

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

Copy link

melvin-bot bot commented Sep 10, 2024

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

@nkdengineer
Copy link
Contributor

Proposal

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

Chat blinks when txt attachment is uploaded.

What is the root cause of that problem?

We get the download data via withOnyx. It's an old HOC and can affect some weird lifecycle component bugs. As in this case, BaseAnchorForAttachmentsOnly disappears and appears again after the API is complete.

export default withOnyx<BaseAnchorForAttachmentsOnlyProps, BaseAnchorForAttachmentsOnlyOnyxProps>({
download: {
key: ({source}) => {
const sourceID = (source?.match(CONST.REGEX.ATTACHMENT_ID) ?? [])[1];

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

We should remove withOnyx in this component and use useOnyx to get the download data

const [download] = useOnyx(`${ONYXKEYS.COLLECTION.DOWNLOAD}${sourceID}`);

export default withOnyx<BaseAnchorForAttachmentsOnlyProps, BaseAnchorForAttachmentsOnlyOnyxProps>({
download: {
key: ({source}) => {
const sourceID = (source?.match(CONST.REGEX.ATTACHMENT_ID) ?? [])[1];

What alternative solutions did you explore? (Optional)

NA

Result

Screen.Recording.2024-09-11.at.12.34.21.mov

@isabelastisser
Copy link
Contributor

@getusha, can you please review the proposal above? thanks!

Copy link

melvin-bot bot commented Sep 13, 2024

@isabelastisser, @getusha Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Sep 13, 2024
@isabelastisser
Copy link
Contributor

Hey @getusha, any updates?

@getusha
Copy link
Contributor

getusha commented Sep 15, 2024

@nkdengineer what about this line?

const sourceID = (source?.match(CONST.REGEX.ATTACHMENT_ID) ?? [])[1];

seems like we are not directly using the value

@melvin-bot melvin-bot bot removed the Overdue label Sep 15, 2024
@nkdengineer
Copy link
Contributor

@getusha What do you mean? When we remove withOnyx, we also remove this line and we already get the sourceID in the component.

@getusha
Copy link
Contributor

getusha commented Sep 15, 2024

oh yeah you're right

@getusha
Copy link
Contributor

getusha commented Sep 16, 2024

@nkdengineer could you test this on latest main? seems like uploading txt file isn't working on android & ios mweb

@nkdengineer
Copy link
Contributor

@getusha I still able to upload the txt file for Android app and web on the latest main.

Screen.Recording.2024-09-16.at.16.45.31.mov
Screen.Recording.2024-09-16.at.16.44.31.mov

Copy link

melvin-bot bot commented Sep 17, 2024

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

@isabelastisser
Copy link
Contributor

@getusha, can you please follow up on the comment above and provide an update? Thanks!

Copy link

melvin-bot bot commented Sep 30, 2024

@isabelastisser, @MonilBhavsar, @getusha, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added Overdue Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Overdue labels Sep 30, 2024
@nkdengineer
Copy link
Contributor

@getusha this PR is ready for review

@isabelastisser
Copy link
Contributor

@getusha, can you please provide an update? Thanks!

@getusha
Copy link
Contributor

getusha commented Oct 3, 2024

Reviewing the PR, will complete it in short.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 17, 2024
@melvin-bot melvin-bot bot changed the title [$100] Attachment - Chat blinks when txt attachment is uploaded [HOLD for payment 2024-10-24] [$100] Attachment - Chat blinks when txt attachment is uploaded Oct 17, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 17, 2024
Copy link

melvin-bot bot commented Oct 17, 2024

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

Copy link

melvin-bot bot commented Oct 17, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.49-2 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-10-24. 🎊

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

Copy link

melvin-bot bot commented Oct 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:

  • [@getusha] The PR that introduced the bug has been identified. Link to the PR:
  • [@getusha] 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:
  • [@getusha] 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:
  • [@getusha] Determine if we should create a regression test for this bug.
  • [@getusha] 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:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Oct 23, 2024
@isabelastisser
Copy link
Contributor

@getusha, do we need a regression test? Please complete the list above, thanks!

@melvin-bot melvin-bot bot removed the Overdue label Oct 25, 2024
@isabelastisser
Copy link
Contributor

Payment summary:

@getusha requires payment through NewDot Manual Requests - PENDING $100 for C+ review
@nkdengineer paid in Upwork (https://www.upwork.com/nx/wm/offer/104162747) $100 Contributor role

@melvin-bot melvin-bot bot added the Overdue label Oct 28, 2024
@isabelastisser
Copy link
Contributor

Bump @getusha to complete the checklist. Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Oct 29, 2024
@getusha
Copy link
Contributor

getusha commented Oct 29, 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:

  • The PR that introduced the bug has been identified. Link to the PR: N/a, it was an issue with withOnyx
  • 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
  • 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
  • Determine if we should create a regression test for this bug. No, Doesn't affect any important user flow.
  • 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. N/A

@isabelastisser
Copy link
Contributor

Thanks, all set!

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 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants