What
Nothing in components/ branches on an empty collection — there is no length === 0 check anywhere. When the portfolio or the opportunity queue comes back empty, the UI renders:
- a table with headers and no rows, or
- a section heading ("What needs a decision now") followed by nothing.
An operator cannot tell whether that means "nothing needs attention" or "something failed to load". On a screen used to decide whether customer accounts need intervention, those two readings are very different, and the reassuring one is not the safe default.
Where
components/dashboard/AccountPortfolioTable.tsx — empty accounts
components/dashboard/OpportunityQueue.tsx — empty opportunities
components/account/AccountEvidence.tsx and AccountTimeline.tsx are worth a look too
Suggested change
Render a short, explicit message in place of the empty list. Say what the emptiness means, not just that it is empty — "No accounts currently require review" reads very differently from "No data".
A genuine error is already handled separately by app/error.tsx, so the empty state can confidently mean "we asked, and the answer was none".
Good to know
pnpm dev runs on demo fixtures, which are never empty — the quickest way to see the empty case is to temporarily filter the array in the component, or add a test.
- Prefer a test over manual checking:
components/dashboard/AccountPortfolioTable.test.tsx shows the pattern.
pnpm verify is the gate. Setup is in CONTRIBUTING.md.
What
Nothing in
components/branches on an empty collection — there is nolength === 0check anywhere. When the portfolio or the opportunity queue comes back empty, the UI renders:An operator cannot tell whether that means "nothing needs attention" or "something failed to load". On a screen used to decide whether customer accounts need intervention, those two readings are very different, and the reassuring one is not the safe default.
Where
components/dashboard/AccountPortfolioTable.tsx— emptyaccountscomponents/dashboard/OpportunityQueue.tsx— emptyopportunitiescomponents/account/AccountEvidence.tsxandAccountTimeline.tsxare worth a look tooSuggested change
Render a short, explicit message in place of the empty list. Say what the emptiness means, not just that it is empty — "No accounts currently require review" reads very differently from "No data".
A genuine error is already handled separately by
app/error.tsx, so the empty state can confidently mean "we asked, and the answer was none".Good to know
pnpm devruns on demo fixtures, which are never empty — the quickest way to see the empty case is to temporarily filter the array in the component, or add a test.components/dashboard/AccountPortfolioTable.test.tsxshows the pattern.pnpm verifyis the gate. Setup is in CONTRIBUTING.md.