Skip to content

Make EmptyState.action required (or typed as ReactNode with stub) to enforce baseline-ui MUST rule #185

Description

@Ryan-Atkinson87

Context

PR #181 introduced EmptyState in orchestrator-ui/src/components/StateViews.tsx with action as an optional prop:

export function EmptyState({
  message,
  action,
  className,
}: {
  message: string;
  action?: ReactNode;
  className?: string;
})

The baseline-ui skill specifies: "MUST give empty states one clear next action."

Making action optional at the type level means future feature screens can render an EmptyState with no action and pass type-checking, silently violating the baseline rule.

What to do

Either:

  • Make action required (action: ReactNode) — callers must supply one, even if it's just a navigation link; or
  • Keep it optional but add a runtime console.warn when action is undefined in dev mode

The first option is preferred — it enforces the rule at the type level without any runtime overhead.

Non-blocking — no existing callers are affected (none yet in feature screens #61#68).

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreInfrastructure, tooling, or config work

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions