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-08-07] [$250] Room - Inviting new members to room shows duplicate contact briefly in members list #45898

Closed
2 of 6 tasks
lanitochka17 opened this issue Jul 22, 2024 · 20 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 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 22, 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.10
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4751847
Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch app
  2. Tap on a room chat -- header-- members -- invite
  3. Add a new member by entering new address or phone contact

Expected Result:

Inviting new members to room must not show duplicate contact briefly in members list

Actual Result:

Inviting new members to room shows duplicate contact briefly in members list

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

Bug6549202_1721641129832.ne.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c5c0ee049c0690eb
  • Upwork Job ID: 1815530692990183389
  • Last Price Increase: 2024-07-22
  • Automatic offers:
    • FitseTLT | Contributor | 103282594
Issue OwnerCurrent Issue Owner: @sakluger
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

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

@lanitochka17
Copy link
Author

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

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@FitseTLT
Copy link
Contributor

Proposal

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

Room - Inviting new members to room shows duplicate contact briefly in members list

What is the root cause of that problem?

For new personal details optimistic personal detail is created until the real details comes from the server

App/src/libs/actions/Report.ts

Lines 2815 to 2816 in b8b99d0

optimisticData.push(...newPersonalDetailsOnyxData.optimisticData);

and when it comes the optimistic will be delted from onyx

App/src/libs/actions/Report.ts

Lines 2831 to 2832 in b8b99d0

successData.push(...newPersonalDetailsOnyxData.finallyData);

but there is a time gap where both will be displayed until the optimistic data is deleted successfully

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

In RoomMembers page, we can filter out isOptimisticPersonalDetail type personal detail if there is another detail with the same login by changing code here

if (!details) {
Log.hmmm(`[RoomMembersPage] no personal details found for room member with accountID: ${accountID}`);
return;
}

if (!details || (details.isOptimisticPersonalDetail && participants.some((accID) => accID !== accountID && details.login === personalDetails[accID]?.login))) {
                Log.hmmm(`[RoomMembersPage] no personal details found for room member with accountID: ${accountID}`);
                return;
            }

What alternative solutions did you explore? (Optional)

@sakluger sakluger added the External Added to denote the issue can be worked on by a contributor label Jul 22, 2024
@melvin-bot melvin-bot bot changed the title Room - Inviting new members to room shows duplicate contact briefly in members list [$250] Room - Inviting new members to room shows duplicate contact briefly in members list Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

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

@sakluger
Copy link
Contributor

@FitseTLT as far as you can tell, is this only broken for adding new members to a room, or would it also cause the issue when inviting someone to a workspace?

@FitseTLT
Copy link
Contributor

@FitseTLT as far as you can tell, is this only broken for adding new members to a room, or would it also cause the issue when inviting someone to a workspace?

@sakluger No the issue doesn't occur for workspace's member invitation page.

@hungvu193
Copy link
Contributor

I'll take a look today

@hungvu193
Copy link
Contributor

@FitseTLT 's proposal here looks good to me!

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jul 25, 2024

Triggered auto assignment to @aldo-expensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@FitseTLT
Copy link
Contributor

bump @aldo-expensify for assignment

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

📣 @FitseTLT 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Jul 31, 2024
@melvin-bot melvin-bot bot changed the title [$250] Room - Inviting new members to room shows duplicate contact briefly in members list [HOLD for payment 2024-08-07] [$250] Room - Inviting new members to room shows duplicate contact briefly in members list Jul 31, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 31, 2024
Copy link

melvin-bot bot commented Jul 31, 2024

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

Copy link

melvin-bot bot commented Jul 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.14-6 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-08-07. 🎊

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

Copy link

melvin-bot bot commented Jul 31, 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:

  • [@hungvu193] The PR that introduced the bug has been identified. Link to the PR:
  • [@hungvu193] 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:
  • [@hungvu193] 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:
  • [@hungvu193] Determine if we should create a regression test for this bug.
  • [@hungvu193] 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.
  • [@sakluger] 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 and removed Weekly KSv2 labels Aug 7, 2024
@sakluger
Copy link
Contributor

sakluger commented Aug 7, 2024

Summarizing payment on this issue:

Contributor: @FitseTLT $250, paid via Upwork
Contributor+: @hungvu193 $250, please request on Newdot

@hungvu193 please also complete the BZ checklist.

@hungvu193
Copy link
Contributor

hungvu193 commented Aug 8, 2024

  • The PR that introduced the bug has been identified. Link to the PR: UI for room invitations/removals #27966
  • 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: https://github.com/Expensify/App/pull/27966/files#r1708527429
  • 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: Yes

Regresstion tests:

  1. Launch app
  2. Tap on a room chat, click on Header --> choose Members --> select Invite.
  3. Add a new member by entering the new email address or phone contact.
  4. Verify that duplicate contact is not displayed in room members page.

Do we 👍 or 👎 ?

@sakluger
Copy link
Contributor

sakluger commented Aug 8, 2024

Thanks!

@sakluger sakluger closed this as completed Aug 8, 2024
@JmillsExpensify
Copy link

$250 approved for @hungvu193

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
Archived in project
Development

No branches or pull requests

6 participants