Skip to content

[HOLD for payment 2024-08-19] [$250] Track - Self-DM chat appears briefly when track expense from FAB #46674

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!


Version Number: 9.0.15-1
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

Action Performed:

  1. Go to FAB> Track expense> Finish the flow
  2. Go to self-DM chat> Select Do nothing from actionable whispers
  3. Open any other chat
  4. Go back to FAB> Track Expense

Expected Result:

Self-DM chat should not appears when select option to track expense

Actual Result:

Self-DM chat appears briefly when track expense from FAB even other chat was open before this action

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

Bug6558934_1722496514437.Recording__3629.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0184fba06192689bb7
  • Upwork Job ID: 1819379087245531554
  • Last Price Increase: 2024-08-02
  • Automatic offers:
    • c3024 | Reviewer | 103403398
Issue OwnerCurrent Issue Owner: @isabelastisser / @isabelastisser

Activity

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

    @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. lanitochka17 commented on Aug 1, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #vip-vsp

  4. lanitochka17 commented on Aug 1, 2024

    @lanitochka17
    Author

    @OfstadC FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  5. OfstadC commented on Aug 1, 2024

    @OfstadC
    Contributor

    Didn't get to this today. Reassigning as i'm out tomorrow and Monday. Happy to take back on Tuesday if no forward movement before then

  6. removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 1, 2024
  7. removed their assignment
    on Aug 1, 2024
  8. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 1, 2024
  9. melvin-bot commented on Aug 1, 2024

    @melvin-bot

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

  10. bernhardoj commented on Aug 2, 2024

    @bernhardoj
    Contributor

    Proposal

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

    The self DM shows briefly when open track expense.

    What is the root cause of that problem?

    The self DM shows because the matching route here for the track expense page is the self DM report.

    let matchingRootRoute = getMatchingRootRouteForRHPRoute(focusedRHPRoute);

    It checks the screen params and if reportID is found and valid, then the report is returned.

    const reportID = (route.params as Record<string, string | undefined>)?.reportID;
    if (ReportConnection.getAllReports()?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]) {
    return {name: SCREENS.REPORT, params: {reportID}};
    }

    Track expense page reportID params is the self DM reportID. Because the matching route is found, we push it to the adapted routes,

    if (matchingRootRoute && (!isNarrowLayout || !isRHPScreenOpenedFromLHN)) {
    routes.push(matchingRootRoute);
    }

    which will be later used if isCentralPaneAndBottomTabMandatory or isFullScreenNavigatorMandatory is true, which is true in our case.

    const {adaptedState, metainfo} = getAdaptedStateFromPath(path, linkingConfig.config);
    if (adaptedState && (metainfo.isCentralPaneAndBottomTabMandatory || metainfo.isFullScreenNavigatorMandatory)) {
    const diff = getPartialStateDiff(rootState, adaptedState as State<RootStackParamList>, metainfo);
    const diffActions = getActionsFromPartialDiff(diff);
    for (const diffAction of diffActions) {
    root.dispatch(diffAction);
    }
    }

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

    We can include the money request screen in RHP_SCREENS_OPENED_FROM_LHN list so it won't be added to the stack when navigating to the money request page, including track expense.

    const isRHPScreenOpenedFromLHN = focusedRHPRoute?.name && RHP_SCREENS_OPENED_FROM_LHN.includes(focusedRHPRoute?.name as RHPScreenOpenedFromLHN);
    // This may happen if this RHP doens't have a route that should be under the overlay defined.
    if (!matchingRootRoute || isRHPScreenOpenedFromLHN) {
    metainfo.isCentralPaneAndBottomTabMandatory = false;
    metainfo.isFullScreenNavigatorMandatory = false;

    if (matchingRootRoute && (!isNarrowLayout || !isRHPScreenOpenedFromLHN)) {
    routes.push(matchingRootRoute);
    }

    const RHP_SCREENS_OPENED_FROM_LHN = [SCREENS.MONEY_REQUEST.CREATE, ...];
    
  11. github-actions commented on Aug 2, 2024

    @github-actions
    Contributor

    true

  12. isabelastisser commented on Aug 2, 2024

    @isabelastisser
    Contributor

    #vip-vsb status.

  13. 21 remaining items

  14. melvin-bot commented on Aug 12, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  15. melvin-bot commented on Aug 12, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.18-10 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-08-19. 🎊

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

  16. melvin-bot commented on Aug 12, 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:

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

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

    • [@c3024] The PR that introduced the bug has been identified. Link to the PR: Ideal nav v2 workspaces #37421
    • [@c3024] 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/37421/files#r1721237982
    • [@c3024] 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: I don't think this bug could not have been identified earlier so no discussion was started.
    • [@c3024] Determine if we should create a regression test for this bug. Yes
    • [@c3024] 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.

    Regression Test Proposal

    1. Press FAB > Track Expense
    2. Press Back
    3. Verify that the self-DM page does not appear
  18. isabelastisser commented on Aug 19, 2024

    @isabelastisser
    Contributor

    @puneetlath do you agree with the regression test proposal?

  19. bernhardoj commented on Aug 20, 2024

    @bernhardoj
    Contributor

    Requested in ND.

  20. isabelastisser commented on Aug 20, 2024

    @isabelastisser
    Contributor

    Payment summary:

    $250 to @c3024 for C+ review. Paid in Upwork.
    $250 to @bernhardoj for proposal. Requested in ND, PENDING.

  21. isabelastisser commented on Aug 20, 2024

    @isabelastisser
    Contributor

    All set!

  22. JmillsExpensify commented on Aug 21, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

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