Skip to content

[Due for payment 2026-07-07] Home - Recently added section is shown for guest #94272

Closed

Description

@applause-bot

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

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log out if logged in.
  3. Go to public room - https://staging.new.expensify.com/r/6468516573195918
  4. Go to Home.

Expected Result:

Recently added section will be hidden for guest.

Actual Result:

Recently added section is shown for guest.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Image

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7188119

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

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

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/fe6ae85edbeaaac5123bac585d0dac2d3e641f8adb9ff35902b77125bb952559

  3. melvin-bot commented on Jun 23, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jun 23, 2026

    @melvin-bot

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

  5. github-actions commented on Jun 23, 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. MelvinBot commented on Jun 23, 2026

    @MelvinBot
    Contributor

    Proposal

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

    The "Recently added" slot on Home (added in #93451) renders for logged-out / anonymous guests visiting a public room, showing its title + empty state. It should be hidden for guests like the other Home widgets.

    What is the root cause of that problem?

    RecentlyAddedSection is the only Home widget that unconditionally renders a WidgetContainer — it has no anonymous-user guard. HomePage delegates visibility to each widget (HomePage.tsx:68: "Widgets handle their own visibility and may return null…"), but RecentlyAddedSection always returns its container, falling back to <EmptyState /> when there are no expenses (RecentlyAddedSection/index.tsx:140-184). A guest has no expenses, so the empty state leaks through.

    By contrast, the sibling widgets gate themselves and return null for guests — TimeSensitiveSection already folds useIsAnonymousUser() into its render guard (TimeSensitiveSection/index.tsx:66,141), and DiscoverSection returns null when its onboarding data is absent.

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

    Add the existing anonymous-user guard to RecentlyAddedSection, mirroring TimeSensitiveSection. In src/pages/home/RecentlyAddedSection/index.tsx:

    1. Import the hook: import useIsAnonymousUser from '@hooks/useIsAnonymousUser';
    2. Call it alongside the other hooks (e.g. after line 58): const isAnonymousUser = useIsAnonymousUser();
    3. After all hooks and before the return at line 140, bail out early:
      if (isAnonymousUser) {
          return null;
      }

    The early return must come after every hook call to respect the rules of hooks.

    Optional hardening & verification
    • Avoid the guest search request: useRecentlyAddedData runs a search() regardless of session (useRecentlyAddedData.ts). The early return above won't stop that hook (it runs before the return). If we also want to skip the search for guests, gate the fire-search effect on !isAnonymousUser. This is an enhancement, not required to fix the visibility bug.
    • Test: tests/ui/RecentlyAddedSectionTest.tsx already exists — add a case asserting the section renders null when session.authTokenType === CONST.AUTH_TOKEN_TYPES.ANONYMOUS.
    • Confidence: High. Deterministic rendering bug, visible in code; no production logs needed.

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

  7. changed the title [-]Home -Recently added section is shown for guest[/-] [+]Home - Recently added section is shown for guest[/+] on Jun 23, 2026
  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jun 23, 2026
  9. 13 remaining items

  10. moved this from Backlog to Done in Home pageon Jul 2, 2026
  11. melvin-bot commented on Jul 2, 2026

    @melvin-bot

    @ZhenjaHorbach 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

  12. melvin-bot commented on Jul 3, 2026

    @melvin-bot

    @ZhenjaHorbach 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

  13. melvin-bot commented on Jul 3, 2026

    @melvin-bot

    @ZhenjaHorbach 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

  14. ZhenjaHorbach commented on Jul 3, 2026

    @ZhenjaHorbach
    Contributor

    @grgia
    Let's close this!

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

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  17. melvin-bot commented on Jul 6, 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
  18. ZhenjaHorbach commented on Jul 7, 2026

    @ZhenjaHorbach
    Contributor

    @grgia Let's close this!

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