Skip to content

[$500] Android - Thread - Back button is not responsive in the parent report after leaving thread #28522

Closed

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!


Issue found when executing PR #27748

Action Performed:

  1. Launch New Expensify app
  2. Go to any chat with thread (leave the thread if you're already in one)
  3. Tap on the thread > Three-dot menu > Join thread
  4. Return to LHN
  5. Open the thread report from LHN
  6. Tap three-dot menu > Leave thread
  7. Tap on the back button
  8. Tap on the back button again

Expected Result:

Back button is responsive and user is able to return to LHN

Actual Result:

Back button is not responsive and user is stuck at at the parent report of the thread

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.75-3

Reproducible in staging?: Yes

Reproducible in production?: No

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6219498_1696016051473.Screen_Recording_20230930_015322_New_Expensify.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018b26c9446b581810
  • Upwork Job ID: 1708820316584988672
  • Last Price Increase: 2023-10-09

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 29, 2023
  2. melvin-bot commented on Sep 29, 2023

    @melvin-bot

    Triggered auto assignment to @greg-schroeder (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. melvin-bot commented on Sep 29, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. OSBotify commented on Sep 29, 2023

    @OSBotify
    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.
  5. melvin-bot commented on Sep 29, 2023

    @melvin-bot

    Triggered auto assignment to @AndrewGable (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  6. dukenv0307 commented on Sep 30, 2023

    @dukenv0307
    Contributor

    Proposal

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

    Android - Thread - Back button is not responsive in the parent report after leaving thread

    What is the root cause of that problem?

    We have two bugs here:

    1. We go back to the parent report briefly before navigating to the concierge chat after leaving room

    In leaveRoom function, we will go back to parent report if the room is the thread report

    App/src/libs/actions/Report.js

    Lines 1929 to 1931 in 52f0e3c

    if (report.parentReportID) {
    Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report.parentReportID), CONST.NAVIGATION.TYPE.FORCED_UP);
    return;

    But on ReportScreen, we have a useEffect that will go back to the concierge chat whenever we leaving the room

    (prevOnyxReportID && prevOnyxReportID === routeReportID && !onyxReportID && prevReport.statusNum === CONST.REPORT.STATUS.OPEN && report.statusNum === CONST.REPORT.STATUS.CLOSED)
    ) {
    Navigation.goBack();
    Report.navigateToConciergeChat();
    return;
    }

    1. The back button is not responsive

    Because we force-up here, the Home screen is replaced, and then cannot go back

    App/src/libs/actions/Report.js

    Lines 1929 to 1931 in 52f0e3c

    if (report.parentReportID) {
    Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report.parentReportID), CONST.NAVIGATION.TYPE.FORCED_UP);
    return;

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

    1. If we always want to go back to concierge chat after leaving room, we can remove the navigate logic in leaveRoom function because we already have this in ReportScreen

    App/src/libs/actions/Report.js

    Lines 1925 to 1935 in 52f0e3c

    Navigation.dismissModal();
    if (Navigation.getTopmostReportId() === reportID) {
    Navigation.goBack(ROUTES.HOME);
    }
    if (report.parentReportID) {
    Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report.parentReportID), CONST.NAVIGATION.TYPE.FORCED_UP);
    return;
    }
    navigateToConciergeChat();
    }

    1. If not, we can remove the optimistic case here as we only want to do this if we leave room on another device
    if (!prevUserLeavingStatus && userLeavingStatus) { 
        Navigation.goBack();
        Report.navigateToConciergeChat();
        return;
    }
    

    (prevOnyxReportID && prevOnyxReportID === routeReportID && !onyxReportID && prevReport.statusNum === CONST.REPORT.STATUS.OPEN && report.statusNum === CONST.REPORT.STATUS.CLOSED)
    ) {
    Navigation.goBack();
    Report.navigateToConciergeChat();
    return;
    }

    And we need to move this block here to above here

    App/src/libs/actions/Report.js

    Lines 1929 to 1931 in 52f0e3c

    if (report.parentReportID) {
    Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report.parentReportID), CONST.NAVIGATION.TYPE.FORCED_UP);
    return;

    What alternative solutions did you explore? (Optional)

  7. mountiny commented on Oct 1, 2023

    @mountiny
    Contributor

    @dukenv0307 Thanks for the proposal, looks good to me but given this is a deploy blocker, can you highlight which PR caused this issue as that will be the real RCA.

  8. dukenv0307 commented on Oct 1, 2023

    @dukenv0307
    Contributor

    @mountiny This coming from this PR #24407 that added the logic to go to concierge chat in ReportScreen

  9. 31 remaining items

  10. greg-schroeder commented on Oct 6, 2023

    @greg-schroeder
    Contributor

    👍 okay I will try again to reproduce

  11. melvin-bot commented on Oct 9, 2023

    @melvin-bot

    @AndrewGable, @jjcoffee, @greg-schroeder Whoops! This issue is 2 days overdue. Let's get this updated quick!

  12. melvin-bot commented on Oct 9, 2023

    @melvin-bot

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

  13. greg-schroeder commented on Oct 10, 2023

    @greg-schroeder
    Contributor

    Will get to this during the week. also @jjcoffee or @allroundexperts can either of you help confirm if it's reproducible or not with the different steps?

  14. mvtglobally commented on Oct 12, 2023

    @mvtglobally

    Issue not reproducible during KI retests. (First week)

  15. melvin-bot commented on Oct 13, 2023

    @melvin-bot

    @AndrewGable @jjcoffee @greg-schroeder 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!

  16. greg-schroeder commented on Oct 13, 2023

    @greg-schroeder
    Contributor

    I cannot repro

  17. greg-schroeder commented on Oct 16, 2023

    @greg-schroeder
    Contributor

    It seems maybe this was fixed elsewhere - nobody can repro. Going to close then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions