Skip to content

Dashboard: status-grouped rate sort + filter inactive miners from depth#95

Merged
LandynDev merged 1 commit into
testfrom
dashboard/sort-by-status-filter-inactive-depth
May 19, 2026
Merged

Dashboard: status-grouped rate sort + filter inactive miners from depth#95
LandynDev merged 1 commit into
testfrom
dashboard/sort-by-status-filter-inactive-depth

Conversation

@e35ventura
Copy link
Copy Markdown
Collaborator

Summary

Two related dashboard ordering bugs surfaced while reviewing the home page:

Active Rates table sorted by a misleading rate score. maxRate picked 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 like 1,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.00 rate 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 replaces maxRate. 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.isActive out of the depth aggregation.

Test plan

  • Active Rates: Available miners sit above Inactive ones regardless of column sort.
  • Active Rates: switching the direction filter to "TAO → BTC" pushes the 1M-rate miner to the bottom of its status group, not the top.
  • Active Rates: "Both" filter sorts bidirectional miners by tightest spread first.
  • Depth of Market: TAO → BTC view no longer shows the 1,000,000.00 row or any zero-capacity dust rows.
  • npm run lint, npm run build pass.

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.
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 17, 2026
@LandynDev LandynDev merged commit 8ea6939 into test May 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants