Skip to content

[Home Page] - Discover section disappear after Employee open it #81173

Closed

Description

@jponikarchuk

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.3.11-17
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #80807
Email or phone of affected tester (no customers): applausetester+vq+010205@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Windows 11 / Chrome
App Component: Left Hand Navigation (LHN)

Action Performed:

Preconditions: Use the Expensifail account, and 1st device log in to a High Traffic Expensifail account, invite another user to be a member of the Workspace

  1. Open the NewDot app on a 2nd device
  2. Sign in with the member who was invited before
  3. Click on the Home tab
  4. Click on the Discover section
  5. Close the 2nd tab
  6. Switch to the Owner account on the 1st device
  7. Repeat the same step from 3 to 5

Expected Result:

The Discover section remains on the Home tab like the Owner and Admin accounts

Actual Result:

The Discover section disappears on the Employee side after opening

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @WojtekBoman

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 2, 2026
  2. melvin-bot commented on Feb 2, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #80807

  3. melvin-bot commented on Feb 2, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. melvin-bot commented on Feb 2, 2026

    @melvin-bot

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

  5. github-actions commented on Feb 2, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. OSBotify commented on Feb 2, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #80965 - "[Home Page] Remove Beta Gate for Release 1" by @WojtekBoman (High confidence)
    Related Issues: None found

    Recommendation: REVERT

    PR #80965 introduced a logic error in the DiscoverSection component that causes the section to disappear for Employee users when they open it.

    Labels: This is a frontend bug caused by an App PR. The DeployBlockerCash label should be KEPT (App deploy is blocked). If DeployBlocker is present, it should be removed.

    Detailed Analysis

    Evidence

    PR #80965 made changes to src/pages/home/DiscoverSection.tsx that introduced the bug:

    1. Created a local hasSeenTourSelector (lines 23-29) that returns true when the onboarding NVP is empty or undefined:
    function hasSeenTourSelector(onboarding: OnyxValue<typeof ONYXKEYS.NVP_ONBOARDING>): boolean | undefined {
        if (isEmptyObject(onboarding)) {
            return true;  // PROBLEM: Returns true for empty objects
        }
        return !!onboarding?.selfTourViewed;
    }
    1. Changed the default value from false to true (line 47):
    const [hasSeenTour = true] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector, canBeMissing: true});
    1. Returns null when hasSeenTour is true (lines 67-69):
    if (hasSeenTour) {
        return null;
    }

    Root Cause

    The local hasSeenTourSelector has inverted logic compared to the canonical selector in /src/selectors/Onboarding.ts. When an Employee user has not seen the tour:

    • Their onboarding NVP is empty or undefined
    • The local selector returns true (incorrectly indicating they HAVE seen the tour)
    • Combined with the default value of true, hasSeenTour becomes true
    • The component returns null, hiding the Discover section

    The comment in the code even reveals the misunderstanding: "This selector returns true if the user has seen the tour, or if the onboarding NVP is not loaded yet. Thanks to this, discover section does not disappear when the onboarding NVP is loaded."

    This logic is backwards - returning true for unloaded data causes the section to be hidden by default for users who should see it.

    Verification

    The canonical hasSeenTourSelector in /src/selectors/Onboarding.ts (lines 51-57) has the correct logic:

    function hasSeenTourSelector(onboarding: OnyxValue<typeof ONYXKEYS.NVP_ONBOARDING>): boolean | undefined {
        if (isEmptyObject(onboarding)) {
            return false;  // Correctly returns false for empty objects
        }
        return !!onboarding?.selfTourViewed;
    }

    The fix would be to either:

    • Use the canonical selector from /src/selectors/Onboarding.ts instead of the local one
    • Change the local selector to return false for empty objects and use false as the default value
  7. 6 remaining items

  8. mountiny commented on Feb 2, 2026

    @mountiny
    Contributor

    I think this does not have to be a blocker, but it should disappear in both cases. It can be a bit abrupt though, I wonder if we should leave some option to still see it just less profound @JmillsExpensify

  9. JmillsExpensify commented on Feb 2, 2026

    @JmillsExpensify
    Contributor

    Yeah, I'm actually of the opinion that we should just permanently show it for now. I think it's net good to have it around, especially with the upcoming training updates from Matt Moore.

  10. mountiny commented on Feb 2, 2026

    @mountiny
    Contributor

    Cool ok that makes sense, I think that that should work well

  11. JmillsExpensify commented on Feb 2, 2026

    @JmillsExpensify
    Contributor

    Cool, and if people want to dismiss it eventually, that's cool. We need the ability to dismiss, just like we had in Classic.

  12. WojtekBoman commented on Feb 4, 2026

    @WojtekBoman
    Contributor

    I'll take a look at it 👀

  13. added
    ReviewingHas a PR in review
    and removed on Feb 4, 2026
  14. changed the title [-]Home - Discover section disappear after Employee open it[/-] [+][Home Page] - Discover section disappear after Employee open it[/+] on Feb 5, 2026
  15. ZhenjaHorbach commented on Feb 11, 2026

    @ZhenjaHorbach
    Contributor

    @mountiny
    Let's close this issue!

  16. moved this from Backlog to Done in Home pageon Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions