Skip to content

feat(frontend): Pareto frontier card behind a per-user Eval toggle - #1099

Open
pfbyjy wants to merge 1 commit into
claude/chart-groundworkfrom
claude/eval-pareto-frontier
Open

feat(frontend): Pareto frontier card behind a per-user Eval toggle#1099
pfbyjy wants to merge 1 commit into
claude/chart-groundworkfrom
claude/eval-pareto-frontier

Conversation

@pfbyjy

@pfbyjy pfbyjy commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Stack 2/4 — based on #1098 (merge that first; after its squash-merge this PR retargets to staging and needs a rebase/update-branch).

Adds an automatic cost/quality Pareto frontier card to the experiment page: one point per agent cohort plotting pass@1 (the shared per-task estimator from #1098, so the y-axis always agrees with the leaderboard) against average cost per trial, with toggles for cost per success (total spend over priced trials ÷ passes among them), tokens, time, steps, and tool calls — each metric re-derives its own frontier, since an agent can be non-dominated on cost yet dominated on time.

  • Non-dominated agents are joined by a dashed frontier curve and direct-labeled (labels flip inward near chart edges); hiding an agent via the shared legend re-derives the frontier over the rest; cost values carry the existing ~/* estimated-cost marks; the tooltip notes per-metric coverage (e.g. "4/6 trials reported").
  • lib/pareto.ts holds the aggregation (a metric-extractor table + one loop — adding a metric is one entry here plus one compiler-enforced display entry in the card) and a generic weak-dominance frontier function.
  • The card reuses the shared agent grouping, colors, legend, and hover cross-highlight, so all cards describe the same cohorts.

Feature gate: the card sits behind a new header Eval toggle (flask icon) whose button renders only for accounts allowed by lib/eval-graphs.ts (EVAL_GRAPHS_USER_ALLOWLIST, currently meji@abundant.ai) — other users and public share views (no signed-in viewer) see neither the button nor the card. The Graphs button (renamed from "Pass/k graph"; it already revealed the leaderboard too) keeps its exact previous behavior for everyone.

Verified with tsc --noEmit, ESLint, next build, and rendered screenshots (light + dark, all metric toggles, hover/tooltip, frontier recompute on hide).

🤖 Generated with Claude Code

https://claude.ai/code/session_01BzsxcETgi6UjLtCnety4sQ


Generated by Claude Code


Note

Low Risk
Frontend-only visualization behind a hardcoded email allowlist; no API or auth changes for the Pareto feature itself.

Overview
Introduces experimental eval analytics on the experiment page: a new header Eval toggle (only for emails in EVAL_GRAPHS_USER_ALLOWLIST via useEvalGraphsEnabled) reveals a Pareto frontier card alongside the existing pass/k graphs row. The main Graphs toggle label changes from "Pass/k graph" to Graphs; its behavior for pass@k and the leaderboard is unchanged.

The Pareto card plots one point per agent cohort with pass@1 on the y-axis (same per-task passAtOneFraction mean as the leaderboard) and a selectable x-axis: average cost per trial, cost per success, tokens, time, steps, or tool calls. lib/pareto.ts aggregates trial metrics by experiment agent key and computes a per-metric weak-dominance frontier; hiding agents in the shared legend recomputes the frontier. The UI (CostParetoGraph) adds metric toggles, tooltips (including cost estimate ~/* and partial metric coverage), dashed frontier labels, and shared colors/legend/hover with the pass@k graph.

Public share views and non-allowlisted users see neither the Eval button nor the card.

Reviewed by Cursor Bugbot for commit 8a73e5f. Bugbot is set up for automated code reviews on this repo. Configure here.

Add an automatic cost/quality Pareto frontier card to the experiment
page: one point per agent cohort plotting pass@1 (the shared per-task
estimator the leaderboard ranks by) against average cost per trial,
with toggles for cost per success, tokens, time, steps, and tool calls
— each metric re-derives its own frontier. Non-dominated agents are
joined by a dashed frontier curve and direct-labeled (labels flip
inward near chart edges); hiding an agent via the shared legend
re-derives the frontier, and cost values carry the existing ~/*
estimated-cost marks.

lib/pareto.ts holds the aggregation (metric-extractor table, one loop)
and the generic weak-dominance frontier; the card reuses the shared
agent grouping, colors, legend, and hover cross-highlight, so all
cards describe the same cohorts.

The card sits behind a new header Eval toggle (flask icon) whose
button renders only for accounts allowed by lib/eval-graphs
(EVAL_GRAPHS_USER_ALLOWLIST, currently meji@abundant.ai) — other users
and public share views see neither the button nor the card. The
Graphs button (renamed from "Pass/k graph"; it already revealed the
leaderboard too) keeps its exact previous behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BzsxcETgi6UjLtCnety4sQ
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
oddish-app Ready Ready Preview Aug 6, 2026 6:58pm

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8a73e5f. Configure here.

if (getY(point) > bestY) {
frontier.push(point);
bestY = getY(point);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tied agents drop from frontier

Low Severity

paretoFrontier only keeps a point when y is strictly greater than the best so far. Two agents with identical (x, y) do not weakly dominate each other, so both belong on the frontier, but only the first survives. The other still plots as a scatter point yet never gets the frontier label or “on frontier” tooltip mark.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8a73e5f. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk: medium. Left a non-blocking comment: Cursor Bugbot ended as skipping and reported 1 unresolved finding, so this is not approved. Human review is needed; two reviewers were already assigned, so none were added.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

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.

2 participants