Skip to content

[HOLD for payment 2024-06-05] [$250] Chat - Text with attachment message can be edited when the attachment is uploading #40400

Closed

Description

@izarutskaya

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.63-0
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to chat.
  3. Copy an image (from any source).
  4. Enter text in the composer.
  5. Paste the image via CMD+V.
  6. Send the attachment together with the text.
  7. While the attachment is uploading, right click on the message > Edit comment.
  8. Edit the comment and save it.

Expected Result:

In Step 7, app should prevent comment to be editable when the attachment is uploading.

Actual Result:

In Step 7, app allows editing when the attachment with text is uploading.
As a result, the attachment is not uploaded and becomes "Uploading attachment..." when editing and saving the comment (Step 8).

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

Bug6453282_1713425265582.text_and_attachment.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016d10a063fea0e0dc
  • Upwork Job ID: 1780928057418211328
  • Last Price Increase: 2024-04-25
  • Automatic offers:
    • FitseTLT | Contributor | 0
Issue OwnerCurrent Issue Owner: @MitchExpensify

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 18, 2024
  2. melvin-bot commented on Apr 18, 2024

    @melvin-bot

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

  3. melvin-bot commented on Apr 18, 2024

    @melvin-bot

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

  4. github-actions commented on Apr 18, 2024

    @github-actions
    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.
  5. izarutskaya commented on Apr 18, 2024

    @izarutskaya
    Author

    @MitchExpensify 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.

  6. izarutskaya commented on Apr 18, 2024

    @izarutskaya
    Author

    We think this issue might be related to the #collect project.

  7. izarutskaya commented on Apr 18, 2024

    @izarutskaya
    Author

    Production

    bandicam.2024-04-18.10-50-01-227.mp4
  8. Nodebrute commented on Apr 18, 2024

    @Nodebrute
    Contributor

    Proposal

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

    Text with attachment message can be edited when the attachment is uploading #

    What is the root cause of that problem?

    Here, isAttachment will be false. That's why we can see the edit icon for comments that have text and attachments.

    return reportAction?.isAttachment ?? !!reportAction?.attachmentInfo ?? false;

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

    1. We can set isAttachment to true in reportAction for cases like these.
    2. Or we can simply check if reportAction.attachmentInfo is true. We can do something like this
    reportAction?.attachmentInfo !== undefined
    

    return reportAction?.isAttachment ?? !!reportAction?.attachmentInfo ?? false;

    3. We can create a new utility function hasAttachment for cases like these.

    What alternative solutions did you explore? (Optional)

  9. 84 remaining items

  10. melvin-bot commented on May 29, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.76-7 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-06-05. 🎊

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

  11. melvin-bot commented on May 29, 2024

    @melvin-bot

    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:

    • [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
    • [@mollfpr] 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:
    • [@mollfpr] 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:
    • [@mollfpr] Determine if we should create a regression test for this bug.
    • [@mollfpr] 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.
    • [@MitchExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  12. MitchExpensify commented on Jun 2, 2024

    @MitchExpensify
    Contributor

    Reminder set to pay, thoughts on BZ steps @mollfpr ?

  13. MitchExpensify commented on Jun 5, 2024

    @MitchExpensify
    Contributor

    Payment summary:

  14. MitchExpensify commented on Jun 5, 2024

    @MitchExpensify
    Contributor

    Paid and contract ended @FitseTLT

  15. mollfpr commented on Jun 10, 2024

    @mollfpr
    Contributor

    Sorry for the delay 🙏

    [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
    [@mollfpr] 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:

    No offending PR was found.

    [@mollfpr] 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:

    This is an improvement for a new feature, so the regression step should be enough.

    [@mollfpr] Determine if we should create a regression test for this bug.
    [@mollfpr] 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.

    1. Go to staging.new.expensify.com
    2. Go to chat.
    3. Copy an image (from any source).
    4. Enter text in the composer.
    5. Paste the image via CMD+V.
    6. Send the attachment together with the text.
    7. While the attachment is uploading, right-click on the message
    8. Verify Edit comment is not included in the context menu list
    9. Wait until the attachment is uploaded and open the context menu on the message
    10. Verify Edit comment menu exists and press on it
    11. Check that now the text+attachment message can be edited
    12. 👍 or 👎
  16. melvin-bot commented on Jun 10, 2024

    @melvin-bot

    @MariaHCD, @mollfpr, @MitchExpensify, @FitseTLT Huh... This is 4 days overdue. Who can take care of this?

  17. MitchExpensify commented on Jun 11, 2024

    @MitchExpensify
    Contributor

    Thank you!

  18. JmillsExpensify commented on Jun 11, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @mollfpr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions