Skip to content

docs.*.tsx routes hand-roll a plain-text Suspense fallback instead of LoadingState (46 files) #6982

Description

@JSONbored

Context

46 files under apps/loopover-ui/src/routes/docs.*.tsx (e.g. docs.quickstart.tsx:44, docs.tuning.tsx:44, docs.troubleshooting.tsx:44, and 43 others) all wrap their MDX/content component in the identical literal:

<Suspense fallback={<p className="text-token-sm text-muted-foreground">Loading…</p>}>

This app already has a LoadingState component built for exactly this purpose — apps/loopover-ui/src/components/site/state-views.tsx, imported as import { LoadingState } from "@/components/site/state-views" (see apps/loopover-ui/src/routes/changelog.tsx:5 for a real usage) — the docs routes never adopted it, so a future loading-state upgrade (spinner, skeleton, a11y role="status") requires editing 46 files instead of one shared component. Note: state-views.tsx is currently app-local, not yet ported into @loopover/ui-kit proper (that port is tracked separately as #6827) — import from its current app-local path, not from @loopover/ui-kit.

Requirements

  • Replace the plain-text <p>Loading…</p> fallback in all 46 docs.*.tsx route files with LoadingState imported from @/components/site/state-views (the same import every other consumer in this app already uses).
  • Do not introduce a new loading component or inline JSX pattern — this issue is satisfied only by importing and using the existing LoadingState primitive, not by writing a new one.
  • No change to Suspense's boundary placement or the content component itself.

Deliverables

  • All 46 docs.*.tsx route files use LoadingState as their Suspense fallback
  • Test asserting at least one docs route renders LoadingState's expected markup while suspended

Test Coverage Requirements

apps/** UI code falls outside this repo's strict Codecov patch gate (check coverage.include) — a before/after screenshot (or short recording of the loading flash) is still required per this repo's UI-PR convention, plus the regression test above.

Expected Outcome

Every docs route's loading fallback goes through the one shared LoadingState component instead of 46 independent copies of the same literal.

Links & Resources

apps/loopover-ui/src/components/site/state-views.tsxLoadingState's definition. apps/loopover-ui/src/routes/changelog.tsx:5 for a real import/usage precedent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions