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).
Context
PR #181 introduced
EmptyStateinorchestrator-ui/src/components/StateViews.tsxwithactionas an optional prop:The baseline-ui skill specifies: "MUST give empty states one clear next action."
Making
actionoptional at the type level means future feature screens can render anEmptyStatewith no action and pass type-checking, silently violating the baseline rule.What to do
Either:
actionrequired (action: ReactNode) — callers must supply one, even if it's just a navigation link; orconsole.warnwhenactionis undefined in dev modeThe 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).