Skip to content
Merged
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
9 changes: 5 additions & 4 deletions src/app/benchmarks/[slug]/share-card/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -800,10 +800,11 @@ async function renderLeaderboard(
) {
const allSorted = sortByP50(benchmark);
// Hard row cap so the last row can't collide with the CardFooter
// border in the 630 px canvas (observed on wormhole-vaa-latency with
// 14 chains: Moonbeam overprinted the "OPENCHAINBENCH.COM · No 101"
// divider). If truncated, an "and N more" line is appended below.
const MAX_ROWS = 10;
// border in the 630 px canvas. First pass used 10 but Moonbeam (row 10)
// still bled into the footer divider on wormhole-vaa-latency (14 chains,
// long two-line title). 9 rows + one italic "and N more" line lands
// comfortably above the footer even in the worst-case title wrap.
const MAX_ROWS = 9;
const sorted = allSorted.slice(0, MAX_ROWS);
const truncatedCount = Math.max(0, allSorted.length - sorted.length);
const maxP50 = Math.max(...sorted.map((r) => r.ms.p50)) || 1;
Expand Down
Loading