Skip to content

Commit 0606eee

Browse files
semoroclaude
andcommitted
Add notice banner to benchmark leaderboard
Show a centered, italic notice row above the leaderboard data when a `notice` field is present in leaderboard.yml. Currently signals that Fable 5, Opus 4.8, etc. are being evaluated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 325723a commit 0606eee

5 files changed

Lines changed: 35 additions & 2 deletions

File tree

blocks/benchmark/leaderboard/index.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useTextStyles } from '@rescui/typography';
44
import { Tooltip } from '@rescui/tooltip';
55
import { InfoOutlineIcon } from '@rescui/icons';
66
import styles from './leaderboard.module.css';
7-
import { columns, rows, SETUP_COLUMN_LABEL, TOP_SCORE_COUNT, twoDecimals } from './leaderboard-data';
7+
import { columns, notice, rows, SETUP_COLUMN_LABEL, TOP_SCORE_COUNT, twoDecimals } from './leaderboard-data';
88

99
function RateCell({ value, textCn }: { value: number; textCn: ReturnType<typeof useTextStyles> }) {
1010
return <span className={cn(styles.rateValue, textCn('rs-text-2'))}>{twoDecimals(value)}</span>;
@@ -39,6 +39,18 @@ export function Leaderboard() {
3939
))}
4040
</tr>
4141
</thead>
42+
{notice && (
43+
<tbody>
44+
<tr className={styles.noticeRow} data-testid="bench-notice">
45+
<td
46+
className={cn(styles.td, styles.noticeCell, textCn('rs-text-2'))}
47+
colSpan={columns.length + 1}
48+
>
49+
{notice}
50+
</td>
51+
</tr>
52+
</tbody>
53+
)}
4254
<tbody>
4355
{rows.map((row, index) => (
4456
<tr

blocks/benchmark/leaderboard/leaderboard-data.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ export const columns: BenchColumn[] = [
5555
{ key: 'date', label: 'Date', hint: 'Evaluation date', format: formatDate },
5656
];
5757

58-
const rawRows: BenchRow[] = (leaderboardRaw as { rows?: BenchRow[] }).rows ?? [];
58+
const raw = leaderboardRaw as { rows?: BenchRow[]; notice?: string };
59+
60+
export const notice: string | undefined = raw.notice;
61+
62+
const rawRows: BenchRow[] = raw.rows ?? [];
5963

6064
export const rows: BenchRow[] = [...rawRows]
6165
.map((row) => ({ ...row, date: String(row.date).slice(0, 10) }))

blocks/benchmark/leaderboard/leaderboard.module.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@
2222
}
2323
}
2424

25+
.noticeRow {
26+
background: rgba(255, 255, 255, 0.03);
27+
}
28+
29+
.noticeCell {
30+
color: rgba(255, 255, 255, 0.5);
31+
font-style: italic;
32+
text-align: center;
33+
}
34+
2535
.scroll {
2636
/* The table needs ~1100px, which only the widest layout (>1190px viewport)
2737
fits — there the scroll box stays a non-scroll container so the header can

data/benchmark/leaderboard.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Kotlin Benchmark leaderboard data.
2+
notice: "Fable 5, Opus 4.8, … — Evaluating…"
23
rows:
34
#------------------------------ Top scorers -------------------------------
45
- setup: "Claude Code + Opus 4.7 xhigh"

test/e2e/benchmark.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ test.describe('Kotlin Benchmark landing page', () => {
115115
expect(result.headerTop).toBeLessThanOrEqual(4);
116116
});
117117

118+
test('notice banner is visible when set in data', async () => {
119+
const notice = benchmark.page.getByTestId('bench-notice');
120+
await expect(notice).toBeVisible();
121+
await expect(notice).toContainText('Evaluating');
122+
});
123+
118124
test('methodology CTA links to the methodology page and GitHub', async () => {
119125
await expect(benchmark.page.getByTestId('bench-cta-title')).toContainText('How Kotlin Benchmark works');
120126
await expect(benchmark.methodologyCta).toHaveAttribute('href', /\/benchmark\/methodology\/?$/);

0 commit comments

Comments
 (0)