fix(ui): show StatUnavailable when KPI source queries fail (#8818) - #8933
fix(ui): show StatUnavailable when KPI source queries fail (#8818)#8933kurosawareiji7007-hub wants to merge 1 commit into
Conversation
…#8818) Phase Total stake, Positions, ActivityEventRollup, and Sudo key through statPhase so a failed request cannot fabricate 0 / no positions / Unset. Pass portfolioPhase into AccountKpiBand. Size StatUnavailable with h-[1em] so error tiles match neighbouring KPI value-line height.
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-31 13:32:04 UTC
Review summary Nits — 6 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual previewClick any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy · Diff highlights exactly what changed. Scroll previewA short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8933 +/- ##
=======================================
Coverage 97.93% 97.93%
=======================================
Files 449 449
Lines 31546 31546
Branches 11778 11778
=======================================
Hits 30895 30895
Misses 150 150
Partials 501 501 🚀 New features to boost your workflow:
|









Closes #8818
Supersedes closed #8926 (maintainer: StatUnavailable not uniformly sized across viewports), #8905, #8901, #8899.
Summary
Four KPI surfaces rendered a confident
0/"no positions"/"Unset"when their sourceuseQueryfailed. Wired each throughstatPhase+StatUnavailable.StatUnavailablenow usesh-[1em]so error tiles match the parent KPI value-line height (StatTile display metrics) instead of collapsing totext-smbeside numeric neighbours.What changed
/subnetsTotal stake —statPhase(economicsRes)/accounts/<ss58>Positions —portfolioPhase={statPhase(portfolioResult)}intoAccountKpiBand/subnets/<netuid>?tab=activityActivityEventRollup — independent phases; dual failure still renders Unavailable tiles/chain/governanceSudo key — error →StatUnavailableTest plan
Unavailable(account/subnets/sudo/subnet rollup)portfolioResult is not defined)mg-theme)Screenshots
Blocked:
/api/v1/economics,.../portfolio,.../event-summary,.../axon-removals,/api/v1/sudo/key./subnetsTotal stakebefore
after
before
after
before
after
before
after
before
after
before
after
Account Positions KPI
before
after
before
after
before
after
before
after
before
after
before
after
/subnets/1?tab=activityActivity rollupbefore
after
before
after
before
after
before
after
before
after
before
after
Governance Sudo key
before
after
before
after
before
after
before
after
before
after
before
after