Skip to content

[HOLD for payment 2024-07-17] [$250] Inbox - The entire page blinks when clicking Inbox on Inbox page #43585

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: 1.4.82-0
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 staging.new.expensify.com
  2. On Inbox page, click Inbox icon
  3. Refresh the page
  4. Click Inbox

Expected Result:

The entire page will not blink

Actual Result:

The entire page blinks
This issue is not reproduced on Search and Account settings 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

Add any screenshot/video evidence

Bug6510872_1718200620155.20240612_215345.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f33295394aa2f176
  • Upwork Job ID: 1801707280294774711
  • Last Price Increase: 2024-06-21
  • Automatic offers:
    • alitoshmatov | Reviewer | 102890680
    • truph01 | Contributor | 102890682
Issue OwnerCurrent Issue Owner: @puneetlath

Activity

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

    @melvin-bot

    Triggered auto assignment to @puneetlath (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. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 14, 2024
  4. changed the title [-] Inbox - The entire page blinks when clicking Inbox on Inbox page[/-] [+][$250] Inbox - The entire page blinks when clicking Inbox on Inbox page[/+] on Jun 14, 2024
  5. melvin-bot commented on Jun 14, 2024

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

    @melvin-bot

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

  8. truph01 commented on Jun 15, 2024

    @truph01
    Contributor

    Proposal

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

    The entire page blinks
    This issue is not reproduced on Search and Account settings page

    What is the root cause of that problem?

    • When click on "Inbox" button, we call:

      const navigateToChats = useCallback(() => {
      const route = activeWorkspaceID ? (`/w/${activeWorkspaceID}/home` as Route) : ROUTES.HOME;
      Navigation.navigate(route);
      }, [activeWorkspaceID]);

    • In navigate function, this logic is called:

      const actionForBottomTabNavigator = getActionForBottomTabNavigator(action, rootState, policyID, shouldNavigate);
      if (!actionForBottomTabNavigator) {
      return;
      }

    • In expected, actionForBottomTabNavigator in above should be undefined, so the function will do nothing if user has already been in the /home page, but in this case, actionForBottomTabNavigator in not undefined.

    • So let's take a look at the getActionForBottomTabNavigator to find the RCA.

    • In getActionForBottomTabNavigator, we already have logic to do nothing if the current bottom tab is the same as the one we want to navigate to:

      // Check if the current bottom tab is the same as the one we want to navigate to. If it is, we don't need to do anything.
      const bottomTabCurrentTab = getTopmostBottomTabRoute(state);
      const bottomTabParams = bottomTabCurrentTab?.params as Record<string, string | undefined>;
      // Verify if the policyID is different than the one we are currently on. If it is, we need to navigate to the new policyID.
      const isNewPolicy = bottomTabParams?.policyID !== payloadParams?.policyID;
      if (bottomTabCurrentTab?.name === screen && !shouldNavigate && !isNewPolicy) {
      return;
      }

    • In this case, the expected is that isNewPolicy: false but actually, it is true because isNewPolicy = bottomTabParams?.policyID !== payloadParams?.policyID with bottomTabParams?.policyID: undefined and payloadParams?.policyID: '' (we can console.log in this line to see these values).

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

        const isNewPolicy = (!!bottomTabParams?.policyID || !!payloadParams?.policyID) &&  bottomTabParams?.policyID !== payloadParams?.policyID;
    

    What alternative solutions did you explore? (Optional)

  9. alitoshmatov commented on Jun 18, 2024

    @alitoshmatov
    Contributor

    @truph01 Thank you for your proposal, your RCA is correct and your solution does solve the problem. But this issue is also happening for search page, when you go to search page, refresh and then click on search page expenses list is refreshing and blinking. Ideally we should solve that too

  10. truph01 commented on Jun 18, 2024

    @truph01
    Contributor

    @alitoshmatov

    this issue is also happening for search page

    • It can be fixed with my alternative solution.
  11. 36 remaining items

  12. melvin-bot commented on Jul 10, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.5-13 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-07-17. 🎊

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

  13. melvin-bot commented on Jul 10, 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:

    • [@alitoshmatov] The PR that introduced the bug has been identified. Link to the PR:
    • [@alitoshmatov] 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:
    • [@alitoshmatov] 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:
    • [@alitoshmatov] Determine if we should create a regression test for this bug.
    • [@alitoshmatov] 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.
    • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  14. changed the title [-][HOLD for payment 2024-07-17] [$250] Inbox - The entire page blinks when clicking Inbox on Inbox page[/-] [+][HOLD for payment 2024-07-22] [HOLD for payment 2024-07-17] [$250] Inbox - The entire page blinks when clicking Inbox on Inbox page[/+] on Jul 15, 2024
  15. melvin-bot commented on Jul 15, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.6-8 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-07-22. 🎊

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

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

    • [@alitoshmatov] The PR that introduced the bug has been identified. Link to the PR:
    • [@alitoshmatov] 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:
    • [@alitoshmatov] 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:
    • [@alitoshmatov] Determine if we should create a regression test for this bug.
    • [@alitoshmatov] 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.
    • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. changed the title [-][HOLD for payment 2024-07-22] [HOLD for payment 2024-07-17] [$250] Inbox - The entire page blinks when clicking Inbox on Inbox page[/-] [+][HOLD for payment 2024-07-17] [$250] Inbox - The entire page blinks when clicking Inbox on Inbox page[/+] on Jul 16, 2024
  18. puneetlath commented on Jul 16, 2024

    @puneetlath
    Contributor

    @alitoshmatov friendly reminder about the checklist so we can pay tomorrow.

  19. puneetlath commented on Jul 17, 2024

    @puneetlath
    Contributor

    @truph01 has been paid. Still waiting on the checklist for @alitoshmatov.

  20. alitoshmatov commented on Jul 17, 2024

    @alitoshmatov
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: Fix chat navigation #42684
    • 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/42684/files#r1681312172
    • 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: No need
    • Determine if we should create a regression test for this bug. I don't think regression test is needed since it is pretty noticeable bug
  21. puneetlath commented on Jul 17, 2024

    @puneetlath
    Contributor

    All paid. Thanks everyone!

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