Skip to content

[Due for payment 2025-12-04] [$250] #admins - “Invite your team” deeplink redirects to Workspaces instead of Home #73345

Closed

Description

@vincdargento

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: v9.2.37-1
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/2219752/folder/13176924/test-cases/41237589
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Windows 11, Chrome | iPhone SE 3rd generation, Tahoe 26.0.1
App Component: Other

Action Performed:

  1. Go to https://staging.new.expensify.com.
  2. Sign up with a Gmail address (without a +).
  3. Select Manage my team's expenses > choose 1–10 employees > select QBO. Skip the remaining onboarding steps.
  4. Navigate to Workspaces and delete the current workspace.
  5. In the top right corner, click the magnifying glass icon.
  6. Search for the #admins room and click on it.
  7. In the task Invite your team, click the hyperlink labeled your .
  8. Click Go back to home page.

Expected Result:

The “Invite your team” deeplink should redirect the user to the Home screen, as the button states.

Actual Result:

The deeplink currently redirects to the Workspaces screen instead of Home.

This is inconsistent with other Concierge tasks: performing the same steps in similar tasks (e.g., “Connect to QuickBooks online”, “Connect to your corporate card”) correctly redirects the user to Home.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021983655206553715252
  • Upwork Job ID: 1983655206553715252
  • Last Price Increase: 2025-11-05
  • Automatic offers:
    • linhvovan29546 | Reviewer | 109470547
    • FitseTLT | Contributor | 109470549
