You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[ ]**Step 1: Write the server-orchestration test first**
483
+
484
+
Mock only the DB boundary (`getCachedBenchmarks`) and assert that `getOverviewPageData()`:
485
+
486
+
1. Requests every `DEFAULT_MODELS` entry through its complete `DISPLAY_MODEL_TO_DB` key list.
487
+
2. Returns models in the existing `DEFAULT_MODELS` product order.
488
+
3. Computes the page `latestDate` from the newest hardware-result date.
489
+
4. Keeps an empty model summary in the returned list.
490
+
491
+
Run the test before creating the loader:
492
+
493
+
```bash
494
+
pnpm --dir packages/app exec vitest run src/lib/overview-data.server.test.ts
495
+
```
496
+
497
+
Expected: FAIL because `overview-data.server.ts` does not exist.
498
+
499
+
-[ ]**Step 2: Create the server loader**
481
500
482
501
Implement `overview-data.server.ts`:
483
502
@@ -505,7 +524,7 @@ export async function getOverviewPageData(): Promise<OverviewPageData> {
505
524
}
506
525
```
507
526
508
-
-[ ]**Step 2: Add a small precomputed page fixture**
527
+
-[ ]**Step 3: Add a small precomputed page fixture**
509
528
510
529
Create `overview.json` using the exact `OverviewPageData` schema. Include all five current default models in product order:
511
530
@@ -517,18 +536,20 @@ Create `overview.json` using the exact `OverviewPageData` schema. Include all fi
517
536
518
537
Use deterministic dates such as `2026-07-20` and simple tier values `[1200, 1000, 800, 600]` for a winner and `[1000, 800, 600, 400]` for a runner-up. Store `null` for an unreachable 100 tok/s/user tier in at least one non-winning hardware result.
519
538
520
-
-[ ]**Step 3: Typecheck the server boundary**
539
+
-[ ]**Step 4: Verify the server boundary**
521
540
522
541
```bash
542
+
pnpm --dir packages/app exec vitest run src/lib/overview-data.server.test.ts
@@ -594,13 +620,18 @@ Define a colocated `STRINGS` dictionary covering every visible phrase: page titl
594
620
Render:
595
621
596
622
- one `<h1>` and short methodology line;
597
-
- a single semantic `<table data-testid="overview-scorecard">` in `overflow-x-auto`;
623
+
- one repository `Card` with `className="overflow-hidden p-0"`; never one card per model;
624
+
- a single semantic `<table data-testid="overview-scorecard">` with a localized `sr-only` caption, `scope="col"` headers, `scope="row"` model cells, and a grouped heading over the four tier columns;
625
+
- the table inside a keyboard-focusable `role="region"` scroll container with `data-testid="overview-scorecard-scroll"`, `overflow-x-auto`, a visible inset focus ring, and a deliberate `min-w-[70rem]` table width;
598
626
- one row per `data.models` entry;
599
627
- winner hardware and selected precision in the platform cell;
628
+
- an explicit localized `Best` / `第一名` text label, so winner status never depends on color alone;
600
629
- winner score and tier values formatted with `Intl.NumberFormat(locale)`;
601
630
- runner-up gap as `+N% vs. runner-up` / `较第二名高 N%`;
602
631
-`—` for no data or unreachable values;
603
632
-`†` beside `clamped_low` values;
633
+
- screen-reader text for the unreachable dash and clamped marker;
634
+
- semantic `<time dateTime={...}>` for freshness dates;
604
635
- detail link built with:
605
636
606
637
```ts
@@ -613,7 +644,11 @@ const query = new URLSearchParams({
Use a sticky first column and `tabular-nums`. Do not add selectors, charts, accordions, client-side sorting, or an AUC card.
647
+
Use the repository's existing semantic tokens and table language: muted headers, thin `border-border/50` dividers, `hover:bg-muted/30`, `focus-within:bg-muted/30`, right-aligned `tabular-nums`, and the GPU-spec table's sticky first-column divider. Use an outline `Badge` for precision at most. Do not hard-code brand/vendor colors, use `font-mono` for numbers, or use `text-primary` as the sole winner treatment. Respect `motion-reduce`.
648
+
649
+
Add a code comment beside the server-rendered official-data table explaining that unofficial-run overlays are intentionally inapplicable: this page is a cached, cross-model official snapshot, while uploaded runs remain available in the linked interactive inference dashboard.
650
+
651
+
Do not add selectors, charts, accordions, client-side sorting, AUC language, or an AUC card. Call the scalar a **weighted score** in both locales.
0 commit comments