From 7a829933537d2ff0c9de22e6e3c8642bdda7209d Mon Sep 17 00:00:00 2001 From: Florent Tapponnier Date: Fri, 29 May 2026 17:28:16 +0200 Subject: [PATCH] fix(ledger): only render #1 chips on the bench leaderboard row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported visually: on wallet-labels-coverage (11 chain dimensions), every row was showing all 11 chain chips (Ethereum, Solana, BNB Chain, Base, Arbitrum, Polygon, Optimism, TON, Stellar, XRP, Bitcoin) — most rendered as neutral 'not leading on this chain' chips. Total noise: ~44 chips across 4 rows. Default ChainCoverageChip to leaders-only mode. Non-leader chips are hard-skipped. The bench page chain tabs already provide precise per-chain rankings; this chip is a quick scan aid for 'where does this provider currently top the field' — that signal disappears when buried under 9 neutral chips per row. leadersOnly=false escape hatch kept so /products/[slug] (or any future consumer) can opt back into the full coverage view. --- src/components/chain-coverage-chip.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/chain-coverage-chip.tsx b/src/components/chain-coverage-chip.tsx index 46e87b0d..adc4c090 100644 --- a/src/components/chain-coverage-chip.tsx +++ b/src/components/chain-coverage-chip.tsx @@ -11,6 +11,11 @@ type Props = { /** Optional. When set, hides chains the provider is NOT present on * (default: true — only show chains the provider has a measurement on). */ onlyPresent?: boolean; + /** When true (default), only render chips for chains the provider LEADS. + * Set to false on /products/[slug] where surfacing every covered chain + * is useful. On the bench page leaderboard the leader-only view keeps + * the row scannable on benches with 10+ chain dimensions. */ + leadersOnly?: boolean; /** Small visual variant for inline use inside a leaderboard row. */ size?: "sm" | "xs"; className?: string; @@ -34,6 +39,7 @@ export function ChainCoverageChip({ providerSlug, benchmark, onlyPresent = true, + leadersOnly = true, size = "sm", className = "", }: Props) { @@ -55,6 +61,11 @@ export function ChainCoverageChip({ const leader = bestPerChain[c.value]; if (!leader) return null; const isLeader = leader.slug.toLowerCase() === lower; + // In leaders-only mode (used by the bench page leaderboard) we hard + // skip non-leader chips. Benches like wallet-labels-coverage declare + // 11 chain dimensions; rendering every one of them per row inflates + // the name column past readability without adding signal. + if (leadersOnly && !isLeader) return null; // Detect provider presence on this chain: a provider is "present" // when it has a non-zero p50 entry in the unfiltered results AND // bestPerChain has any leader for this chain (proxy: the chain is