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 2023-04-24] [$1000] Users unable to text if an editing message is deleted #16623

Closed
4 of 6 tasks
kavimuru opened this issue Mar 28, 2023 · 41 comments
Closed
4 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 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Mar 28, 2023

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


Action Performed:

  1. Log in with the same account on two different devices.
  2. On deviceOne go to any report, send a message, click "Edit Comment" on the message.
  3. On deviceTwo find the message from step # 2, delete the message.
  4. Notice that you can no longer see the Composer on deviceOne. You need to logout and login again to see the Composer.

Expected Result:

If an editing message is deleted, toggleReportActionComposeView should be set to true.

Actual Result:

User on deviceOne can't see the composer if the message they were editing on deviceOne is deleted in the middle of editing from another device. The user on deviceOne needs to logout and login again to see the Composer.

Workaround:

unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.2.90-7
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
Notes/Photos/Videos: Any additional supporting documentation

RPReplay_Final1679984089.MP4
az_recorder_20230328_113250.mp4

Expensify/Expensify Issue URL:
Issue reported by: @hungvu193
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1679984825880629

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c737c02d343368a4
  • Upwork Job ID: 1643291430408364032
  • Last Price Increase: 2023-04-04
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 28, 2023
@MelvinBot
Copy link

Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@MelvinBot
Copy link

MelvinBot commented Mar 28, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Overdue label Mar 31, 2023
@sonialiap
Copy link
Contributor

If user A writes a message, user B cannot delete it. I am confused about the steps. Asking for clarification in slack

@melvin-bot melvin-bot bot removed the Overdue label Apr 2, 2023
@sonialiap
Copy link
Contributor

Steps updated

@MelvinBot
Copy link

Triggered auto assignment to @cristipaval (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@cristipaval cristipaval added the External Added to denote the issue can be worked on by a contributor label Apr 4, 2023
@melvin-bot melvin-bot bot changed the title Users unable to text if an editing message is deleted [$1000] Users unable to text if an editing message is deleted Apr 4, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

Current assignee @sonialiap is eligible for the External assigner, not assigning anyone new.

@MelvinBot
Copy link

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 4, 2023
@MelvinBot
Copy link

Current assignee @cristipaval is eligible for the External assigner, not assigning anyone new.

@bernhardoj
Copy link
Contributor

bernhardoj commented Apr 4, 2023

Proposal

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

The main composer does not show when we delete the message that is currently in editing mode from another device.

What is the root cause of that problem?

When we edit a message, we hide the main composer. However, when the message is deleted, we currently don't have a way to reshow the main composer.

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

Show the main composer when the edit message (composer) component unmount.

componentWillUnmount() {
   toggleReportActionComposeView(true, this.props.isSmallScreenWidth);
}

We can further improve this by showing the main composer if the message that is in edit mode is focused (this.state.isFocused).

@bernhardoj
Copy link
Contributor

updated the proposal a little bit.

@mollfpr
Copy link
Contributor

mollfpr commented Apr 5, 2023

Thanks @bernhardoj, for the proposal!

It seems your solution is working.

We can further improve this by showing the main composer if the message that is in edit mode is focused

Can you elaborate on what the improvement is?

@bernhardoj
Copy link
Contributor

The improvement code would look like this

componentWillUnmount() {
   if (this.state.isFocused) toggleReportActionComposeView(true, this.props.isSmallScreenWidth);
}

Let's say we have 2 message in editing mode,
..... (other message)
Edit Message 1 (focused)
Edit Message 2 <- we delete this from other device

Because we are deleting the edit message that is currently not focused, we don't show the main composer and the edit message 1 still have the focus. Just a small touch.

However, it would behave differently if we switch the condition:
..... (other message)
Edit Message 1 <- we delete this from other device
Edit Message 2 (focused)

When we delete the message 1, both message 1 and message 2 will be unmounted. This behavior also exists on main, could be the normal behavior of FlatList? Which means, edit message 2 will lose it's focus and call the toggleReportActionComposeView that show the main composer.

@mollfpr
Copy link
Contributor

mollfpr commented Apr 5, 2023

I understand what you mean. It's best to stay focused on deleting messages that are not being deleted. This will leave the hassle for the user to click again on the edit message. What do you think @cristipaval?

@melvin-bot melvin-bot bot added the Overdue label Apr 10, 2023
@sonialiap
Copy link
Contributor

@cristipaval 👀 🙏 What are your thoughts on the above?

@melvin-bot melvin-bot bot removed the Overdue label Apr 10, 2023
@cristipaval
Copy link
Contributor

Good input here, @bernhardoj !
I agree with @mollfpr suggestion. Let's solve the current problem with the message deletion. The other corner case that you identified, would happen very rarely and it doesn't block the user at all.

@bernhardoj
Copy link
Contributor

Got it, will open the PR soon.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Apr 17, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Users unable to text if an editing message is deleted [HOLD for payment 2023-04-24] [$1000] Users unable to text if an editing message is deleted Apr 17, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 17, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@MelvinBot
Copy link

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 / @cristipaval] The PR that introduced the bug has been identified. Link to the PR:
  • [@mollfpr / @cristipaval] 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 / @cristipaval] 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:
  • [@sonialiap] 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.
  • [@sonialiap] 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 Apr 24, 2023
@cristipaval
Copy link
Contributor

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 / @cristipaval] The PR that introduced the bug has been identified. Link to the PR:
  • [@mollfpr / @cristipaval] 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 / @cristipaval] 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 Could you take care of this?

@melvin-bot melvin-bot bot removed the Overdue label Apr 26, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Apr 26, 2023

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

I don't think this is a bug that causes by any PR. It's an edge case that we miss when implementing the toggleReportActionComposeView. Do you agree with me @cristipaval?

@cristipaval
Copy link
Contributor

yes, I do agree that this is a bug that was not found since the feature was implemented from scratch.

@mollfpr
Copy link
Contributor

mollfpr commented Apr 28, 2023

@cristipaval Anything else I can help with?

@cristipaval
Copy link
Contributor

Thank you @mollfpr !

@sonialiap is going to perform the payments soon.

@melvin-bot melvin-bot bot added the Overdue label May 1, 2023
@cristipaval
Copy link
Contributor

I guess @sonialiap is ooo as it is labor day in Europe.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 1, 2023
@sonialiap
Copy link
Contributor

@hungvu193 job offer sent for reporting issue
@bernhardoj job offer sent for fix (50% for merging within 3 days will be added)
@mollfpr job offer sent for review (50% for merging within 3 days will be added)

@melvin-bot melvin-bot bot removed the Overdue label May 4, 2023
@mollfpr
Copy link
Contributor

mollfpr commented May 4, 2023

Thank you @sonialiap, accepted the offer!

@melvin-bot melvin-bot bot added the Overdue label May 8, 2023
@cristipaval
Copy link
Contributor

Are payments done here? Can we close this issue? 👀

@melvin-bot melvin-bot bot removed the Overdue label May 8, 2023
@mollfpr
Copy link
Contributor

mollfpr commented May 9, 2023

Waiting for @sonialiap to end the contract on Upwork, then we can close this as completed.

@sonialiap
Copy link
Contributor

@hungvu193 paid
@bernhardoj paid
@mollfpr paid
💰

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

7 participants