Skip to content

Add empty states for the portfolio table and the action queue #19

Description

@ocularminds

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions