You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-07-07] Home - Recently added section is shown for guest #94272
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
👋 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:
Identify the pull request that introduced this issue and revert it.
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?
Import the hook: import useIsAnonymousUser from '@hooks/useIsAnonymousUser';
Call it alongside the other hooks (e.g. after line 58): const isAnonymousUser = useIsAnonymousUser();
After all hooks and before the return at line 140, bail out early:
if(isAnonymousUser){returnnull;}
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.
Activity
applause-bot commentedon Jun 23, 2026
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
melvin-bot commentedon Jun 23, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #93451
melvin-bot commentedon Jun 23, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 23, 2026
👋 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:
MelvinBot commentedon Jun 23, 2026
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?
RecentlyAddedSectionis the only Home widget that unconditionally renders aWidgetContainer— it has no anonymous-user guard. HomePage delegates visibility to each widget (HomePage.tsx:68: "Widgets handle their own visibility and may return null…"), butRecentlyAddedSectionalways 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
nullfor guests —TimeSensitiveSectionalready foldsuseIsAnonymousUser()into its render guard (TimeSensitiveSection/index.tsx:66,141), andDiscoverSectionreturnsnullwhen 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, mirroringTimeSensitiveSection. Insrc/pages/home/RecentlyAddedSection/index.tsx:import useIsAnonymousUser from '@hooks/useIsAnonymousUser';const isAnonymousUser = useIsAnonymousUser();returnat line 140, bail out early:The early return must come after every hook call to respect the rules of hooks.
Optional hardening & verification
useRecentlyAddedDataruns asearch()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.tests/ui/RecentlyAddedSectionTest.tsxalready exists — add a case asserting the section rendersnullwhensession.authTokenType === CONST.AUTH_TOKEN_TYPES.ANONYMOUS.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.
[-]Home -Recently added section is shown for guest[/-][+]Home - Recently added section is shown for guest[/+]13 remaining items
melvin-bot commentedon Jul 2, 2026
@ZhenjaHorbach 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
melvin-bot commentedon Jul 3, 2026
@ZhenjaHorbach 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
melvin-bot commentedon Jul 3, 2026
@ZhenjaHorbach 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
ZhenjaHorbach commentedon Jul 3, 2026
@grgia
Let's close this!
melvin-bot commentedon Jul 6, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jul 6, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
ZhenjaHorbach commentedon Jul 7, 2026