From 3c045d8ed402ef7d81f33555146534644770bef8 Mon Sep 17 00:00:00 2001 From: Florent Tapponnier Date: Wed, 24 Jun 2026 16:36:19 +0200 Subject: [PATCH 1/2] fix awaiting-data fallback + swap missing featured slugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace 'awaiting data' negative copy with skeleton (during fetch) or 'View leaderboard →' / category line (after fetch fails). Cards always read as complete. - Swap evm-quote-latency and solana-tx-landing-latency out of the featured list — they're not in /api/citable (editorialStatus filter). Replaced with perp-fees + bridge-quote-latency which return leader data on prod. Trending list also rotated to slugs verified against the live API. - Category label on each card sources from item.tags[0] (bench category) instead of hardcoded 'Benchmark', so the cards self-label as Trading / RPCs / Bridges / etc. --- src/components/search/search-dialog.tsx | 183 +++++++++++++----------- 1 file changed, 102 insertions(+), 81 deletions(-) diff --git a/src/components/search/search-dialog.tsx b/src/components/search/search-dialog.tsx index 38614dd7..d64fa850 100644 --- a/src/components/search/search-dialog.tsx +++ b/src/components/search/search-dialog.tsx @@ -64,24 +64,26 @@ const KIND_ICON: Record = { /** * Hand-picked editorial leaders. Shown as horizontal "Live leaders" cards * when the query is empty. Live values (#1 provider + p50) come from - * `/api/citable`, which is already edge-cached for 300s. + * `/api/citable`, which is already edge-cached for 300s. All slugs must + * appear in the citable response (editorialStatus === "live" + leader() + * non-null) — verified against prod before shipping. */ const FEATURED_BENCH_SLUGS = [ "pm-data-freshness", "aggregator-head-lag", "l1-finality", "rpc-capabilities", - "evm-quote-latency", - "solana-tx-landing-latency", + "perp-fees", + "bridge-quote-latency", ]; const TRENDING_BENCH_SLUGS = [ - "perp-fees", "stablecoin-peg-usdt-anchored", - "bridge-quote-latency", "metadata-coverage", "validator-yield", "network-fees", + "perp-funding", + "solana-tx-landing", ]; type CitableLeader = { @@ -408,43 +410,56 @@ export default function SearchDialog() { />
- {featured.map(({ item, live }) => ( -
- - ))} + )} +
+ + ); + })} @@ -454,47 +469,53 @@ export default function SearchDialog() {
- {trending.map(({ item, live }) => ( - go(item.url, entryFromItem(item))} - className="group flex items-center gap-3 rounded-md px-2.5 py-2 cursor-pointer text-sm aria-selected:bg-paper-soft transition-colors" - > - {live?.leader ? ( - - ) : ( -
- -
- )} -
-
- {item.title} -
-
- {live?.leader ? ( - <> - #1 {live.leader.name} ·{" "} - - {fmtUnit(live.value, live.unit)} - - - ) : ( - live?.category ?? item.description - )} + {trending.map(({ item, live }) => { + const category = item.tags?.[0] ?? "Benchmark"; + const isLoading = citable === null; + return ( + go(item.url, entryFromItem(item))} + className="group flex items-center gap-3 rounded-md px-2.5 py-2 cursor-pointer text-sm aria-selected:bg-paper-soft transition-colors" + > + {live?.leader ? ( + + ) : ( +
+ +
+ )} +
+
+ {item.title} +
+
+ {live?.leader ? ( + <> + #1 {live.leader.name} ·{" "} + + {fmtUnit(live.value, live.unit)} + + + ) : isLoading ? ( + + ) : ( + category + )} +
-
- - - ))} + + + ); + })}
)} From b7d56070e0436c80545a22e1e52eb37ba05ad8ad Mon Sep 17 00:00:00 2001 From: Florent Tapponnier Date: Wed, 24 Jun 2026 16:38:22 +0200 Subject: [PATCH 2/2] remove category sub-nav from header User feedback: category strip on /benchmarks was visual noise. Drop SiteSubNav entirely; nav stays a single row. --- src/components/site-header.tsx | 3 -- src/components/site-sub-nav.tsx | 82 --------------------------------- 2 files changed, 85 deletions(-) delete mode 100644 src/components/site-sub-nav.tsx diff --git a/src/components/site-header.tsx b/src/components/site-header.tsx index 8d414265..0c62dc1f 100644 --- a/src/components/site-header.tsx +++ b/src/components/site-header.tsx @@ -6,7 +6,6 @@ import { usePathname } from "next/navigation"; import { useEffect, useState } from "react"; import { SearchTrigger } from "@/components/search/search-trigger"; import { SiteLogoSwitcher } from "@/components/site-logo-switcher"; -import { SiteSubNav } from "@/components/site-sub-nav"; import { ThemeToggle } from "@/components/theme-toggle"; function GithubIcon({ size = 15 }: { size?: number }) { @@ -190,8 +189,6 @@ export function SiteHeader() { )} - - ); } diff --git a/src/components/site-sub-nav.tsx b/src/components/site-sub-nav.tsx deleted file mode 100644 index 87baee1f..00000000 --- a/src/components/site-sub-nav.tsx +++ /dev/null @@ -1,82 +0,0 @@ -"use client"; - -import Link from "next/link"; -import { CATEGORIES } from "@/lib/categories"; - -type SubItem = { href: string; label: string; match: (p: string) => boolean }; - -// Per-section contextual sub-nav. Modelled on the CMC chart-hub pattern -// (horizontally scrollable category tabs below the main nav). The -// bench section is the only one with a deep enough taxonomy to need -// this today; other sections render nothing rather than an empty -// 40px-tall strip that would just push content down. -function getItems(pathname: string): SubItem[] | null { - if (pathname === "/benchmarks" || pathname.startsWith("/benchmarks/")) { - const items: SubItem[] = [ - { - href: "/benchmarks", - label: "All", - match: (p) => - p === "/benchmarks" || - (p.startsWith("/benchmarks/") && !p.startsWith("/benchmarks/category/")), - }, - ]; - for (const c of CATEGORIES) { - const href = `/benchmarks/category/${c.slug}`; - items.push({ - href, - label: c.label, - match: (p) => p === href, - }); - } - return items; - } - return null; -} - -export function SiteSubNav({ pathname }: { pathname: string }) { - const items = getItems(pathname); - if (!items) return null; - - return ( -
- -
- ); -}