Issue OwnerCurrent Issue Owner: @heyjennahay

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 23, 2025
  2. melvin-bot commented on Oct 23, 2025

    @melvin-bot

    Triggered auto assignment to @heyjennahay (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. abbasifaizan70 commented on Oct 23, 2025

    @abbasifaizan70
    Contributor

    Proposal: "Go back to home page" button redirects to Workspaces instead of Home

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

    When a user follows the "Invite your team" Concierge task deeplink after deleting their workspace, and then clicks the "Go back to home page" button on the resulting "Not Found" page, they are incorrectly redirected to the Workspaces screen instead of the Home screen.

    What is the root cause of that problem?

    The root cause is in the goBackFromInvalidPolicy() function in src/libs/PolicyUtils.ts (line 658-660).

    When a workspace-related page (like the workspace members page) cannot be accessed because the workspace doesn't exist or the user doesn't have permission, a "Not Found" view is displayed via the FullPageNotFoundView component in WorkspacePageWithSections.tsx (line 200-206). This view shows a button with the text "Go back to home page" (notFound.goBackHome translation key).

    The button's onLinkPress handler is set to goBackFromInvalidPolicy(), which currently navigates to the Workspaces list instead of Home:

    // src/libs/PolicyUtils.ts (line 658-660)
    function goBackFromInvalidPolicy() {
        Navigation.goBack(ROUTES.WORKSPACES_LIST.route);
    }

    This creates a mismatch between:

    • What the button says: "Go back to home page"
    • Where it actually goes: Workspaces list (/workspaces)

    The goBackFromInvalidPolicy() function is used in 47 locations across the codebase for all workspace "not found" scenarios, including:

    • WorkspacePageWithSections.tsx (used by all workspace pages)
    • WorkspaceInvitePage.tsx
    • WorkspaceOverviewPage.tsx
    • WorkspaceWorkflowsApprovalsEditPage.tsx
    • And many more workspace-related pages

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

    Update the goBackFromInvalidPolicy() function in src/libs/PolicyUtils.ts to navigate to ROUTES.HOME instead of ROUTES.WORKSPACES_LIST.route.

    Proposed Code Change:

    File: src/libs/PolicyUtils.ts

    function goBackFromInvalidPolicy() {
    -    Navigation.goBack(ROUTES.WORKSPACES_LIST.route);
    +    Navigation.goBack(ROUTES.HOME);
    }

    What alternative solutions did you explore?

    Alternative 1: Add a backTo parameter to WORKSPACE_MEMBERS route

    Instead of changing the global goBackFromInvalidPolicy() behavior, we could modify the workspaceMembersLink generation in src/libs/ReportUtils.ts (line 10827) to include a backTo parameter pointing to HOME:

    workspaceMembersLink: `${environmentURL}/${ROUTES.WORKSPACE_MEMBERS.getRoute(onboardingPolicyID)}?backTo=${encodeURIComponent(ROUTES.HOME)}`,

    Why this was rejected:

    • This would only fix the specific case of the "Invite your team" task
    • Wouldn't address the underlying inconsistency across all workspace pages
    • The button text says "Go back to home page" everywhere it appears, so it should navigate to Home everywhere, not just in this one scenario
    • More complex solution requiring changes to multiple route definitions

    Demo After Fix

    https://www.loom.com/share/6493eb1ccf02404ab36dbdd0e710e344?sid=242ad2d9-4369-49ba-81cc-6ec77fc3490a

  4. FitseTLT commented on Oct 23, 2025

    @FitseTLT
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-11-08 14:42:21 UTC.

    Proposal

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

    #admins - “Invite your team” deeplink redirects to Workspaces instead of Home

    What is the root cause of that problem?

    When the workspace page uses AccessOrNotFoundWrapper it is redirected to the more features for a deleted workspace

    Navigation.isNavigationReady().then(() => Navigation.goBack(ROUTES.WORKSPACE_MORE_FEATURES.getRoute(policyID)));

    and the More Features page will show not found page via AccessOrNotFoundWrapper whose onLinkPress navigates it to home
    onLinkPress = () => Navigation.goBackToHome(),

    but for invite your team we are navigated to members page and the FullPageNotFoundView of WorkspacePageWithSections onLinkPress goes back to WORKSPACES_LIST page
    onLinkPress={goBackFromInvalidPolicy}

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

    The expected behavior should be confirmed but to make the behavior consistent we have three options

    1. Apply AccessOrNotFoundWrapper for workspace pages we haven't implemented such as the WorkspaceMembersPage so that we will have a consistent behavior of redirecting to more features and also the back navigation.
    2. Only make the onLinkPress behavior consistent between the not found of WorkspacePageWithSections with AccessOrNotFoundWrapper to whichever of the two mechanisms that is acceptable.
    3. Change the copy of the link linkTranslationKey in WorkspacePageWithSections to align with the navigation to workspce list page.

    In addition to that, to make the go back consistent between the pages we can re-implement the logic here

    if (secondToLastRoute?.name === NAVIGATORS.REPORTS_SPLIT_NAVIGATOR) {
    Navigation.dismissModal();
    } else {
    Navigation.goBack(ROUTES.WORKSPACES_LIST.route);
    }

    on
    onBackButtonPress={() => Navigation.goBack(ROUTES.WORKSPACES_LIST.route)}

    so that the user is navigated back to previous page if they come from report page

    What alternative solutions did you explore? (Optional)

  5. melvin-bot commented on Oct 28, 2025

    @melvin-bot

    @heyjennahay Huh... This is 4 days overdue. Who can take care of this?

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 29, 2025
  7. changed the title [-]#admins - “Invite your team” deeplink redirects to Workspaces instead of Home[/-] [+][$250] #admins - “Invite your team” deeplink redirects to Workspaces instead of Home[/+] on Oct 29, 2025
  8. melvin-bot commented on Oct 29, 2025

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

    @melvin-bot

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

  11. 42 remaining items

  12. FitseTLT commented on Nov 18, 2025

    @FitseTLT
    Contributor

    PR will be ready tomorrow. Sorry for the delay.

  13. linhvovan29546 commented on Dec 1, 2025

    @linhvovan29546
    Contributor

    The PR has been deployed to production, the payment due date should be 2025-12-04
    #75732 (comment)

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed
    ReviewingHas a PR in review
    on Dec 1, 2025
  15. cristipaval commented on Dec 1, 2025

    @cristipaval
    Contributor

    Not overdue

  16. changed the title [-][$250] #admins - “Invite your team” deeplink redirects to Workspaces instead of Home[/-] [+][Due for payment 2025-12-04] [$250] #admins - “Invite your team” deeplink redirects to Workspaces instead of Home[/+] on Dec 1, 2025
  17. linhvovan29546 commented on Dec 3, 2025

    @linhvovan29546
    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: https://github.com/Expensify/App/pull/62849/files#r2584245571

    • [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

    Looks like we already have a regression test for this here: https://test-management.browserstack.com/projects/2219752/folder/13176924/test-cases/41237589, so I think we don’t need to create an additional one

    Do we agree 👍 or 👎

  18. heyjennahay commented on Dec 5, 2025

    @heyjennahay
    Contributor

    Payment summary:

    Both contracts and the job posting have been closed.

    Thanks everyone for your work ❤️

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.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions