Skip to content

feat: make demo mode data more realistic#731

Merged
fergusfinn merged 4 commits intomainfrom
feat/demo-mode-realistic-data
Feb 19, 2026
Merged

feat: make demo mode data more realistic#731
fergusfinn merged 4 commits intomainfrom
feat/demo-mode-realistic-data

Conversation

@fergusfinn
Copy link
Contributor

@fergusfinn fergusfinn commented Feb 18, 2026

Summary

  • Expand all mock data to be more 'prod-like'
  • Add model tariff/pricing data for all commercial models with standard + batch tiers
  • Dynamic time-shifting for request timestamps so the demo never expires
  • Fix request viewer (was empty due to handler returning wrong response shape) and analytics (white screen crash due to type mismatches in aggregate response)
  • Add React ErrorBoundary to App.tsx for better error visibility in demo mode

Test plan

  • Load demo mode at / — verify dashboard renders without white screen
  • Navigate to Analytics → Dashboard tab — verify charts and metrics display correctly (no NaN values)
  • Navigate to Analytics → Requests tab — verify request table is populated with entries showing model, status, duration, tokens, and cost columns
  • Filter requests by model using the dropdown — verify server-side filtering works
  • Check Models page — verify 12 models listed with pricing when expanded
  • Check Users page — verify 15 users with correct group memberships
  • Check Cost Management — verify transactions and balances display correctly

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
Copilot AI review requested due to automatic review settings February 18, 2026 16:46
@railway-app railway-app bot temporarily deployed to industrious-light / control-layer-pr-731 February 18, 2026 16:46 Destroyed
@railway-app
Copy link

railway-app bot commented Feb 18, 2026

🚅 Deployed to the control-layer-pr-731 environment in industrious-light

Service Status Web Updated (UTC)
control-layer ✅ Success (View Logs) Web Feb 19, 2026 at 10:18 am

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ListAnalyticsResponse shape with entries array
  • Fixed analytics aggregate response to match RequestsAggregateResponse interface with proper ModelUsage and TimeSeriesPoint types
  • 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
@railway-app railway-app bot temporarily deployed to industrious-light / control-layer-pr-731 February 18, 2026 16:51 Destroyed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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
@railway-app railway-app bot temporarily deployed to industrious-light / control-layer-pr-731 February 18, 2026 17:03 Destroyed
@fergusfinn fergusfinn changed the title feat: make demo mode data representative of production feat: make demo mode data more realistic Feb 19, 2026
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 &amp; HTML entity with literal & in JSX button text
@railway-app railway-app bot temporarily deployed to industrious-light / control-layer-pr-731 February 19, 2026 10:08 Destroyed
@fergusfinn fergusfinn merged commit 17aa9bf into main Feb 19, 2026
10 checks passed
fergusfinn pushed a commit that referenced this pull request Feb 19, 2026
🤖 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments