--- name: dashboard description: How to work on the Volt dashboard (/Users/thierry/workspace/volt-dashboard), Stream's admin SPA, and its Agents section that talks to the acceleration router. Read before touching Volt or wiring a router change into it. --- # Volt dashboard Checkout: `/Users/thierry/workspace/volt-dashboard`. Not the same as this repo's `dashboard/` (Next.js); Volt is Stream's production dashboard and the Agents section is being added to it. Volt has its own rules. Read its `CLAUDE.md` and `.claude/rules/*.md` before editing, and use its `.claude/skills/` (`new-route`, `new-api-hook`, `gen-api`, ...) for routine work. ## Stack React 19, TypeScript 7, Vite, TanStack Router (file-based) + React Query, Tailwind 4, Radix/shadcn. **Bun only**, never npm. Tests: Vitest + Testing Library (MSW for HTTP), Playwright for e2e. The shell defaults to Node 19, which breaks `bun lint`, `bun dev` and Vitest. Prefix every Volt command with `nvm use 24 &&` (or `export PATH=~/.nvm/versions/node/v24.11.1/bin:$PATH`). ## Run it against a local router Full guide: `docs/local-agents/README.md`. Short version: ```bash # in Vision-Agents export VOLT_CHECKOUT=/Users/thierry/workspace/volt-dashboard docker compose -f compose.yaml -f "$VOLT_CHECKOUT/docs/local-agents/compose.volt.yaml" up -d --build router # in volt-dashboard (.env.local: HOST=local.getstream.io PORT=3011 AGENTS_ROUTER_URL=http://localhost:8080) bun dev ``` Open `https://local.getstream.io:3011/organization///agents/` (not `localhost`, or CORS/auth break). The override puts the router in `proxy` mode, so it reads the app and organization the dev proxy sets, with Volt's CORS origin. Rebuild the router after pulling router changes. Set `ROUTER_DEV_KEK` (single-quoted) and `ROUTER_PUBLIC_URL=http://localhost:8080` in the repo-root `.env`, which compose hands the router. Without the KEK no plugin client secret can be saved, and changing it leaves the stored ones unreadable. Local dev keeps the plain KEK in `ROUTER_DEV_KEK`: Cloud KMS (`ROUTER_AUTH_KMS_KEY`) is for hosted deployments, and the router refuses the two together. An `.env` that still sets `ROUTER_AUTH_KEK` is refused: rename it. ## How Agents is wired - Dev-only. `src/api/agents.ts` throws outside `import.meta.env.DEV`. - Browser calls `/__agents///v1/...`; `scripts/agents-dev-proxy.ts` (mounted in `vite.config.ts`) strips credentials, sets `X-Customer-Id` = app id, and forwards to `AGENTS_ROUTER_URL`. Configs under `examples` in the router won't show up; they live under the numeric app id. - Requests go through `agentRequest` / `agentQueryOptions` (`src/queries/agents/`). Don't call `fetch` directly. - Types: `src/types/agents.ts` re-exports from `src/gen/agents/` (generated). Never edit `src/gen/`. - Routes: `src/routes/organization/$orgId/$appId/agents/`. Components: `src/components/custom/agents/`. Helpers: `src/utils/agents/`. Nav: `src/constants/sidebars.tsx`. ## Picking a model Any field that picks an STT, TTS, LLM or other model uses the model picker, never a `