Skip to content

[Due for payment 2026-07-28] Home - Empty For You section is only hidden after creating a workspace #95865

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: 9.4.33-0
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: #94698
Email or phone of affected tester (no customers): oijnsodjosjdojoijsid@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Other

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a new Gmail account.
  3. Complete onboarding with Something else intent.
  4. Go to Home.
    → For You section is shown when it is empty.
  5. Create a workspace.
  6. Go to Home.
    → Empty For You section is only hidden after creating a workspace.

Expected Result:

In Step 4, Empty For You section will be hidden when there is no workspace.

Actual Result:

In Step 4, For You section is shown when it is empty when there is no workspace.
In Stpe 6, Empty For You section is only hidden after creating a workspace.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Video.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 10, 2026
  2. melvin-bot commented on Jul 10, 2026

    @melvin-bot

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

  3. melvin-bot commented on Jul 10, 2026

    @melvin-bot

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

  4. github-actions commented on Jul 10, 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.
  5. OSBotify commented on Jul 10, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug (App repo)
    Causing PR: #94698 - "[Home Page] Getting Started - Hide empty for you" by @adamgrzybowski (High confidence)
    Related Issues: N/A

    Recommendation: ROLL FORWARD

    The bug is an isolated logic error in the brand-new shouldHideForYouSection decision function introduced by #94698; a small targeted fix (correctly handling a completed-onboarding new user who has no free-trial NVP yet) is simpler and lower risk than reverting the whole feature. REVERT is a clean fallback since the feature is self-contained in the ForYouSection module.

    Assigned: @adamgrzybowski (PR author), @ZhenjaHorbach and @grgia (approving reviewers) from #94698
    Labels: No changes. Kept DeployBlockerCash (App deploy is correctly blocked for a frontend bug). No DeployBlocker label was present. Note: DeployBlockerCash must stay because there is an App PR that caused this.

    📋 Detailed Analysis

    Evidence

    Verification

    • Affected file: src/pages/home/ForYouSection/shouldHideForYouSection.ts (decision logic) and its consumer src/pages/home/ForYouSection/index.tsx.
    • Confirmed [Home Page] Getting Started - Hide empty for you #94698's changed-files list includes both shouldHideForYouSection.ts and ForYouSection/index.tsx, plus the accompanying test tests/unit/pages/home/ForYouSection/shouldHideForYouSectionTest.ts.
    • The test file explicitly encodes the faulty assumption — it('keeps the section when the trial start date is missing') asserts firstDayFreeTrial: undefined → returns false (show).

    Root Cause

    Tracing shouldHideForYouSection for the exact repro (new Gmail user, onboarding completed with "Something else", no workspace, no to-dos, not initial load):

    1. hasAnyTodos || hasSeenTodo → false (empty), skip
    2. isOnboardingCompleted === false → false (onboarding is complete), skip
    3. isInitialLoad → false, skip
    4. !firstDayFreeTrial → true, so it return false → section is shown even though empty ← BUG

    nvp_private_firstDayFreeTrial is the workspace owner's free-trial start date. A brand-new user with no workspace has no free trial, so the NVP is undefined. The code treats a missing trial date as "old user, keep the section visible," but a completed-onboarding new user with no workspace should be treated as a new user and have the empty section hidden.

    This also explains the second half of the report: after the user creates a workspace, the backend sets nvp_private_firstDayFreeTrial to the current date (on/after the 2026-06-26 cutoff), so the function reaches the final branch trialStartMs >= cutoffMs → returns true → the empty section is correctly hidden.

    Suggested roll-forward fix: in the "no trial date" branch, do not unconditionally show the section for users who have completed onboarding but have no free-trial NVP yet (i.e., new users without a workspace) — treat them as new users so the empty section stays hidden until they have an actionable to-do.

  6. MelvinBot commented on Jul 10, 2026

    @MelvinBot
    Contributor

    Proposal

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

    A newly onboarded user (e.g. "Something else" intent, no workspace yet) sees the empty "For You" section on Home. It should stay hidden for new users until they have a real to-do. Oddly, it only becomes hidden after the user creates a workspace.

    What is the root cause of that problem?

    shouldHideForYouSection uses the free-trial start date (nvp_private_firstDayFreeTrial) as its "new vs. old user" discriminator, but that NVP is only set when a workspace is created, not at account creation or onboarding.

    For a user who just finished onboarding with no workspace:

    This exactly explains the "hidden only after creating a workspace" symptom: creating a workspace sets firstDayFreeTrial to the current date (Policy.ts:5941-5945), which is >= FOR_YOU_NEW_USER_CUTOFF_DATE (2026-06-26), so the final date check returns true and hides it.

    The function's own doc comment names only two "new user" cases — "still onboarding, or free-trial start on/after the cutoff" — and misses the gap: onboarding complete but no workspace/free-trial yet. The !firstDayFreeTrial fallback assumes "no trial ⇒ old user", which is wrong for a brand-new account.

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

    The !firstDayFreeTrial branch needs a way to tell a genuinely new NewDot account (no trial yet) apart from an old/migrated account. The natural signal is the onboarding record itself: old/migrated accounts have an empty onboarding NVP (selector treats empty as "old"), whereas a NewDot-onboarded user has a non-empty record.

    Pass a new-user signal (e.g. isNewDotOnboardedUser = onboarding NVP is a non-empty object) into shouldHideForYouSection, and change the fallback so that when firstDayFreeTrial is undefined it hides for new NewDot accounts and keeps showing for old/migrated accounts:

    if (!firstDayFreeTrial) {
        return isNewDotOnboardedUser; // hide for new users, show for old/migrated
    }

    The signal is available in ForYouSection/index.tsx (already reads NVP_ONBOARDING). Add unit coverage in shouldHideForYouSectionTest.ts for the "onboarding complete, no free trial" case.

    What alternative solutions did you explore?

    • Set firstDayFreeTrial at account creation — too broad; that NVP drives billing/free-trial logic across SubscriptionUtils and shouldn't be repurposed.
    • Use account creation date if a reliable NVP exists — viable, but the onboarding-record signal is already loaded here and directly matches the existing new/old split.
    Confidence & verification

    High confidence. Code trace is complete and accounts for every step of the reproduction, including why the section flips to hidden after workspace creation. Root cause is fully within Expensify/App (frontend logic in shouldHideForYouSection.ts), introduced by #94698.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/95865) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. flaviadefaria commented on Jul 13, 2026

    @flaviadefaria
    Contributor

    I don't think this needs to be a deploy blocker, but @adamgrzybowski @ZhenjaHorbach, let's fix it as soon as we can.

  8. 12 remaining items

  9. melvin-bot commented on Jul 21, 2026

    @melvin-bot

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

  10. melvin-bot commented on Jul 21, 2026

    @melvin-bot

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

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

  11. melvin-bot commented on Jul 21, 2026

    @melvin-bot

    @ZhenjaHorbach 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]. If no checklist is needed for this issue, you can click: [no checklist button]

  12. melvin-bot commented on Jul 24, 2026

    @melvin-bot

    @ZhenjaHorbach Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  13. ZhenjaHorbach commented on Jul 27, 2026

    @ZhenjaHorbach
    Contributor

    @grgia
    Let's close this!

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Jul 27, 2026
  15. melvin-bot commented on Jul 27, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  16. melvin-bot commented on Jul 27, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • 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//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
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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions