Skip to content

[Due for payment 2025-03-17] [$250] Group chat - Group chat name in the RHP changes to <'s group chat> when RHP is dismissed #57021

Closed

Description

@IuliiaHerets

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.1.0.0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): applausetester+sj9032@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: Other

Action Performed:

  1. Go to staging.new.expensify.com
  2. Open FAB > Start chat > Chat.
  3. Click Add to group.
  4. Click Next.
  5. Click Start group.

Expected Result:

When RHP is dismissed, the group chat name in the RHP will not change to <'s group chat>.

Actual Result:

When RHP is dismissed, the group chat name in the RHP changes to <'s group chat>. The participant list is also blank.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Image https://github.com/user-attachments/assets/f1df43fc-f2c8-47b0-9e5b-2b0c4d8b773d

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021892968296677267067
  • Upwork Job ID: 1892968296677267067
  • Last Price Increase: 2025-02-21
  • Automatic offers:
    • truph01 | Contributor | 106383062
Issue OwnerCurrent Issue Owner: @OfstadC

Activity

  1. added
    Bug
    Daily
    on Feb 18, 2025
  2. melvin-bot commented on Feb 18, 2025

    @melvin-bot

    Triggered auto assignment to @OfstadC (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 Feb 18, 2025

    @bernhardoj
    Contributor

    Proposal

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

    Group chat information disappears after creating the group chat.

    What is the root cause of that problem?

    The information on the confirm page is coming from the newGroupChatDraft data.

    const [newGroupDraft, newGroupDraftMetaData] = useOnyx(ONYXKEYS.NEW_GROUP_CHAT_DRAFT);

    When we open the group chat from openReport, we will clear the draft.

    if (isGroupChat) {
    parameters.chatType = CONST.REPORT.CHAT_TYPE.GROUP;
    parameters.groupChatAdminLogins = currentUserEmail;
    parameters.optimisticAccountIDList = Object.keys(newReportObject?.participants ?? {}).join(',');
    parameters.reportName = newReportObject?.reportName ?? '';
    // If we have an avatar then include it with the parameters
    if (avatar) {
    parameters.file = avatar;
    }
    clearGroupChat();
    }

    So, the confirm page is updated with an empty information.

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

    Instead of clearing the data in openReport, we can clear it when the page is unmounted.

    useEffect(() => {
        return () => {
            clearGroupChat();
        }
    }, []);
    

    We can optionally clear it if the page is unmounted and the Start group button is pressed.

    Or maybe we don't need to clear it when the page is unmounted because we clear it when pressing the Start chat button.

    function startNewChat() {
    clearGroupChat();
    Navigation.navigate(ROUTES.NEW);
    }

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

  4. truph01 commented on Feb 19, 2025

    @truph01
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-02-22 07:28:16 UTC.

    Proposal

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

    • When RHP is dismissed, the group chat name in the RHP changes to <'s group chat>. The participant list is also blank.

    What is the root cause of that problem?

    • The group chat name is sourced from the ONYXKEYS.NEW_GROUP_CHAT_DRAFT key. This key is cleared after a new group chat is created by invoking the clearGroupChat() function, which is defined in the following location:

    clearGroupChat();

    Consequently, the temporary placeholder text <'s group chat> is displayed briefly.

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

    • We can encapsulate clearGroupChat() within InteractionManager.runAfterInteractions to ensure it executes only after all navigation transitions and animations have completed:
            InteractionManager.runAfterInteractions(() => {
                clearGroupChat();
            });
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    • NA

    What alternative solutions did you explore? (Optional)

    • Improvement: We can add:
        useEffect(() => {
            if (!isLoadingOnyxValue(newGroupDraftMetaData) && !newGroupDraft) {
               setTimeout(()=>{
                navigateBack();
               }, 0)
            }
        }, [newGroupDraft, newGroupDraftMetaData, navigateBack]);
    

    to the NewChatConfirmPage.tsx page so it will navigate back to the previous page if there is no group chat draft data.

  5. added
    External
    on Feb 21, 2025
  6. changed the title [-]Group chat - Group chat name in the RHP changes to <'s group chat> when RHP is dismissed[/-] [+][$250] Group chat - Group chat name in the RHP changes to <'s group chat> when RHP is dismissed[/+] on Feb 21, 2025
  7. melvin-bot commented on Feb 21, 2025

    @melvin-bot
  8. added
    Help Wanted
    on Feb 21, 2025
  9. melvin-bot commented on Feb 21, 2025

    @melvin-bot

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

  10. s77rt commented on Feb 21, 2025

    @s77rt
    Member

    @bernhardoj Thanks for the proposal. The RCA makes sense. Removing the clearGroupChat looks good to me and it's also consist with IOU flow.

    🎀 👀 🎀 C+ reviewed
    Link to proposal

    Edit: It's not that consist as draft values are not cleared after submission and can still be accessed via deep link

  11. 45 remaining items

  12. moved this to Hold for Payment in #expensify-bugson Mar 11, 2025
  13. s77rt commented on Mar 15, 2025

    @s77rt
    Member

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: [Group Chats] Add remaining features #39757 (comment)

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

      Bug requires regression test: No, edge case

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  14. added
    Daily
    and removed
    Weekly
    on Mar 17, 2025
  15. OfstadC commented on Mar 17, 2025

    @OfstadC
    Contributor

    Payment Summary

  16. moved this from Hold for Payment to Done in #expensify-bugson Mar 17, 2025
  17. JmillsExpensify commented on Mar 19, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @s77rt

  18. added
    Reviewing
    Weekly
    and removed
    Daily
    on May 26, 2026
  19. added
    Weekly
    and removed
    Weekly
    on Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugExternalReviewingWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions