Skip to content

[HOLD for payment 2024-10-22] [$250] mWeb - Chat - The welcome group message doesn't update when a user is removed #49933

Description

@lanitochka17

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: 9.0.41
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Issue found when executing PR #49618

Action Performed:

  1. FAB > start chat
  2. Select a few members and create a group chat
  3. Press on members and remove one user from the group
  4. Navigate to the group chat

Expected Result:

The removed user is not displayed in the welcome group message

Actual Result:

The removed user is still displayed in the welcome group message

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

Bug6618968_1727571690696.49618-mWeb.1.mp4

Message_not_updated

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021841455012379899950
  • Upwork Job ID: 1841455012379899950
  • Last Price Increase: 2024-10-02
  • Automatic offers:
    • alitoshmatov | Reviewer | 104310823
Issue OwnerCurrent Issue Owner: @sonialiap

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 30, 2024
  2. melvin-bot commented on Sep 30, 2024

    @melvin-bot

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

  3. bernhardoj commented on Sep 30, 2024

    @bernhardoj
    Contributor

    Proposal

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

    The group welcome text doesn't immediately update its members/participant.

    What is the root cause of that problem?

    When we remove participant from the group, we don't immediately remove it from participants, but rather put it in pendingChatMembers list. After the request is success, the member will be removed.

    Currently, we show the list of the participants from the participants without filtering the pending delete members.

    const participantAccountIDs = ReportUtils.getParticipantsAccountIDsForDisplay(report);

    App/src/libs/ReportUtils.ts

    Lines 2110 to 2112 in e84dab7

    function getParticipantsAccountIDsForDisplay(report: OnyxEntry<Report>, shouldExcludeHidden = false, shouldExcludeDeleted = false): number[] {
    const reportParticipants = report?.participants ?? {};
    let participantsEntries = Object.entries(reportParticipants);

    So, the text will still shows the pending delete member for a while.

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

    To not show the deleted member, we need to pass shouldExcludeDeleted as true.

    const participantAccountIDs = ReportUtils.getParticipantsAccountIDsForDisplay(report, undefined, true);
    

    I think we can make the default to true, but not sure why we made it false.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 2, 2024
  5. changed the title [-]mWeb - Chat - The welcome group message doesn't update when a user is removed[/-] [+][$250] mWeb - Chat - The welcome group message doesn't update when a user is removed[/+] on Oct 2, 2024
  6. melvin-bot commented on Oct 2, 2024

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 2, 2024
  8. melvin-bot commented on Oct 2, 2024

    @melvin-bot

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

  9. alitoshmatov commented on Oct 6, 2024

    @alitoshmatov
    Contributor

    @bernhardoj Thank you for your proposal, your RCA is correct. Looks like fairly simple solution.

    We can go with @bernhardoj 's proposal

    C+ reviewed 🎀 👀 🎀

  10. melvin-bot commented on Oct 6, 2024

    @melvin-bot

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

  11. 25 remaining items

  12. self-assigned this
    on Oct 17, 2024
  13. bernhardoj commented on Oct 17, 2024

    @bernhardoj
    Contributor

    Requested in ND.

  14. JmillsExpensify commented on Oct 21, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

  15. alitoshmatov commented on Oct 23, 2024

    @alitoshmatov
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: update beginningOfChatHistory translation #49919
    • 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/49919/files#r1812414693
    • 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: No need
    • Determine if we should create a regression test for this bug. Straightforward fix, no need
  16. alitoshmatov commented on Oct 23, 2024

    @alitoshmatov
    Contributor

    @JmillsExpensify Checklist done

  17. sonialiap commented on Oct 23, 2024

    @sonialiap
    Contributor

    @alitoshmatov thanks! Payment completed ✔️

  18. tgolen commented on Oct 23, 2024

    @tgolen
    Contributor

    @sonialiap can you please copy the checklist answers from @alitoshmatov into the checklist comment above and then complete your checklist item?

  19. reopened this on Oct 23, 2024
  20. sonialiap commented on Oct 24, 2024

    @sonialiap
    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:

    • [@alitoshmatov] The PR that introduced the bug has been identified. Link to the PR: update beginningOfChatHistory translation #49919
    • [@alitoshmatov] 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/49919/files#r1812414693
    • [@alitoshmatov] 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: No need
    • [@alitoshmatov] Determine if we should create a regression test for this bug.: Straightforward fix, no need
    • [@alitoshmatov] 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. : no need for regression test
    • [@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: no need for regression test
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.DailyKSv2ExternalAdded 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