diff --git a/src/app/apple-icon.tsx b/src/app/apple-icon.tsx index 77e95033..347c3042 100644 --- a/src/app/apple-icon.tsx +++ b/src/app/apple-icon.tsx @@ -26,7 +26,6 @@ export default function AppleIcon() { justifyContent: "center", }} > - {/* eslint-disable-next-line @next/next/no-img-element */} OpenChainBench ( - // eslint-disable-next-line react/no-array-index-key

{para.trim()}

))} diff --git a/src/app/icon.tsx b/src/app/icon.tsx index aeb22d3c..7c1c4e3f 100644 --- a/src/app/icon.tsx +++ b/src/app/icon.tsx @@ -21,7 +21,6 @@ export default function Icon() { justifyContent: "center", }} > - {/* eslint-disable-next-line @next/next/no-img-element */} OpenChainBench ), diff --git a/src/app/mcp/page.tsx b/src/app/mcp/page.tsx index 629c78a5..f3366ae0 100644 --- a/src/app/mcp/page.tsx +++ b/src/app/mcp/page.tsx @@ -171,7 +171,7 @@ export default async function McpPage() { Surface

- What's exposed + What's exposed

@@ -247,7 +247,7 @@ export default async function McpPage() { The server is read-only. There are no admin actions, no mutating tools, no upstream secrets reachable through the wire. PromQL queries are scoped to the metric namespaces we publish, so the - public endpoint can't be used to walk the underlying Prometheus. + public endpoint can't be used to walk the underlying Prometheus. Rate limits, body caps, batch rejection and SSE disable are enforced at the route. Source is on{" "} (null); - const q = query.trim().toLowerCase(); - - // Categories present in the data, in the order benchmarks declare them. - const categories = useMemo(() => { - const seen = new Set(); - const list: string[] = []; - for (const b of benchmarks) { - if (!seen.has(b.category)) { - seen.add(b.category); - list.push(b.category); - } - } - return list; - }, [benchmarks]); - - const filtered = useMemo(() => { - return benchmarks.filter((b) => { - if (activeCategory && b.category !== activeCategory) return false; - if (!q) return true; - const haystack = [ - b.title, - b.subtitle, - b.category, - b.metric, - ...b.results.map((r) => r.name), - ] - .join(" ") - .toLowerCase(); - return haystack.includes(q); - }); - }, [benchmarks, q, activeCategory]); - - return ( -
- {/* Filter row - categories left, search right */} -
-
    - setActiveCategory(null)} - /> - {categories.map((c) => ( - - setActiveCategory(activeCategory === c ? null : c) - } - /> - ))} -
- -
- {(q || activeCategory) && ( - - {filtered.length} of {benchmarks.length} - - )} - -
-
- - {/* Table head - same grid as rows so columns align cleanly. */} -
- Benchmark - 24 Hours - Live -
-
- Benchmark - Live -
- - {filtered.length === 0 ? ( -

- No benchmark matches{" "} - {q && "{query}"} - {q && activeCategory && " in "} - {activeCategory && ( - {activeCategory} - )} - . -

- ) : ( -
    - {filtered.map((b) => { - const isDraft = b.status === "draft"; - const isAwaiting = isDraft && b.editorialStatus === "live"; - const catColor = CATEGORY_COLOR[b.category]; - return ( -
  1. - -
    -
    - - {b.category} - - {isDraft && ( - - {isAwaiting ? "awaiting samples" : "draft"} - - )} -
    -

    - {b.title} -

    -

    {b.subtitle}

    -
    - -
    - {!isDraft && ( - - )} -
    - -
    - {!isDraft && } -
    - -
  2. - ); - })} -
- )} -
- ); -} - -function CategoryPill({ - label, - color, - active, - onClick, -}: { - label: string; - color?: string; - active: boolean; - onClick: () => void; -}) { - const accent = color ?? "var(--color-ink)"; - return ( -
  • - -
  • - ); -} diff --git a/src/components/share-section.tsx b/src/components/share-section.tsx index 63860089..1a042e13 100644 --- a/src/components/share-section.tsx +++ b/src/components/share-section.tsx @@ -122,8 +122,6 @@ export function ShareSection({ slug, title, benchmark, chain }: Props) { setPairB(s); } - const activeTemplate = TEMPLATES.find((t) => t.id === activeId); - // Build the URL with the right params per template. const cardSrc = (templateId: string) => { const tpl = TEMPLATES.find((t) => t.id === templateId); diff --git a/src/components/time-series-chart.tsx b/src/components/time-series-chart.tsx index c2f75095..20b052fd 100644 --- a/src/components/time-series-chart.tsx +++ b/src/components/time-series-chart.tsx @@ -540,7 +540,7 @@ function Chart({ // line draws a break but the dot keeps rendering at 0 / NaN. return { ...l, color, pts, linePath, fillPath, lastX, lastY, last, isGap }; }); - }, [slicedLines, padL, padR, padT, padB, innerW, innerH, lo, yRange]); + }, [slicedLines, padL, padT, innerW, innerH, lo, yRange]); const hoverX = hover ? padL + innerW * (hover.idx / Math.max(1, numPoints - 1)) : null; const hoverFraction = hover ? hover.idx / Math.max(1, numPoints - 1) : 0; diff --git a/src/data/site.ts b/src/data/site.ts index f71dd17c..ddd84738 100644 --- a/src/data/site.ts +++ b/src/data/site.ts @@ -6,11 +6,3 @@ export const SITE = { description: "Open, reproducible benchmarks for crypto infrastructure: aggregators, bridges, RPCs, price feeds.", } as const; - -export const CURRENT_ISSUE = "001"; - -export const ISSUE_DATE_LONG = new Date().toLocaleDateString("en-US", { - year: "numeric", - month: "long", - day: "numeric", -}); diff --git a/src/lib/methodology-tooltip.ts b/src/lib/methodology-tooltip.ts deleted file mode 100644 index 0774ea5f..00000000 --- a/src/lib/methodology-tooltip.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Build the hover-tooltip string shown on every chart row / bar / slice - * across the bench detail page. Centralises the format so RankedBar, - * Distribution and Donut all show the same shape - readers learn the - * convention once and recognise it everywhere. - * - * Includes: - * - The provider's friendly name - * - The raw PromQL query that produced the headline number (when - * spec.ts could extract it - falls back to the metric name) - * - A click-to-toggle hint so the interaction is discoverable from - * the tooltip without needing a separate help string - * - * Plain string output (no JSX) because only renders text. A - * richer popover-style tooltip is a future upgrade if hover ergonomics - * stop being enough. - */ - -type ProviderLike = { - name: string; - query?: string; -}; - -export function methodologyTooltip( - r: ProviderLike, - isExcluded: boolean, -): string { - const lines = [r.name]; - if (r.query) { - lines.push(""); - lines.push("Method"); - lines.push(r.query); - } - lines.push(""); - lines.push(isExcluded ? "Click to show" : "Click to hide"); - return lines.join("\n"); -} diff --git a/src/lib/utils.ts b/src/lib/utils.ts deleted file mode 100644 index 737ea7e1..00000000 --- a/src/lib/utils.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function cn(...classes: Array<string | false | null | undefined>) { - return classes.filter(Boolean).join(" "); -}