Skip to content

refactor(studio): rename Studio frontend benchmark → project (3/4)#1244

Merged
christso merged 1 commit into
mainfrom
refactor/rename-pr3-studio
May 15, 2026
Merged

refactor(studio): rename Studio frontend benchmark → project (3/4)#1244
christso merged 1 commit into
mainfrom
refactor/rename-pr3-studio

Conversation

@christso
Copy link
Copy Markdown
Collaborator

Summary

PR 3 of 4 in the benchmark → project rename. Stacks on #1243 (PR 2). Updates the Studio web UI to match the new wire format.

Renames

  • Routes (TanStack file-routes): `apps/studio/src/routes/benchmarks/$benchmarkId*` → `projects/$projectId*` (3 files). `routeTree.gen.ts` regenerated via `@tanstack/router-cli generate`.
  • Components: `BenchmarkCard.tsx` → `ProjectCard.tsx`. `BenchmarksDashboard` / `SingleBenchmarkHome` / `BenchmarkHomePage` / 3 tab components / 2 sidebar variants all renamed.
  • API hooks: `useBenchmarkList`, `useBenchmarkRunList`, `useBenchmarkRunDetail`, `useAllBenchmarkRuns`, `benchmarkApiBase`, all `benchmark*Options` (15 hooks/factories), `addBenchmarkApi`, `removeBenchmarkApi` → `Project` equivalents.
  • Types: `BenchmarkSummary` / `BenchmarkListResponse` / `BenchmarkEntry` → `Project*`. Envelope field `benchmarks: ...` → `projects: ...`. Wire fields `benchmark_id`, `benchmark_name`, `multi_benchmark_dashboard` → `project_*`.
  • URL strings: `/api/benchmarks/` → `/api/projects/`. Cache query keys `['benchmarks', ...]` → `['projects', ...]`.
  • UI strings: "Benchmarks"/"All Benchmarks"/"Add Benchmark" → "Projects"/"All Projects"/"Add Project". "Benchmark path" placeholder → "Project path".

Out of scope

  • `benchmark.json` per-run artifact comments — kept (Agent Skills compatibility).
  • `examples/*-benchmark` directory references — kept (academic benchmark-suite semantics; PR 4 documents this distinction in AGENTS.md).

Test plan

  • `bun run typecheck` — passes
  • `bun run lint` — clean (after `biome --write` import-order auto-fix)
  • `bun run test` — 2374 tests pass (1768 core + 67 eval + 539 cli, 0 fail)
  • `bun run build` — all packages including Studio dist
  • Pre-push hooks green
  • End-to-end UAT with `agent-browser` against `HOME=/tmp/uat-pr3-home`:
    1. Legacy `~/.agentv/benchmarks.yaml` auto-migrated on Studio startup (PR 1 migration kicks in).
    2. `GET /api/config` returns `{ project_name, multi_project_dashboard }`.
    3. `GET /api/projects` returns `{ projects: [...] }` envelope.
    4. Home dashboard renders `

      Projects

      `, `Add Project` button, `` for the migrated entry.
    5. Click → navigates to `/projects/demo`; back link reads "← All Projects".

🤖 Generated with Claude Code

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 14, 2026

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 56265a9
Status:⚡️  Build in progress...

View logs

@christso christso marked this pull request as ready for review May 15, 2026 00:29
@christso christso force-pushed the refactor/rename-pr2-http branch from 1d861fa to 4b8a07f Compare May 15, 2026 00:42
Base automatically changed from refactor/rename-pr2-http to main May 15, 2026 00:42
PR 3 of 4 in the benchmark → project rename. Updates the Studio web UI
to consume the renamed wire format introduced in PR 2.

Routes:
  apps/studio/src/routes/benchmarks/$benchmarkId.tsx
                                    → projects/$projectId.tsx
  apps/studio/src/routes/benchmarks/$benchmarkId_/runs/$runId.tsx
                                    → projects/$projectId_/runs/$runId.tsx
  apps/studio/src/routes/benchmarks/$benchmarkId_/evals/$runId.$evalId.tsx
                                    → projects/$projectId_/evals/$runId.$evalId.tsx
  routeTree.gen.ts regenerated via `bunx @tanstack/router-cli generate`.

Components:
  BenchmarkCard.tsx → ProjectCard.tsx (prop `benchmark` → `project`)
  Sidebar.tsx:      BenchmarkRunDetailSidebar → ProjectRunDetailSidebar,
                    BenchmarkEvalSidebar     → ProjectEvalSidebar
  routes/index.tsx: BenchmarksDashboard      → ProjectsDashboard,
                    SingleBenchmarkHome      → SingleProjectHome
  routes/projects/$projectId.tsx: BenchmarkHomePage → ProjectHomePage,
                    BenchmarkRunsTab/ExperimentsTab/AnalyticsTab →
                    ProjectRunsTab/ProjectExperimentsTab/ProjectAnalyticsTab

API hooks (apps/studio/src/lib/api.ts):
  useBenchmarkList, useBenchmarkRunList, useBenchmarkRunDetail,
  useAllBenchmarkRuns, addBenchmarkApi, removeBenchmarkApi,
  benchmarkApiBase, benchmarkRunListOptions, benchmarkRunDetailOptions,
  benchmarkRunSuitesOptions, benchmarkRunCategoriesOptions,
  benchmarkCategorySuitesOptions, benchmarkEvalDetailOptions,
  benchmarkEvalFilesOptions, benchmarkEvalFileContentOptions,
  benchmarkExperimentsOptions, benchmarkCompareOptions,
  benchmarkTargetsOptions, benchmarkConfigOptions, allBenchmarkRunsOptions
    → all renamed to `*Project*` equivalents.
  All `/api/benchmarks/*` URL strings → `/api/projects/*`.
  Cache query keys `['benchmarks', ...]` → `['projects', ...]`.

Types (apps/studio/src/lib/types.ts):
  BenchmarkSummary  → ProjectSummary
  BenchmarkListResponse → ProjectListResponse
                        envelope field `benchmarks: ...` → `projects: ...`
  BenchmarkEntry    → ProjectEntry
  Wire fields:
    benchmark_id → project_id
    benchmark_name → project_name
    multi_benchmark_dashboard → multi_project_dashboard

UI strings:
  "Benchmarks" / "All Benchmarks" → "Projects" / "All Projects"
  "Add Benchmark" / "Benchmark path" placeholder → project-flavored
  All `benchmarkId` prop and local var occurrences → `projectId`.

Out of scope (unchanged):
  - `benchmark.json` per-run artifact and its writer (Agent Skills compat)
  - Comments referencing the legacy artifact file
  - examples/*-benchmark dirs (academic benchmark-suite semantics)

Stacks on refactor/rename-pr2-http.

UAT (multi-project dashboard, /tmp/uat-pr3-home with legacy benchmarks.yaml):
  - `~/.agentv/benchmarks.yaml` → migrated to `projects.yaml` on first load
    (one log line: "Migrated registry: benchmarks.yaml → projects.yaml")
  - GET /api/projects returns `{ projects: [{ id: 'demo', project_id: ... }] }`
  - Home dashboard renders <h1>Projects</h1>, [Add Project] button,
    <ProjectCard> for the migrated `demo` entry
  - Clicking the card navigates to /projects/demo and shows "← All Projects"

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@christso christso force-pushed the refactor/rename-pr3-studio branch from 2f530a0 to 56265a9 Compare May 15, 2026 00:43
@christso christso merged commit ed0943d into main May 15, 2026
3 of 4 checks passed
@christso christso deleted the refactor/rename-pr3-studio branch May 15, 2026 00:43
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