Miner dashboard: /miners route, leaderboard, crown grid + rate chart, diagnostic#90
Open
LandynDev wants to merge 4 commits into
Open
Miner dashboard: /miners route, leaderboard, crown grid + rate chart, diagnostic#90LandynDev wants to merge 4 commits into
LandynDev wants to merge 4 commits into
Conversation
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.
4 tasks
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem → Solution
Problem — miners can't see why they aren't earning without DMing the team
/minersroute (and/miners/:hotkeyfiltered 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,← earlierpan, 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
FilteredMinerSectionwith a blue-rail surface treatment + scroll-into-view on mount.EarningNowBannershows the top-severity diagnostic with a copy-to-clipboard action;EarningDiagnosticshows the full rule list;MinerSwapHistoryshows recent swaps with timed-out / completed pills.URL state contract
All view state serializes to
useSearchParamsso debuggers can share an exact view:range,pair,crownRange,rateRange,pan. Recently-viewed miners are cached inlocalStorageunderallways.recentMiners(capped at 5).Test plan
npm run build— clean, MinersPage chunk is 24 kB / 8 kB gzipminer-dashboard-mock.html— colors, typography, and spacing come from existing theme tokensRelated PRs
Part of the miner-dashboard rollout — merge in dependency order: