Skip to content

feat(hl-perf-chart): add 30d/90d/1y range picker with DuckDB backfill - #850

Merged
Flotapponnier merged 1 commit into
devfrom
feat/hl-perf-chart-multi-range
Jul 2, 2026
Merged

Flotapponnier merged 1 commit into
devfrom
feat/hl-perf-chart-multi-range

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Summary

Extends HlPerformanceChart on /hyperliquid/[slug] with a 30d / 90d / 1y range picker so builders can see up to ~11 months of daily revenue and volume history. Long-window data comes from the existing hl-archive Go service (DuckDB on VPS, already populated with 332 daily aggregates back to 2025-08-01).

  • New route /api/builder/[slug]/daily-history?days=N — proxies through the existing getArchive() cache layer, looks up by slug (added to the archive payload via a new slug field in hl-archive's UpstashBuilder), and reshapes to the same wire format as /daily-series so the chart client only handles one payload shape.
  • HlPerformanceChart now derives its fetch URL from the active range: daily-series on 30d, daily-history on 90d / 1y. 1y renders as a smooth revenue area/line instead of a wall of 1-px bars. Users overlay is only shown on 30d because the archive schema doesn't persist per-day unique-users.
  • Biggest-day marker recomputes on the active series. Range picker preserves last-successful data on transient archive brownouts.

Companion Go change lands on VPS (already deployed): hl-archive now emits slug in UpstashBuilder so consumers can look up a builder without maintaining their own address→slug map. No new env vars, no new Caddy routes — reuses HL_ARCHIVE_API_URL + HL_ARCHIVE_API_KEY (already wired for the /hyperliquid bench history endpoint).

Test plan

  • pnpm typecheck clean
  • pnpm lint clean (no new warnings)
  • pnpm test — 74 pass
  • hl-archive rebuilt + recreated on VPS, /v1/aggregates?window=1y now emits slug per builder, dextrabot returns 332 daily points from 2025-08-01 to 2026-06-28
  • Preview URL: verify range picker on /hyperliquid/dextrabot (30d bars, 90d dense bars, 1y line/area)
  • Prod: curl https://openchainbench.com/api/builder/dextrabot/daily-history?days=365 returns 300+ points

@Flotapponnier
Flotapponnier merged commit 4eb7bc1 into dev Jul 2, 2026
1 check passed
@Flotapponnier
Flotapponnier deleted the feat/hl-perf-chart-multi-range branch July 17, 2026 14:42
bakabhai993 pushed a commit to bakabhai993/OpenChainBench that referenced this pull request Sep 12, 2026
…multi-range

feat(hl-perf-chart): add 30d/90d/1y range picker with DuckDB backfill
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