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-05-08] [HOLD for payment 2024-05-06] Room - Incorrect number of members is shown when the invite error is not manually dismissed #41133

Closed
6 tasks done
m-natarajan opened this issue Apr 27, 2024 · 13 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Apr 27, 2024

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


Issue found validating #40272
Version Number: 1.4.67-0
Reproducible in staging?: y
Reproducible in production?: n
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:

  1. Go to staging.new.expensify.com
  2. Create a room.
  3. Click on chat header > Members.
  4. Invite VOIP number +18183305299.
  5. Without dismissing the error, go back to previous page.
  6. Return to Members page.
  7. Go back to room details page.

Expected Result:

The room details page should display the correct number of room members.

Actual Result:

The room details page displays the incorrect number of room members, which include the VOIP user, because the error is not manually dismissed and disappears on its own after closing Members page.

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

Bug6463533_1714199342009.20240427_142407.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @puneetlath
@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 27, 2024
Copy link

melvin-bot bot commented Apr 27, 2024

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

Copy link

melvin-bot bot commented Apr 27, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 27, 2024
@melvin-bot melvin-bot bot removed the Hourly KSv2 label Apr 27, 2024
Copy link
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.

@m-natarajan
Copy link
Author

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

@m-natarajan
Copy link
Author

We think this bug might be related to #vip-vsb

@ShridharGoel
Copy link
Contributor

Proposal

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

Member count includes pending members with errors as well when the message is not manually dismissed.

What is the root cause of that problem?

The member invite error is not cleared from Onyx and fields like pendingChatMembers, participantAccountIDs and participants is not updated unless the error is manually dismissed.

Below method is only called when the close button is clicked:

const dismissError = useCallback(
(item: ListItem) => {
Report.clearAddRoomMemberError(report.reportID, String(item.accountID ?? ''));
},
[report.reportID],
);

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

We should add a new function in RoomMembersPage to clear any member invite errors and update the above mentioned fields when going back from the members page.

const dismissErrorsIfAny = () => {
    data.forEach((item) => {
        if (item.errors) {
            Report.clearAddRoomMemberError(report.reportID, String(item.accountID ?? ''));
        }
    })
}

Add a useEffect to call this method when the searchValue changes or reportID changes (so we'll also be clearing this when the user tries to search something - this searchValue dependency is optional and can be skipped).

useEffect(() => {
        dismissErrorsIfAny()
    },
    [report.reportID, searchValue],
);

Call dismissErrorsIfAny(); when back button is clicked.

<HeaderWithBackButton
    title={translate('workspace.common.members')}
    subtitle={ReportUtils.getReportName(report)}
    onBackButtonPress={() => {
        setSearchValue('');
        dismissErrorsIfAny();

        Navigation.goBack(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(report.reportID));
    }}
/>

@mountiny
Copy link
Contributor

@nkdengineer @akinwale seems like this is stemming from your PR #40272 can you please raise a fix?

@puneetlath
Copy link
Contributor

Requested the CP for the revert.

@puneetlath
Copy link
Contributor

This has been reverted.

@francoisl francoisl removed the DeployBlockerCash This issue or pull request should block deployment label Apr 29, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Apr 29, 2024
@melvin-bot melvin-bot bot changed the title Room - Incorrect number of members is shown when the invite error is not manually dismissed [HOLD for payment 2024-05-06] Room - Incorrect number of members is shown when the invite error is not manually dismissed Apr 29, 2024
Copy link

melvin-bot bot commented Apr 29, 2024

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

Copy link

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

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

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels May 1, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-05-06] Room - Incorrect number of members is shown when the invite error is not manually dismissed [HOLD for payment 2024-05-08] [HOLD for payment 2024-05-06] Room - Incorrect number of members is shown when the invite error is not manually dismissed May 1, 2024
Copy link

melvin-bot bot commented May 1, 2024

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

Copy link

melvin-bot bot commented May 1, 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:

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

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels May 2, 2024
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. Engineering Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants