Skip to content

Miner dashboard: /miners route, leaderboard, crown grid + rate chart, diagnostic#90

Open
LandynDev wants to merge 4 commits into
testfrom
feat/miner-dashboard
Open

Miner dashboard: /miners route, leaderboard, crown grid + rate chart, diagnostic#90
LandynDev wants to merge 4 commits into
testfrom
feat/miner-dashboard

Conversation

@LandynDev
Copy link
Copy Markdown
Collaborator

@LandynDev LandynDev commented May 12, 2026

Problem → Solution

Problem — miners can't see why they aren't earning without DMing the team

  • The classic Luis-style case: a miner posts a rate, sees no earnings, has no public surface to diagnose.
  • New /miners route (and /miners/:hotkey filtered detail). Surfaces who holds the crown right now, who held it historically, leaderboard, per-block crown grid, rate chart, and a per-miner diagnostic that explains the current state.

Problem — historical crown derivation isn't visible

  • CrownHistoryGrid — 60-col per-block grid, direction tabs (BTC→TAO / TAO→BTC), 1h / 4h ranges, ← earlier pan, uid search highlight, tie indicator (half-tone overlay), tooltip on every cell.
  • CrownRateChart — step-line SVG with hover crosshair + tooltip and an optional miner-rate overlay (dashed) when filtered.

Problem — diagnostic / banner / swap history needs to be discoverable from the leaderboard

  • FilteredMinerSection with a blue-rail surface treatment + scroll-into-view on mount. EarningNowBanner shows the top-severity diagnostic with a copy-to-clipboard action; EarningDiagnostic shows the full rule list; MinerSwapHistory shows recent swaps with timed-out / completed pills.

URL state contract

All view state serializes to useSearchParams so debuggers can share an exact view: range, pair, crownRange, rateRange, pan. Recently-viewed miners are cached in localStorage under allways.recentMiners (capped at 5).

Test plan

  • npm run build — clean, MinersPage chunk is 24 kB / 8 kB gzip
  • Direct port from miner-dashboard-mock.html — colors, typography, and spacing come from existing theme tokens
  • Empty-state copy for every component (no miners / no rate activity / no swaps yet / no rate history yet)
  • After merge: manual sweep against staging — network view + filtered view + sticky header

Related PRs

Part of the miner-dashboard rollout — merge in dependency order:

  1. allways-db#15 — schema
  2. alw-utils#56 — sync utility
  3. das-allways#17 — API
  4. allways-ui (this PR) — page + components

New /miners route (and /miners/:hotkey detail variant) lands the dashboard described in plans/miner-dashboard.md and matches the miner-dashboard-mock.html visual reference. Components live under components/miners: StickyNetworkHeader (current block + crown holders + halt banner), NetworkOverviewStats (volume / swaps / active miners / pair mix), MinerLeaderboard (rail-crown, range chips, click-row to filter), CrownHistoryGrid (60-col per-block grid, direction tabs, 1h/4h range, uid highlight), CrownRateChart (step-line SVG, hover crosshair, optional miner overlay), FilteredMinerSection (EarningNowBanner + EarningDiagnostic + per-miner rate chart + swap history). URL state is the source of truth — range, pair, crownRange, rateRange, pan all live in useSearchParams. Recent miners are cached in localStorage at allways.recentMiners.
LandynDev and others added 3 commits May 12, 2026 17:22
…add 2h scoring-window range

MinersPage wraps in Page rather than a 100vh Box so the site Footer renders correctly below the content. NetworkOverviewStats switches from a Stack-with-bg-as-divider trick to a CSS Grid with per-cell borders so a shorter tile never reveals a grey strip beneath the row. CrownHistoryGrid's empty-state + as-of Typography elements get component='div' so they stack on separate lines instead of collapsing inline. Adds a 2h range chip that snaps to multiples of SCORING_WINDOW_BLOCKS (600) so the grid mirrors the validator's actual scoring window; pan moves back one window at a time and a 'latest →' shortcut returns to the in-progress window.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant