# ISIS v2 WS11-005: Advanced Creative Empty/Loading/Error States

## Scope

`WS11-005` upgrades generic UI states into creative-production-aware states for:

- loading progress,
- empty workspace conditions,
- recovery-oriented error handling.

## Research and Existing Implementation Alignment

Implementation is based on:

- existing ISIS state components:
  `apps/isis/web/src/components/IsisLoadingState.tsx`,
  `apps/isis/web/src/components/IsisEmptyState.tsx`,
  `apps/isis/web/src/components/IsisErrorState.tsx`
- core creative pages: `DashboardPage`, `WorkflowsPage`, `JobsPage`,
  `OutputsPage`
- WS11 design objectives for production ergonomics and recoverability.

## Deliverables

1. Enhanced `IsisLoadingState`:

- supports phase metadata (`phaseLabel`, `etaText`),
- supports creative milestones (`milestones[]`) for stage visibility.

2. Enhanced `IsisEmptyState`:

- supports creative next-step checklists (`nextSteps[]`),
- supports primary/secondary call-to-action buttons.

3. Enhanced `IsisErrorState`:

- supports recovery runbook snippets (`recoverySteps[]`),
- supports escalation guidance (`escalationNote`).

4. Added advanced state styling primitives:

- metadata chips, milestone lists, recovery lists, escalation blocks,
- action button variants for empty-state remediation flows.

5. Integrated tailored states into primary creative surfaces:

- `DashboardPage`: service-health probe milestones and outage recovery.
- `WorkflowsPage`: catalog hydration, capability validation, filter recovery.
- `JobsPage`: queue sync, sequence review, action-recovery guidance.
- `OutputsPage`: registry/provenance/lineage/policy lifecycle guidance.

6. Added focused component tests:

- `apps/isis/web/src/components/IsisLoadingState.spec.tsx`
- `apps/isis/web/src/components/IsisEmptyState.spec.tsx`

## Verification Commands

```bash
pnpm --filter @isis/web exec vitest run src/components/IsisLoadingState.spec.tsx src/components/IsisEmptyState.spec.tsx src/components/AppLayout.spec.tsx src/components/CreativeWorkflowFrame.spec.tsx --reporter=dot
pnpm --filter @isis/web run typecheck
node scripts/isis/generate-remediation-backlog-v2.mjs
node scripts/isis/validate-v2-compliance-gate.mjs
```

## Verification Notes

- Targeted advanced-state and layout tests pass.
- Workspace typecheck remains red due pre-existing unrelated typing/rootDir
  issues currently present in repository baseline.
