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

[$250] Android - Group - User is navigated to chat again for a few seconds when leaving group chat. #54062

Open
2 of 8 tasks
IuliiaHerets opened this issue Dec 12, 2024 · 14 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 12, 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.75-3
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5310142&group_by=cases:section_id&group_order=asc&group_id=229067
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 - Android 12
App Component: undefined

Action Performed:

  1. Open the Expensify app.
  2. Open any group chat or create one if it is necessary.
  3. Tap on the group´s header.
  4. Tap on "Leave"
  5. Verify the group is automatically deleted and you are navigated out of it.

Expected Result:

When leaving a group, the user should be automatically navigated out of it and the group should be deleted.

Actual Result:

After leaving a group, the user is navigated to group´s chat again for a second, before the group is removed and the user navigated out of it.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6685430_1733421709342.Leave.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021871393393466699464
  • Upwork Job ID: 1871393393466699464
  • Last Price Increase: 2024-12-31
Issue OwnerCurrent Issue Owner: @allgandalf
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

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

@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 12, 2024

Edited by proposal-police: This proposal was edited at 2024-12-12 21:08:05 UTC.

Proposal

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

Android - Group - User is navigated to chat again for a few seconds when leaving group chat.

What is the root cause of that problem?

We leave group chat and navigate to most recent report inside isNavigationReady here

const leaveChat = useCallback(() => {
Navigation.dismissModal();
Navigation.isNavigationReady().then(() => {
if (isRootGroupChat) {
Report.leaveGroupChat(report.reportID);
return;

so it takes a while to navigate to the relevant report after dismissing modal and in that moment we see the chat

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

We used isNavigationReady here to fix chat thread bug on IOS and we don't need it for non-chat threads (group chat and rooms). So for non-isChatThread we can either dismissModal inside isNavigationReady or even avoid using isNavigationReady

const leave = () => {
        if (isRootGroupChat) {
            Report.leaveGroupChat(report.reportID);
            return;
        }
        const isWorkspaceMemberLeavingWorkspaceRoom = (report.visibility === CONST.REPORT.VISIBILITY.RESTRICTED || isPolicyExpenseChat) && isPolicyEmployee;
        Report.leaveRoom(report.reportID, isWorkspaceMemberLeavingWorkspaceRoom);
    };

    const leaveChat = useCallback(() => {
        Navigation.dismissModal();

        if (!isChatThread) {
            leave();
            return;

        }

        Navigation.isNavigationReady().then(() => {
            leave();
        });

or

if (isChatThread) {
            Navigation.dismissModal();
        }
        Navigation.isNavigationReady().then(() => {
            if (!isChatThread) {
                Navigation.dismissModal();
            }
            if (isRootGroupChat) {
                Report.leaveGroupChat(report.reportID);
                return;
            }
            const isWorkspaceMemberLeavingWorkspaceRoom = (report.visibility === CONST.REPORT.VISIBILITY.RESTRICTED || isPolicyExpenseChat) && isPolicyEmployee;
            Report.leaveRoom(report.reportID, isWorkspaceMemberLeavingWorkspaceRoom);
        });

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

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Dec 16, 2024
Copy link

melvin-bot bot commented Dec 16, 2024

@RachCHopkins Whoops! This issue is 2 days overdue. Let's get this updated quick!

@RachCHopkins
Copy link
Contributor

Can't use Android app right now, so can't repro.

@melvin-bot melvin-bot bot removed the Overdue label Dec 17, 2024
Copy link

melvin-bot bot commented Dec 20, 2024

@RachCHopkins Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Dec 20, 2024
@RachCHopkins
Copy link
Contributor

Ditto - still unable to update app. I think the rollout was reverted.

@melvin-bot melvin-bot bot removed the Overdue label Dec 22, 2024
@RachCHopkins
Copy link
Contributor

Ok, Android is back online and I can definitely repro in the new instance!

@RachCHopkins RachCHopkins added the External Added to denote the issue can be worked on by a contributor label Dec 24, 2024
@melvin-bot melvin-bot bot changed the title Android - Group - User is navigated to chat again for a few seconds when leaving group chat. [$250] Android - Group - User is navigated to chat again for a few seconds when leaving group chat. Dec 24, 2024
Copy link

melvin-bot bot commented Dec 24, 2024

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

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

melvin-bot bot commented Dec 24, 2024

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

Copy link

melvin-bot bot commented Dec 26, 2024

@RachCHopkins @allgandalf this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Dec 26, 2024
Copy link

melvin-bot bot commented Dec 27, 2024

@RachCHopkins, @allgandalf Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Dec 31, 2024

@RachCHopkins, @allgandalf Still overdue 6 days?! Let's take care of this!

Copy link

melvin-bot bot commented Dec 31, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@allgandalf
Copy link
Contributor

@FitseTLT can you share a test branch, I am not completely satisfied with the solution I will review the branch and post a feedback

@melvin-bot melvin-bot bot removed the Overdue label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

4 participants