Skip to content

fix: Top-N on default chart view + drop unscored rows from ledger - #263

Closed
Flotapponnier wants to merge 2 commits into
devfrom
fix/ranked-bar-top-n-and-hide-unscored
Closed

fix: Top-N on default chart view + drop unscored rows from ledger#263
Flotapponnier wants to merge 2 commits into
devfrom
fix/ranked-bar-top-n-and-hide-unscored

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Problem

Two related gaps surfaced on the hl-frontends bench after expanding to 60 providers:

  1. Top-N selector was missing from the default chart view. The Top 5/10/20/All toggle landed only on time-series-chart.tsx in PR chart: top-N selector for crowded cohorts #257/fix(chart): top-N selector hidden on metrics with sparse data #258, but the bench page renders the Ranked Bar view by default. Reader sees the toolbar on the time-series tab but not on the headline view, looks confused.

  2. Unscored rows polluted both the ranked-bar list and the ledger. Providers whose Prom queries returned nothing this cycle were rendered as a long tail of "Currently unavailable / Awaiting next successful scrape" entries. On a 60-row cohort that's 20+ noise rows readers have to scroll past, and it makes the page look broken even when it isn't.

Fix

  1. Top-N on RankedBarChart — mirrors the time-series version: sized off benchmark.results.length, default Top 20 when cohort > 20, hidden when cohort ≤ 10.

  2. Unscored filter — drops rows where availability === "unavailable" && ms.p50 === 0. Applied identically in ranked-bar-chart.tsx and ledger-table.tsx so the chart and the table tell the same story. Providers stay in the underlying spec so /products/<slug> pages still resolve (SEO coverage preserved), they just no longer pollute the leaderboard surfaces.

Test plan

  • hl-frontends default view (Ranked Bar) shows the Top 5 / 10 / 20 / All toggle, default Top 20
  • Ledger no longer renders rows with "Currently unavailable / Awaiting" — only scored providers
  • /products/<slug> still resolves for every spec provider (including unscored ones)
  • Benches with ≤10 providers (aggregator-head-lag, l1-finality, ...) unchanged

Web search confirmed user is not alone. WebKit bug 297779 reports that
on iOS 26 Safari + WKWebView (Telegram in-app browser, Chrome iOS), any
position: fixed element drifts 10-24 px when scroll direction reverses,
exposing the page under the header through a thin gap. Mastodon and
LinkedIn ship the same symptom. Apple acknowledged the bug, partially
fixed it in iOS 26.1 but residual reports persist into Dec 2025.
position: sticky uses a different render path in WebKit that does not
trip the jitter heuristic. It is also simpler:
- no spacer div needed (the element stays in normal flow)
- no useRef + ResizeObserver to keep the spacer in sync
- no headerH state
Net: -25 lines on top of fixing the cosmetic gap. Desktop and standalone
Safari behavior are identical, sticky just renders more reliably in
WebViews.
Refs:
- https://bugs.webkit.org/show_bug.cgi?id=297779
- mastodon/mastodon#36144
- TelegramMessenger/Telegram-iOS#1748
@Flotapponnier

Copy link
Copy Markdown
CollaboratorAuthor

Closing as part of branch/PR cleanup

@Flotapponnier
Flotapponnier deleted the fix/ranked-bar-top-n-and-hide-unscored branch June 18, 2026 20:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Flotapponnier