Skip to content

[HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$250] Chat - Unable to navigate to LHN, back button loops between WS details & main chat page #41514

Closed

Description

@izarutskaya

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: 1.4.70-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): applausetester+1088ck@applause.expensifail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL: Applause-Internal team
Issue reported by: Applause-Internal team

Action Performed:

  1. Navigate to staging.new.expensify.com or ND app
  2. Go to any Workspace chat page
  3. Tap + icon >> select Assign task or Submit expense >> Complete the flow
  4. Select the created task or expense to go report page
  5. Tap on "From" link in header to go back to chat page
  6. Tap on header to go to WS details page
  7. Tap on back button (User redirected to main chat page)
  8. Tap on back button (User again taken back to details page)
  9. Repeat steps 7 & 8

Expected Result:

Unable should redirected to LHN, on tapping back button in main chat page

Actual Result:

Unable to navigate to LHN, back button loops between WS details & main chat 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

Bug6468992_1714664353275.RPReplay_Final1714664285.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0110f0cb9e34f0e6c4
  • Upwork Job ID: 1787970200405659648
  • Last Price Increase: 2024-05-14
  • Automatic offers:
    • rayane-djouah | Reviewer | 0
    • bernhardoj | Contributor | 0
Issue OwnerCurrent Issue Owner: @johncschuster

Activity

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

    @melvin-bot

    Triggered auto assignment to @johncschuster (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. izarutskaya commented on May 2, 2024

    @izarutskaya
    Author

    We think this issue might be related to the #vip-vsb.

  4. bernhardoj commented on May 3, 2024

    @bernhardoj
    Contributor

    Proposal

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

    The back button loops if we open the report detail page after visiting a linked message of a report.

    What is the root cause of that problem?

    If we open the detail page from a report, shouldNavigateToTopMostReport will be true.

    onBackButtonPress={Navigation.goBack}
    shouldNavigateToTopMostReport={!(route.params && 'backTo' in route.params)}

    shouldNavigateToTopMostReport will navigate to the topmost report ID.

    if (shouldNavigateToTopMostReport && topmostReportId) {
    Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(topmostReportId));
    } else {
    onBackButtonPress();

    But the navigation type will be changed to PUSH because the params are different. The topmost report has reportID and reportActionID in the params (linked message), but we navigate to a report without reportActionID.

    } else if (action.payload.name === NAVIGATORS.CENTRAL_PANE_NAVIGATOR && (isTargetScreenDifferentThanCurrent || areParamsDifferent)) {
    // We need to push a tab if the tab doesn't match the central pane route that we are going to push.
    const topmostBottomTabRoute = getTopmostBottomTabRoute(rootState);
    const matchingBottomTabRoute = getMatchingBottomTabRouteForState(stateFromPath, policyID);
    const isNewPolicyID =
    (topmostBottomTabRoute?.params as Record<string, string | undefined>)?.policyID !== (matchingBottomTabRoute?.params as Record<string, string | undefined>)?.policyID;
    if (topmostBottomTabRoute && (topmostBottomTabRoute.name !== matchingBottomTabRoute.name || isNewPolicyID)) {
    root.dispatch({
    type: CONST.NAVIGATION.ACTION_TYPE.PUSH,
    payload: matchingBottomTabRoute,
    });
    }
    action.type = CONST.NAVIGATION.ACTION_TYPE.PUSH;

    If we update the logic to only compares the reportID, this issue won't happen anymore, but it will remove the reportActionID from the param, so the message won't be linked anymore.

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

    To solve the issue correctly, we just need to remove shouldNavigateToTopMostReport from the details page.

    if we want the user to see the report screen when going back after refresh, then it should be handled in this issue

  5. melvin-bot commented on May 7, 2024

    @melvin-bot

    @johncschuster Eep! 4 days overdue now. Issues have feelings too...

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 7, 2024
  7. changed the title [-]Chat - Unable to navigate to LHN, back button loops between WS details & main chat page[/-] [+][$250] Chat - Unable to navigate to LHN, back button loops between WS details & main chat page[/+] on May 7, 2024
  8. melvin-bot commented on May 7, 2024

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

    @melvin-bot

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

  11. 36 remaining items

  12. changed the title [-][HOLD for payment 2024-06-18] [$250] Chat - Unable to navigate to LHN, back button loops between WS details & main chat page[/-] [+][HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$250] Chat - Unable to navigate to LHN, back button loops between WS details & main chat page[/+] on Jun 13, 2024
  13. melvin-bot commented on Jun 13, 2024

    @melvin-bot

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

    For reference, here are some details about the assignees on this issue:

  14. melvin-bot commented on Jun 13, 2024

    @melvin-bot

    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:

    • [@rayane-djouah] The PR that introduced the bug has been identified. Link to the PR:
    • [@rayane-djouah] 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:
    • [@rayane-djouah] 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:
    • [@rayane-djouah] Determine if we should create a regression test for this bug.
    • [@rayane-djouah] 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.
    • [@johncschuster] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  15. rayane-d commented on Jun 17, 2024

    @rayane-d
    Contributor

    Regression Test Proposal

    1. Open a workspace chat
    2. Request money
    3. Press the request preview
    4. Press the "From" link on the header
    5. Press the chat header to open the details
    6. Go back
    7. Verify the request preview is still highlighted
    8. (small screen) Go back again
    9. Verify you are navigated to the LHN

    Do we agree 👍 or 👎

  16. johncschuster commented on Jun 20, 2024

    @johncschuster
    Contributor

    I've added the QA issue and will work on payment shortly.

  17. johncschuster commented on Jun 21, 2024

    @johncschuster
    Contributor

    @hayata-suenaga I'm trying to make sense of the payment here. As far as I can tell, it looks like @rayane-djouah introduced the bug in this PR, which was reviewed by @rushatgabhane.

    It also looks like @bernhardoj has worked on the fix for the regression (here), and @rayane-djouah reviewed that PR. Have I understood that correctly?

  18. hayata-suenaga commented on Jun 24, 2024

    @hayata-suenaga
    Contributor

    Yes that seems to be correct. The C+ authored a PR that introduced the regression and the same C+ reviewed the PR that fixed it.

  19. hayata-suenaga commented on Jun 24, 2024

    @hayata-suenaga
    Contributor

    Melvin, we're just handling payments 😄

  20. johncschuster commented on Jun 24, 2024

    @johncschuster
    Contributor

    Ok! Thanks for confirming my understanding, @hayata-suenaga!

    Payment Summary:

    @rayane-djouah was originally paid in this issue
    @rushatgabhane was originally paid in this issue
    @bernhardoj needs to be compensated - $250 via Upwork - THIS HAS BEEN PAID

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions