diff --git a/src/app/alternatives/[slug]/page.tsx b/src/app/alternatives/[slug]/page.tsx index 1488a209..e95babd9 100644 --- a/src/app/alternatives/[slug]/page.tsx +++ b/src/app/alternatives/[slug]/page.tsx @@ -250,7 +250,7 @@ export default async function AlternativePage({
)} - {!isDraft && benchmark.unit !== "count" && ( -
- - - - 0 ? `${tailSpread.toFixed(1)}×` : "-"} - hint={ - tailSpread > 0 - ? `${fmtUnit(tailMin, benchmark.unit)} → ${fmtUnit(tailMax, benchmark.unit)}` - : undefined - } - /> -
- )} + {!isDraft && benchmark.unit !== "count" && (() => { + // For higher-is-better benches (e.g. HL frontends USD revenue), the + // "best" headline is the max value, not the min. Latency benches keep + // the original min=best mapping. + const higherIsBetter = benchmark.higherIsBetter === true; + const bestValue = higherIsBetter ? fieldMax : fieldMin; + const worstValue = higherIsBetter ? fieldMin : fieldMax; + return ( +
+ + + + 0 ? `${tailSpread.toFixed(1)}×` : "-"} + hint={ + tailSpread > 0 + ? `${fmtUnit(tailMin, benchmark.unit)} → ${fmtUnit(tailMax, benchmark.unit)}` + : undefined + } + /> +
+ ); + })()} {!isDraft && ( <>