Skip to content

refactor(frontend): shared chart groundwork for the experiment graphs row - #1098

Open
pfbyjy wants to merge 1 commit into
stagingfrom
claude/chart-groundwork
Open

refactor(frontend): shared chart groundwork for the experiment graphs row#1098
pfbyjy wants to merge 1 commit into
stagingfrom
claude/chart-groundwork

Conversation

@pfbyjy

@pfbyjy pfbyjy commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Stack 1/4 — groundwork only, no behavior change. Merge order: this → #Pareto → #solve-grid → #stat-radar (each later PR is based on the previous branch, so its diff shows only its own increment).

Extracts helpers that the existing chart cards duplicate, ahead of three new eval graph cards (in the follow-up PRs) that reuse them:

  • passAtOneFraction in lib/pass-at-k.ts — the leaderboard's per-task pass@1 estimator, extracted so future consumers can't drift from it. The leaderboard now calls it.
  • getModelScopedAgentsFromSummaries exported from lib/experiment-agent-grouping.ts, replacing the detail view's private copy (a 4th inline copy existed in review).
  • useElementSize hook (lib/use-element-size.ts), replacing the ResizeObserver block inlined in pass-at-k-graph.tsx.
  • The graphs-row cards become direct grid children: a card rendering null contributes no grid cell, so the row reflows instead of leaving the blank column pass/k left behind on single-attempt experiments.

Verified with tsc --noEmit, ESLint, and next build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BzsxcETgi6UjLtCnety4sQ


Generated by Claude Code


Note

Low Risk
Refactor-only frontend extraction and grid markup; intended behavior unchanged, with no auth, API, or data-layer changes.

Overview
Prepares the experiment graphs row for more chart cards by centralizing duplicated logic and tightening grid layout.

Shared helpers: passAtOneFraction moves to lib/pass-at-k.ts (leaderboard now imports it). getModelScopedAgentsFromSummaries is exported from lib/experiment-agent-grouping.ts and replaces the private copy in experiment-detail-view. New useElementSize in lib/use-element-size.ts replaces the inline ResizeObserver sizing in pass-at-k-graph.tsx.

Layout: PassAtKGraph and PassAtOneLeaderboard are direct children of the two-column grid (wrapper divs removed) so when a card returns null it does not reserve an empty column— the row reflows (e.g. single-attempt experiments without a pass/k curve).

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

… row

Extract helpers the chart cards duplicate, ahead of new eval graph
cards that reuse them:

- passAtOneFraction in lib/pass-at-k.ts — the leaderboard's per-task
  pass@1 estimator, shared so future consumers can't drift from it.
- getModelScopedAgentsFromSummaries exported from
  lib/experiment-agent-grouping.ts, replacing the detail view's
  private copy.
- useElementSize hook, replacing the ResizeObserver block inlined in
  pass-at-k-graph.
- The graphs-row cards become direct grid children: a card rendering
  null contributes no cell, so the grid reflows instead of leaving the
  blank column pass/k left behind on single-attempt experiments.

No behavior change.

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.

Risk: medium. Approved — Cursor Bugbot completed successfully with no findings requiring human review; Cursor Security Agent was not present on this PR. No reviewers assigned (two already requested).

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