Dashboard: status-grouped rate sort + filter inactive miners from depth#95
Merged
Merged
Conversation
Active Rates table now sorts with status as the primary key (Available → Reserved → Exchanging → Inactive) so the panel reads top-to-bottom as "who can I trade with right now." Inactive miners stay visible for transparency, just at the bottom. The rate sort is now direction-aware. Forward (BTC→TAO) and reverse (TAO→BTC) are both quoted as TAO per 1 BTC, but "good" runs in opposite directions: higher forward = customer receives more TAO, lower reverse = customer pays less TAO. The previous max(forward, reverse) heuristic treated quote-rejecting reverse values (e.g. 1,000,000 τ) as the best rate and floated those miners to the top. Score by whichever side matches the active direction filter; "Both" sorts by tightest spread. Depth of Market was iterating every miner regardless of state, so dust collateral from inactive UIDs produced ghost rows that stretched the rate axis (visible as a 1,000,000 τ row in TAO→BTC depth). Filter to isActive miners, matching the panel's "active miners" tooltip framing.
LandynDev
approved these changes
May 19, 2026
5 tasks
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.
Summary
Two related dashboard ordering bugs surfaced while reviewing the home page:
Active Rates table sorted by a misleading rate score.
maxRatepicked the larger of the two quoted rates, but forward (BTC→TAO) and reverse (TAO→BTC) have opposite "good" directions — higher forward is better, lower reverse is better. A miner posting a quote-rejecting reverse value like1,000,000 τgot sorted to the top as if that were a great rate. The bigger framing issue: inactive miners were mixed in with active ones at every sort, which made the panel hard to read for its actual purpose (finding a counterparty).Depth of Market included inactive miners. The aggregation iterated every miner regardless of state, so dust collateral on inactive UIDs produced ghost rows (visible in TAO→BTC as a
1,000,000.00rate row stretching the axis). The panel's tooltip already claimed it shows "active miners" — code now matches.Changes
MinerRatesTable: status is the primary sort key (Available → Reserved → Exchanging → Inactive). Inactive miners stay visible for transparency but drop to the bottom of the table.MinerRatesTable: direction-aware rate score replacesmaxRate. Forward filter sorts by forward rate desc, reverse by reverse rate asc, "Both" by tightest spread. "All" defaults to forward-rate desc.OrderbookDepth: filter!m.isActiveout of the depth aggregation.Test plan
1,000,000.00row or any zero-capacity dust rows.npm run lint,npm run buildpass.