diff --git a/src/components/benchmark-body.tsx b/src/components/benchmark-body.tsx index a271a816..c82505f6 100644 --- a/src/components/benchmark-body.tsx +++ b/src/components/benchmark-body.tsx @@ -287,13 +287,10 @@ export function BenchmarkBody({ // Cross-dimension filtering: hide venue tabs with no data for the active // chain, and hide chain tabs with no data for the active venue. - const filteredVenueOptions = useMemo(() => { - if (!venuesForChain || !effectiveChain || effectiveChain === "all") return venueOptions; - const valid = venuesForChain[effectiveChain]; - if (!valid || valid.length === 0) return venueOptions; - const validSet = new Set(valid); - return venueOptions.filter((v) => v.value === "all" || validSet.has(v.value)); - }, [venueOptions, venuesForChain, effectiveChain]); + // Venue tabs are never filtered by chain: the user picks a launchpad first, + // then drills into a chain. The reverse (chain → hides venues) is confusing + // because launchpad tabs disappear unexpectedly. + const filteredVenueOptions = venueOptions; const chainsForVenue = useMemo(() => { if (!venuesForChain) return undefined; @@ -309,7 +306,9 @@ export function BenchmarkBody({ const valid = chainsForVenue[effectiveVenue]; if (!valid || valid.length === 0) return chainOptions; const validSet = new Set(valid); - return chainOptions.filter((c) => c.value === "all" || validSet.has(c.value)); + // Strip the "all" aggregate option when a specific venue is selected: mixing + // chains is unfair (a Solana-only provider scores 0% on Base tokens). + return chainOptions.filter((c) => c.value !== "all" && validSet.has(c.value)); }, [chainOptions, chainsForVenue, effectiveVenue]); // The page ships ONLY the aggregate view (embedding every variant made @@ -698,18 +697,12 @@ export function BenchmarkBody({ )} /> )} - {filteredChainOptions.length > 0 && ( + {filteredChainOptions.length > 1 && ( { - setChain(v); - if (v !== "all" && effectiveVenue && effectiveVenue !== "all" && venuesForChain) { - const validVenues = venuesForChain[v]; - if (validVenues && !validVenues.includes(effectiveVenue)) setVenue(null); - } - }} + onSelect={setChain} metaByValue={Object.fromEntries( filteredChainOptions .map((o) => [