refactor(frontend): shared chart groundwork for the experiment graphs row - #1098
Open
pfbyjy wants to merge 1 commit into
Open
refactor(frontend): shared chart groundwork for the experiment graphs row#1098pfbyjy wants to merge 1 commit into
pfbyjy wants to merge 1 commit into
Conversation
… 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
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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:
passAtOneFractioninlib/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.getModelScopedAgentsFromSummariesexported fromlib/experiment-agent-grouping.ts, replacing the detail view's private copy (a 4th inline copy existed in review).useElementSizehook (lib/use-element-size.ts), replacing the ResizeObserver block inlined inpass-at-k-graph.tsx.nullcontributes 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, andnext 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:
passAtOneFractionmoves tolib/pass-at-k.ts(leaderboard now imports it).getModelScopedAgentsFromSummariesis exported fromlib/experiment-agent-grouping.tsand replaces the private copy inexperiment-detail-view. NewuseElementSizeinlib/use-element-size.tsreplaces the inlineResizeObserversizing inpass-at-k-graph.tsx.Layout:
PassAtKGraphandPassAtOneLeaderboardare direct children of the two-column grid (wrapperdivs removed) so when a card returnsnullit 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.