fix(ui): share one theme-adaptive SuccessBadge across the extrinsic feeds#6511
Conversation
…eeds
extrinsics.index.tsx and call-module-extrinsics-table.tsx each defined a
byte-identical private SuccessBadge on raw text-emerald-500/text-rose-500, and
blocks.$ref.tsx implemented the same semantic inline while disagreeing with
itself: its fail branch already used text-health-down while its success branch
stayed on emerald.
The raw Tailwind palette is not theme-adaptive for this semantic --
text-health-ok / text-health-down are the tokens the rest of the app uses for
exactly ok/down (52 and 70 call sites), so an emerald success indicator was the
odd one out in both themes.
- Extracts one shared components/metagraphed/success-badge.tsx on the health
tokens; both duplicate definitions are deleted and their call sites import it.
- blocks.$ref.tsx keeps its own rendering and takes the issue's second option
(align the success branch to the token). It spells the result out
('Success'/'Failed') rather than the feeds' 'ok'/'fail', so swapping in the
shared badge would have silently reworded the page -- a change the issue did
not ask for. What it borrows is the token pair, which is the actual defect.
success == null still renders the muted em-dash: the tier has no reading for
that extrinsic, which is not a failure.
No new type errors (34 before, 34 after -- all pre-existing, from a stale local
ui-kit build); eslint 0 errors on the committed blobs.
|
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 #6511 +/- ##
=======================================
Coverage 97.85% 97.85%
=======================================
Files 174 174
Lines 22196 22196
Branches 8798 8798
=======================================
Hits 21721 21721
Misses 81 81
Partials 394 394 🚀 New features to boost your workflow:
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-17 17:31:40 UTC
Review summary Nits — 6 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
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. 🟩 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.
|
Closes #6403
The bug
extrinsics.index.tsxandcall-module-extrinsics-table.tsxeach defined a byte-identical privateSuccessBadgeon rawtext-emerald-500/text-rose-500.blocks.$ref.tsximplemented the same semantic inline while disagreeing with itself — its fail branch already usedtext-health-downwhile its success branch stayed on emerald.The raw Tailwind palette isn't theme-adaptive for this semantic:
text-health-ok/text-health-downare the tokens the rest of the app uses for exactly ok/down (52 and 70 call sites), so an emerald success indicator was the odd one out in both themes.Screenshots
The
/extrinsicsfeed's Result column. The change is a colour token, so the capture scrolls the table into frame and reports the computed colour rather than asking you to trust the pixels:before
after
before
after
before
after
before
after
before
after
before
after
The fix
components/metagraphed/success-badge.tsxon the health tokens. Both duplicate definitions are deleted and their call sites import it.success == nullstill renders the muted em-dash — the tier has no reading for that extrinsic, which is not a failure.blocks.$ref.tsxdeliberately keeps its own rendering and takes the issue's second option ("or align its success branch to the same token"). That table spells the result out — "Success"/"Failed" — rather than the feeds' "ok"/"fail", so swapping in the shared badge would have silently reworded the page, a change the issue didn't ask for. What it borrows is the token pair, which is the actual defect.Verification
text-emerald-500/text-rose-500remains in any of the three files; exactly oneSuccessBadgedefinition now exists in the app.main(a stale local ui-kit build reporting acompactprop mismatch, including in a file I touched; I verified the count against a clean checkout rather than assume).eslinton the committed blobs: 0 errors.prettier --check: clean.behind: 0.