feat: make demo mode data more realistic#731
Conversation
Expand mock data to closely mirror the production deployment: - Users: 6 → 15, with proxy-header auth format (github|<id>) - Groups: 5 → 8 (Engineering, Research, Support, etc.) - Models: 5 → 12 (Claude, GPT-4o, DeepSeek, Gemini, Llama, Qwen, embeddings, reranker) - Endpoints: 4 → 6 (Anthropic, OpenAI, self-hosted, embedding providers) - Transactions: 8 → 24, with realistic amounts and descriptions - API keys: 2 → 5 (CI/CD, batch processing, partner, dev, monitoring) - Requests: 10 → 500, with realistic token counts and latencies - Batches: updated model names to match new model aliases Key improvements: - Add model tariff/pricing data for all commercial models - Dynamic time-shifting so request timestamps never expire - Fix /admin/api/v1/requests handler to return AnalyticsEntry[] format (was returning raw DemoRequest objects under wrong key, causing empty request viewer) - Fix /admin/api/v1/requests/aggregate handler response types to match StatusCodeBreakdown[], ModelUsage[], TimeSeriesPoint[] (was returning wrong shapes, causing white screen crash) - Add React ErrorBoundary to App.tsx for better error visibility - Default demo user (Sarah Chen) has all roles for full UI exploration
|
🚅 Deployed to the control-layer-pr-731 environment in industrious-light
|
There was a problem hiding this comment.
Pull request overview
This PR significantly expands the demo mode mock data to better represent a production deployment. The changes make the demo data more realistic and fix critical bugs that were preventing the request viewer and analytics dashboard from working correctly.
Changes:
- Expanded mock data across all entities: users (6→15), groups (5→8), models (5→12), endpoints (4→6), API keys (2→5), and transactions (8→24)
- Added comprehensive model tariff/pricing data with standard and batch tiers for all commercial models
- Implemented dynamic time-shifting for request timestamps to keep demo data perpetually current
- Fixed request viewer by returning correct
ListAnalyticsResponseshape withentriesarray - Fixed analytics aggregate response to match
RequestsAggregateResponseinterface with properModelUsageandTimeSeriesPointtypes - Added React ErrorBoundary to App.tsx for better error visibility and recovery in demo mode
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dashboard/src/api/control-layer/mocks/users.json | Expanded from 6 to 15 users with realistic data including external IDs, varied roles, credit balances, and recent login timestamps |
| dashboard/src/api/control-layer/mocks/user-groups.json | Updated mappings to reflect new users and group memberships |
| dashboard/src/api/control-layer/mocks/groups.json | Expanded from 5 to 8 groups including partner access groups and specialized teams (Batch Processing, Embeddings) |
| dashboard/src/api/control-layer/mocks/models.json | Expanded from 5 to 12 models including additional providers (Gemini, more embeddings, reranker) with consistent metadata |
| dashboard/src/api/control-layer/mocks/models-groups.json | Updated model-to-group mappings for expanded dataset |
| dashboard/src/api/control-layer/mocks/transactions.json | Expanded from 8 to 24 transactions with more realistic amounts, descriptions, and varied transaction types |
| dashboard/src/api/control-layer/mocks/api-keys.json | Expanded from 2 to 5 keys with descriptive names and purposes |
| dashboard/src/api/control-layer/mocks/endpoints.json | Expanded from 4 to 6 endpoints representing diverse infrastructure (cloud, on-premise, burst capacity) |
| dashboard/src/api/control-layer/mocks/batches.json | Updated email addresses to match new user data |
| dashboard/src/api/control-layer/mocks/file-requests.json | Updated model references from deprecated models to current ones |
| dashboard/src/api/control-layer/mocks/handlers.ts | Added ModelTariff data, time-shifting logic, fixed request/analytics response shapes, updated config |
| dashboard/src/App.tsx | Added ErrorBoundary component for better error handling in demo mode |
- Cast usersData through unknown to handle avatar_url: null vs undefined - Add created and index signature to DemoRequest.response type
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 504fb118a6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Profile: email → sarah.chen@acme.com, avatar_url → null, username → github|109540503, toggle direction (now starts checked) - UsersGroups: same email and username updates - Endpoints: "Internal" → "vLLM - On-premise" - Playground: embedding-small → text-embedding-3-small
Address PR review comments: - Only show error message and stack trace in dev mode (import.meta.env.DEV), show generic message in production to avoid leaking internals - Replace & HTML entity with literal & in JSX button text
🤖 I have created a release *beep* *boop* --- ## [8.1.0](v8.0.1...v8.1.0) (2026-02-19) ### Features * make demo mode data more realistic ([#731](#731)) ([17aa9bf](17aa9bf)) ### Bug Fixes * advance to step 2 when manually configuring models in edit endpoint modal ([#728](#728)) ([fdcf360](fdcf360)) * omit Secure attribute from cookies when cookie_secure is false ([#730](#730)) ([e6f936e](e6f936e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Summary
Test plan
/— verify dashboard renders without white screen