fix(ui): surface shared ErrorState for GapsPanel fetch failures (#3961)#4907
fix(ui): surface shared ErrorState for GapsPanel fetch failures (#3961)#4907shin-core wants to merge 1 commit into
Conversation
|
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 #4907 +/- ##
=======================================
Coverage 97.87% 97.87%
=======================================
Files 162 162
Lines 19986 19986
Branches 7508 7508
=======================================
Hits 19562 19562
Misses 59 59
Partials 365 365 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-11 15:49:13 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 7 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory 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://gittensory.aethereal.dev/docs/gittensory-commands Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
JSONbored
left a comment
There was a problem hiding this comment.
Currently blocked by #4867 (as mentioned in Discord overnight), please hold off on further UI / frontend PRs until I get the UI refactor/package completed.
The UI issue direction will be shifting and new tools (like Claude Design) will be able to be easily used once I finish, which will allow for far better design opportunities and overall better submissions.
Also, your error states appear left aligned when they should be centered, pretty sure we already have that pattern established elsewhere in the repo, so please confirm + follow that pre-existing pattern.
Closing.

Summary
GapsPanel(apps/ui/src/routes/subnets.$netuid.tsx) was the only tab-panel on the subnet detail page handling loading/error manually via plainuseQuery; on a genuine fetch error it rendered the same flatEmptyStateused for the "no outstanding gaps" success case (just different copy, "Gaps unavailable") — no red border, no retry. Every sibling tab wraps its fetch inQueryErrorBoundary+Suspenseand gets the shared red-borderedErrorState(with Retry) on failure.This migrates
GapsPanelto that same pattern: the wrapper rendersSectionAnchor+QueryErrorBoundary+Suspense, and an innerGapsListusesuseSuspenseQuery. A genuine error now surfaces the sharedErrorStateautomatically; the "no outstanding gaps" successEmptyStateis unchanged.Change
subnets.$netuid.tsx(GapsPanelsplit intoGapsPanelwrapper +GapsList).isLoadingskeleton branch (now theSuspensefallback) and the manualerror→EmptyStatebranch (now the boundary's sharedErrorState).subnetGapsQueryor the "no outstanding gaps" definition (issue non-goals); compact overview usage preserved via thecompacttitle prop.Verification (behavioral)
Aborting
/api/v1/subnets/1/gapson/subnets/1?tab=gaps: the panel now renders the sharedErrorState("Couldn't load…" + Retry) after React Query's retry backoff, and the old flat "Gaps unavailable" EmptyState no longer appears. The success case is unchanged.Screenshots
Gaps fetch blocked on
/subnets/1?tab=gaps. Before: flat borderless "Gaps unavailable" empty-state (no retry). After: the shared red-borderedErrorStatewith a Retry action, matching the sibling tabs.before
after
before
after
before
after
before
after
before
after
before
after
Validation
Closes #3961