From 051493f812a3135c3f8646d265e4a2f613936e35 Mon Sep 17 00:00:00 2001 From: Florent Tapponnier Date: Thu, 11 Jun 2026 18:31:19 +0200 Subject: [PATCH] fix(variants): stop seeding first chain/region combo with aggregate data --- src/app/benchmarks/[slug]/page.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/benchmarks/[slug]/page.tsx b/src/app/benchmarks/[slug]/page.tsx index 9bdf7008..6c192ab0 100644 --- a/src/app/benchmarks/[slug]/page.tsx +++ b/src/app/benchmarks/[slug]/page.tsx @@ -149,8 +149,13 @@ export default async function BenchmarkPage({ // unstable_cache keeps that at one cheap Prom roundtrip per 60 s // across all users), and renders the aggregate while it loads. const all = await getBenchmarks(); + // Seed ONLY the unfiltered key. Seeding the initially-selected + // chain/region/kind combo with the aggregate made the client believe + // it already had that variant, so it never fetched the real one: the + // first tab (e.g. ?chain=bnb) silently rendered global data labeled + // as per-chain. The client renders the aggregate as a placeholder + // while the true variant loads from /api/bench/[slug]/variant. const variants: Record = { - [variantKey(chain, region, kind)]: aggregate, [variantKey(null, null, null)]: aggregate, }; const benchmark = aggregate;