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
2 changes: 1 addition & 1 deletion src/app/answers/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default async function AnswerPage({
// crawlers concrete provider names + numbers in the SSR HTML.
const sortedResults = [...bench.results]
.filter((r) => !isRegion(r.slug))
.filter((r) => r.ms.p50 > 0 || r.ms.p99 > 0)
.filter((r) => r.ms.p50 !== 0 || r.ms.p99 !== 0)
.sort((a, b) =>
bench.higherIsBetter ? b.ms.p50 - a.ms.p50 : a.ms.p50 - b.ms.p50,
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/benchmarks/[slug]/[chain]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ function buildKeyFacts(data: ChainPageData): string {
function pageTitle(data: ChainPageData): string {
const b = data.benchmark;
if (data.shape === "row") {
return data.result.ms.p50 > 0
return data.result.ms.p50 !== 0
? `${data.explainer.h2}: ${fmtUnit(data.result.ms.p50, b.unit)}`
: data.explainer.h2;
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/benchmarks/[slug]/share-card/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function sortByP50(b: Benchmark): ProviderResult[] {
!!r &&
!!r.ms &&
Number.isFinite(r.ms.p50) &&
r.ms.p50 > 0,
r.ms.p50 !== 0,
)
.sort(
b.higherIsBetter
Expand Down Expand Up @@ -1238,7 +1238,7 @@ async function renderCompare(
const bRank = sorted.findIndex((r) => r.slug === b.slug) + 1;

const delta = b.ms.p50 - a.ms.p50;
const deltaPct = a.ms.p50 > 0 ? (delta / a.ms.p50) * 100 : 0;
const deltaPct = a.ms.p50 !== 0 ? (delta / a.ms.p50) * 100 : 0;

return new ImageResponse(
(
Expand Down
2 changes: 1 addition & 1 deletion src/app/compare/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ export default async function ComparePage({
// shared is empty (never actually reached because notFound() short-
// circuits above, but defensive).
const faqEntries: Array<{ q: string; a: string }> = [];
const aWinsBench = shared.find((s) => s.aggregateWinner === "a" && s.aResult.p50 > 0 && s.bResult.p50 > 0);
const aWinsBench = shared.find((s) => s.aggregateWinner === "a" && s.aResult.p50 !== 0 && s.bResult.p50 !== 0);
const bWinsBench = shared.find((s) => s.aggregateWinner === "b" && s.aResult.p50 > 0 && s.bResult.p50 > 0);
faqEntries.push({
q: `${a.name} vs ${b.name}: which one is better?`,
Expand Down
14 changes: 12 additions & 2 deletions src/app/products/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ export default async function ProviderPage({
if (!p) notFound();
const reg = getProviderRegistry(p.slug);

// Degraded-read tripwire: a provider listed on several benches never
// loses EVERY rank in the same cycle — that signature means the store
// read failed mid-render (srh timeout, snapshot swap), not that data
// is warming up. Throwing here makes the ISR revalidation fail, so
// Vercel keeps serving the last good render instead of caching a page
// full of "data warming up" for the next 5 minutes.
if (p.appearances.length >= 3 && p.appearances.every((a) => a.rank === 0)) {
throw new Error(`degraded store read for /products/${slug}: ${p.appearances.length} appearances, all unranked`);
}

// HyperTracker-parity dashboard for the 104 Hyperliquid frontends. The
// strip renders inline between the product header and the bench
// appearances list, only when the slug actually maps to a builder the
Expand Down Expand Up @@ -186,7 +196,7 @@ export default async function ProviderPage({
// 2026-07-05: only 2 of ~5000 pages indexed). Each sentence is derived
// from live measurements — no editorial claim.
const rankedAppearances = sorted.filter(
(a) => a.rank > 0 && a.result.ms.p50 > 0,
(a) => a.rank > 0 && a.result.ms.p50 !== 0,
);
const topLines: string[] = [];
for (const a of rankedAppearances.slice(0, 4)) {
Expand Down Expand Up @@ -624,7 +634,7 @@ export default async function ProviderPage({
<ol className="mt-4 divide-y divide-rule border-y border-rule">
{sorted.map((a) => {
const catColor = CATEGORY_COLOR[a.benchmark.category];
const hasData = a.rank > 0 && a.result.ms.p50 > 0;
const hasData = a.rank > 0 && a.result.ms.p50 !== 0;
const value = hasData ? fmtUnit(a.result.ms.p50, a.benchmark.unit) : null;
// Per-chain rank chips. Rendered alongside the aggregate rank
// when the bench declares chain dimensions and the provider has
Expand Down
Loading