fix(ui): show StatUnavailable when KPI source queries fail (#8818) - #8935
Closed
kurosawareiji7007-hub wants to merge 1 commit into
Closed
fix(ui): show StatUnavailable when KPI source queries fail (#8818)#8935kurosawareiji7007-hub wants to merge 1 commit into
kurosawareiji7007-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] to match KPI value-line height. Keep the Total stake Coins glyph only on the ready branch so it never sits beside the error indicator.
Contributor
|
Important 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏳ LoopOver is waiting…LoopOver has seen this pull request and is waiting on CI checks to finish before reviewing it. This comment will update once the review runs. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟨 Waiting |
|
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 #8935 +/- ##
=======================================
Coverage 97.93% 97.93%
=======================================
Files 450 450
Lines 31585 31585
Branches 11778 11778
=======================================
Hits 30934 30934
Misses 150 150
Partials 501 501 🚀 New features to boost your workflow:
|
JSONbored
reviewed
Jul 31, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
Does not look any different from the previous attempts. Closing.
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.
Closes #8818
Supersedes closed #8933 (maintainer: Total stake showed Coins glyph + StatUnavailable together on desktop/tablet), #8926, #8905, #8901, #8899.
Desktop/tablet fix (vs #8933)
The compact masthead "Total stake" strip always rendered the decorative
Coinsicon beside the figure. On error that produced Coins + AlertCircle + "Unavailable". The Coins glyph now only renders on the ready branch withformatTao(...).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