# Polyform dashboard

A responsive React/TypeScript control room for the combinatorial ZIP experiment. It uses the FastAPI control plane when available and clearly labeled representative data when it is not, so the full failure-localization workflow remains explorable.

## Run locally

```bash
npm install
npm run dev
```

Vite proxies `/api` to `http://127.0.0.1:8000` during local development. Set `VITE_API_BASE_URL` to the origin of a remote FastAPI service. The app appends `/api/v1` itself.

## FastAPI contract

The dashboard reads:

- `GET /api/v1/dashboard/summary`
- `GET /api/v1/telemetry?limit=50`
- `PUT /api/v1/implementations/{implementation_id}/status` with `{ "status": "quarantined", "reason": "…" }`

The summary endpoint supplies population counts, per-function implementation counts, theoretical composition count, telemetry and execution totals, active variant distribution, implementation statistics, pairwise interactions, quarantines, recompositions, quarantine effects, composition history, and failure timeline. The adapter in `src/api.ts` translates those service fields to presentation types and converts fractional rates to percentages.

## Verify

```bash
npm test
npm run build
```
