Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/components/benchmark-body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,13 @@ export function BenchmarkBody({
// changes, so Solana on aggregator-head-lag opens on First to report
// while Base keeps the head lag headline. A ?view= in the URL wins on
// first paint; after that the chain tab drives it like a fresh visit.
const defaultPanelByChain = Object.values(variants)[0]?.chart?.defaultPanelByChain;
// The chart block is editorial and rides on whichever variant went
// through overlayEditorial; a URL-seeded filtered variant may not carry
// it, so look across every seeded variant rather than the first one.
const chartConfig = Object.values(variants).find((v) => v.chart)?.chart;
const defaultPanelByChain = chartConfig?.defaultPanelByChain;
const hideHeadline = Boolean(
effectiveChain &&
Object.values(variants)[0]?.chart?.hideHeadlineByChain?.includes(effectiveChain),
effectiveChain && chartConfig?.hideHeadlineByChain?.includes(effectiveChain),
);
const urlViewPinned = useRef(Boolean(urlView));
useEffect(() => {
Expand Down
10 changes: 7 additions & 3 deletions src/lib/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ const loadBenchmarkUnfilteredCached = unstable_cache(
// v56: drop 6 keyed-rpc benches (arbitrum/base/bnb/eth/polygon/solana), US-only robinhood.
// v57: drop rpc-keyed-latency bench.
// v63: add bench 265 perp-pf-ratio + 5 providers on bench 234. Bench SET grew.
["bench-unfiltered-v63", process.env.VERCEL_ENV === "production" ? "prod" : "all"],
// v64: Benchmark.chart (default_panel_by_chain, hide_headline_by_chain); cached
// objects without it kept the Head lag tab on Solana after the deploy.
["bench-unfiltered-v64", process.env.VERCEL_ENV === "production" ? "prod" : "all"],
{ revalidate: 300, tags: ["benchmarks"] },
);

Expand Down Expand Up @@ -608,7 +610,8 @@ const loadAllBenchmarksCached = unstable_cache(
// v53: lockstep with bench-unfiltered-v53 (Flashbots prune).
// v57: lockstep with bench-unfiltered-v54 (add 6 new chain benches 216-221).
// v58: lockstep with bench-unfiltered-v63 (add bench 265 perp-pf-ratio).
["all-benchmarks-v58", process.env.VERCEL_ENV === "production" ? "prod" : "all"],
// v59: lockstep with bench-unfiltered-v64 (Benchmark.chart).
["all-benchmarks-v59", process.env.VERCEL_ENV === "production" ? "prod" : "all"],
{ revalidate: 300, tags: ["benchmarks"] },
);
export const loadAllBenchmarks = cache(loadAllBenchmarksCached);
Expand Down Expand Up @@ -706,7 +709,8 @@ const loadBenchmarkFiltered = unstable_cache(
// v21: bumped with bench-unfiltered-v46 (network-coverage split).
// v23: lockstep with bench-unfiltered-v56 (keyed-rpc cleanup).
// v24: lockstep with bench-unfiltered-v57 (drop rpc-keyed-latency).
["bench-filters-v29", process.env.VERCEL_ENV === "production" ? "prod" : "all"],
// v30: lockstep with bench-unfiltered-v66 (Benchmark.chart on variants).
["bench-filters-v30", process.env.VERCEL_ENV === "production" ? "prod" : "all"],
{ revalidate: 300, tags: ["benchmarks"] }
);

Expand Down
Loading