Skip to content

[Due for payment 2026-03-30] [$250] Navigate to non-existing link - Inbox opens upon clicking on "Go back to home page" #85222

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: 9.3.37-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2241336/folder/13646992/test-cases/41909507
Email or phone of affected tester (no customers): undefined
Issue reported by: Applause Internal Team
Device used: MacOS Sequoia 15.7.2, Chrome

Action Performed:

  1. Navigate to https://staging.new.expensify.com/anything
  2. Verify a page not found is displayed
  3. Click on the "Go back to home page" hyperlink
  4. Desktop/web - Verify that you're redirected to NewDot home view

Expected Result:

Upon clicking on the "Go back to home page" hyperlink, the user is redirected to the home page.

Actual Result:

Upon clicking on the "Go back to home page" hyperlink, the user is redirected to the Inbox with one of the chats opened

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7083545_1771595986677.TC-4962.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022032425186913195348
  • Upwork Job ID: 2032425186913195348
  • Last Price Increase: 2026-03-13

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 13, 2026
  2. MelvinBot commented on Mar 13, 2026

    @MelvinBot
    Contributor

    Proposal

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

    When navigating to a non-existing URL (e.g., /anything), the app correctly shows a "Page not found" screen. However, clicking the "Go back to home page" link navigates to the Inbox with a chat opened, instead of the actual Home page (dashboard).

    What is the root cause of that problem?

    The "Go back to home page" link in FullPageNotFoundView defaults its onLinkPress to Navigation.goBackToHome() (FullPageNotFoundView.tsx:78).

    goBackToHome() calls goBack(ROUTES.INBOX) (Navigation.ts:551-564), which navigates to the REPORTS_SPLIT_NAVIGATOR (the chat list + report view). When this navigator mounts, ReportsSplitNavigator automatically opens the last accessed report via findLastAccessedReport() — which is why the user sees the Inbox with a chat open.

    The app has two distinct routes: ROUTES.HOME ('home') for the actual Home dashboard (HomePage.tsx with TimeSensitive, ForYou, Discover sections), and ROUTES.INBOX ('inbox') for the chat/report list. These are separate tabs (NAVIGATION_TABS.HOME vs NAVIGATION_TABS.INBOX). The goBackToHome() function navigates to ROUTES.INBOX, not ROUTES.HOME — a naming mismatch likely from before the Home dashboard page existed as a separate screen.

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

    Override the onLinkPress in the NotFoundPage component to navigate to ROUTES.HOME instead of relying on the default Navigation.goBackToHome() which goes to INBOX. Specifically, pass a custom onLinkPress prop from NotFoundPage to FullPageNotFoundView that navigates to the Home tab (e.g., using Navigation.navigate(ROUTES.HOME)).

    This approach is scoped to the NotFound page and avoids changing the goBackToHome() function itself, which may be intentionally used elsewhere to navigate to the Inbox.

    What alternative solutions did you explore? (Optional)

    1. Change goBackToHome() globally to navigate to ROUTES.HOME instead of ROUTES.INBOX — this would fix NotFoundPage but could break other callers that intentionally expect Inbox navigation.
    2. Rename goBackToHome() to goBackToInbox() and create a new goBackToHome() that navigates to ROUTES.HOME — more comprehensive refactor but higher risk.

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 13, 2026
  4. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 13, 2026
  5. melvin-bot commented on Mar 13, 2026

    @melvin-bot

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

  6. melvin-bot commented on Mar 13, 2026

    @melvin-bot
  7. changed the title [-]Navigate to non-existing link - Inbox opens upon clicking on "Go back to home page"[/-] [+][$250] Navigate to non-existing link - Inbox opens upon clicking on "Go back to home page"[/+] on Mar 13, 2026
  8. Eskalifer1 commented on Mar 13, 2026

    @Eskalifer1
    Contributor

    Proposal

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

    Navigate to non-existing link - Inbox opens upon clicking on "Go back to home page"

    What is the root cause of that problem?

    Right now, we're navigating to the Inbox page here:

    onLinkPress = () => Navigation.goBackToHome(),

    /**
    * The goBack function doesn't support recursive pop e.g. pop route from root and then from nested navigator.
    * There is only one case where recursive pop is needed which is going back to home.
    * This function will cover this case.
    * We will implement recursive pop if more use cases will appear.
    */
    function goBackToHome() {
    const isNarrowLayout = getIsNarrowLayout();
    // This set the right split navigator.
    goBack(ROUTES.INBOX);
    // We want to keep the report screen in the split navigator on wide layout.
    if (!isNarrowLayout) {
    return;
    }
    // This set the right route in this split navigator.
    goBack(ROUTES.INBOX);
    }

    But now our main page is HOME, not INBOX.

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

    I think there need to be a few more changes here to get this logic right, but we can ask the product team about that.

    My main idea is to create a new function, similar to goBackToHome, which will redirect not to the Inbox, but to the HOME page. Or, instead of creating a new function, we could add a parameter to the existing one, and depending on the parameter, navigate to the desired page:

    function goBackToHome(shouldRedirectToHome = true) {
        const isNarrowLayout = getIsNarrowLayout();
    
        // This set the right split navigator.
        goBack(shouldRedirectToHome ? ROUTES.HOME : ROUTES.INBOX);
    
        // We want to keep the report screen in the split navigator on wide layout.
        if (!isNarrowLayout) {
            return;
        }
    
        // This set the right route in this split navigator.
        goBack(shouldRedirectToHome ? ROUTES.HOME : ROUTES.INBOX);
    }

    We’ll also need to review all pages that use FullPageNotFoundView, and those used on chat-related pages should redirect to the INBOX rather than the HOME page—this is the current logic. For such pages, we can pass a separate parameter (for example, shouldRedirectToHome = false), and then pass this parameter to goBackToHome. As a result, most pages that use FullPageNotFoundView will lead to HOME, while those used on chat pages will lead to INBOX.

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  9. 30 remaining items

  10. melvin-bot commented on Mar 23, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-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 2026-03-30. 🎊

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

    • @truph01 requires payment through NewDot Manual Requests
  11. melvin-bot commented on Mar 23, 2026

    @melvin-bot

    @truph01 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  12. melvin-bot commented on Mar 23, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  13. melvin-bot commented on Mar 30, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    • Reviewer: @truph01 owed $250 via NewDot

    BugZero Checklist (@mallenexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/2032425186913195348/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  14. truph01 commented on Mar 30, 2026

    @truph01
    Contributor

    BugZero Checklist:

    • [Contributor] 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:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    1. Navigate to a non-existing URL (e.g., https://dev.new.expensify.com:8082/anything)
    2. Verify the "Page not found" screen appears with "Go back to home page" link
    3. Click the "Go back to home page" link
    4. Verify you land on the Home dashboard (URL shows /home, page shows "Home" heading with Time sensitive, For you, Discover sections) — NOT the Inbox with a chat open

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-7a94-a43a-af3b-a8ae53466c44
  15. melvin-bot commented on Mar 30, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    • Reviewer: @truph01 owed $250 via NewDot

    BugZero Checklist (@mallenexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/2032425186913195348/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  16. mallenexpensify commented on Mar 31, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @truph01 due $250 via NewDot

  17. garrettmknight commented on May 10, 2026

    @garrettmknight
    Contributor

    $250 approved for @truph01

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