Skip to content

fix(hl-frontends): don't linkify raw hex builder slugs (404 fix)#771

Merged
Flotapponnier merged 4 commits into
mainfrom
fix/no-link-hex-builder-slugs
Jun 28, 2026
Merged

fix(hl-frontends): don't linkify raw hex builder slugs (404 fix)#771
Flotapponnier merged 4 commits into
mainfrom
fix/no-link-hex-builder-slugs

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Problem

On `/benchmarks/hyperliquid-frontends`, builder rows whose address isn't in `builders.json` show up with a truncated hex slug (e.g. `0x557e…3c81`). The ledger-table renderer unconditionally wrapped every name in a `<Link href=/products/>`, but `/products/` is blacklisted by PR #747's `HEX_ADDRESS_SLUG` regex → click = 404.

Reported by user: "les hyperliens sont cassés sur les adresses type 0x557e…3c81".

Fix

  • Export new `isHexAddressSlug()` helper from `providers.ts` (reusing the existing `HEX_ADDRESS_SLUG` regex)
  • In `ledger-table.tsx`, treat hex slugs like region slugs: render the name as plain text instead of an anchor

When a builder gets identified and added to `/opt/hl-bench/builders.json` (deep-research in progress), its slug becomes the kebab name → link reappears automatically.

Test plan after deploy

  • Visit `/benchmarks/hyperliquid-frontends` — rows with `0x...` names are plain text, no underline/hover, no 404 on click
  • Rows with named slugs (phantom-perps, axiom, pvp-trade) still link to `/products/` (200)

Florent Tapponnier added 4 commits June 28, 2026 12:27
The HL frontends bench leaderboard renders one row per builder. When
a builder address isn't yet in /opt/hl-bench/builders.json, the row
slug stays as a truncated 8-char hex prefix (e.g. 0x557edb25). The
ledger-table component unconditionally wraps every row name in a
<Link href='/products/<slug>'>, but /products/<hex> is blacklisted in
providers.ts (HEX_ADDRESS_SLUG regex), so the link 404s.

Now hex slugs render as plain text — same path as region slugs — until
the builder gets identified and added to builders.json, at which
point the slug becomes a real name and the link reappears.
providers.ts is server-only (unstable_cache + bench loaders); importing
isHexAddressSlug from it into this 'use client' component breaks
Turbopack build. Inline the regex check instead, same pattern as the
existing isRegion/isAll inline checks.
@Flotapponnier
Flotapponnier merged commit 3ea230c into main Jun 28, 2026
1 check passed
@Flotapponnier
Flotapponnier deleted the fix/no-link-hex-builder-slugs branch July 17, 2026 14:42
Sign up for free to 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