DualMind_Admin-UI and is served by the Cloudflare Worker admin-dualmind at admin.dualmindlab.tech. Admins use it to watch the arena, manage models, providers and keys, moderate comparisons, votes and threads, manage users and send email.
The panel is being rebuilt as a React app in DualMind_Admin-UI pull request #4. This page describes the panel as it is in that pull request. Until it merges, production runs the older static panel.
Stack
Pages
Admin routes above are relative to
/api/admin. GET /api/health, GET /api/arena/model-stats and GET /api/settings/feature-flag/{key} are public routes at the API root. The full list, with request and response shapes, is in the admin API reference.
How it talks to the API
One API client handles every call: base URLserverUrl + /api/admin, the bearer token, JSON, a timeout per request and a single error type with codes network, timeout, unauthorized, forbidden, not_found, bad_request, server and api_error. PostgREST errors that the backend passes through as JSON strings are turned into readable messages.
Rules the panel follows
Always send the full record on PUT
Always send the full record on PUT
The backend’s
PUT handlers write every field of the DTO, so a missing field becomes null. Edit forms load the record and send all fields back. The Playwright test asserts this.Resolve names in the client
Resolve names in the client
Comparisons and votes return model and user IDs only. The panel loads models (up to 500) and users (up to 500) and maps IDs to names.
Full provider keys are visible to admins
Full provider keys are visible to admins
The key list returns
display_mask; the panel fetches GET /keys/{keyId} for the rows on screen to show the full key, with a per-browser Show full keys switch to turn that off.Only build what the API supports
Only build what the API supports
There are no admin routes for audit logs, exports, bulk actions, editing feature flags or filtering comparisons by date. The panel shows those as “not available yet” instead of faking them.
POST for votes, threads and messages exists in the API but isn’t exposed, so admins can’t invent arena data.Email goes through Supabase, not the API
Email goes through Supabase, not the API
The Email page calls the
send-admin-email Edge Function with { emails, subject, title, html } and the admin’s token, and shows { sent, failed }. The HTML preview renders in a sandboxed iframe.Run it locally
- Mock mode (no backend)
- Against a local API
- Tests
localhost, so it can’t be switched on in production.