fix(ui): adopt LoadingState in docs route Suspense fallbacks#7171
Conversation
46 docs.*.tsx routes hand-rolled an identical plain-text <p>Loading…</p> Suspense fallback instead of the shared LoadingState primitive every other consumer in this app already uses, so a future loading-state upgrade required editing 46 files instead of one shared component. Closes JSONbored#6982
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-18 06:25:21 UTC
Review summary Nits — 3 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. Visual previewClick 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|




Summary
docs.*.tsxroute files underapps/loopover-ui/src/routes/each hand-rolled the identical literal<Suspense fallback={<p className="text-token-sm text-muted-foreground">Loading…</p>}>instead of the sharedLoadingStatecomponent (@/components/site/state-views, re-exported from@loopover/ui-kit) that every other consumer in this app already uses (seechangelog.tsx's<LoadingState title="Loading from npm…" />).<Suspense fallback={<LoadingState />}>and added the matching import.LoadingState's defaulttitleis exactly"Loading…", so the visible text is unchanged — the only difference is the shared component'srole="status"/aria-live="polite"accessible markup and spinner icon, in place of a plain, non-semantic<p>.docs.*.tsxglob were deliberately left untouched:docs.index.tsx(a static landing page with no MDX content or Suspense boundary) anddocs.fumadocs-spike-api-reference.tsx(wrapsClientOnly, notSuspense, for an unrelated Scalar API-reference spike, Spike: prototype fumadocs-mdx + Scalar docs pipeline on TanStack Start #6037).docs.tsx(the shared parent layout route) was also out of scope.Suspense's boundary placement or the content component itself, per the issue's explicit scope.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #6982
Validation
git diff --checknpm run typecheck(vianpm run ui:typecheck, which builds@loopover/ui-kitthen typechecks@loopover/uiand@loopover/ui-miner) — clean, no errors.npm run ui:lint— 0 errors (pre-existing, unrelatedreact-refresh/only-export-componentswarnings on other files are untouched baseline noise).npm run ui:test— full workspace run:@loopover/ui(65 files / 373 tests),@loopover/ui-miner(25 files / 291 tests),@loopover/miner-extension(5 files / 33 tests) — all passing, including the two new tests indocs-routes-loading-state.test.tsx.npm run test:workers/npm run build:mcp/npm run test:mcp-pack/npm run ui:openapi:check(not applicable — this PR only touchesapps/loopover-ui/src/routes/**, no API/schema/worker/MCP surface)npm audit --audit-level=moderate(no dependency changes)apps/**is outside Codecov's strict patch gate, but a new regression test assertsLoadingState's accessiblerole="status"markup renders while suspended, plus a second test that all 46 in-scopedocs.*.tsxfiles import and useLoadingStateas their sole Suspense fallback (guarding against a future file re-adding the old inline<p>pattern).If any required check was skipped, explain why:
npm run ui:buildcurrently fails on this sandbox with an unrelated pre-existing error (Rolldown failed to resolve import "@scalar/api-reference"fromdocs.fumadocs-spike-api-reference.tsx, a file this PR does not touch) — reproduced identically on a cleanmaincheckout before starting this change, confirming it's a local dependency-install gap, not something this diff introduces."CodeBlock is not defined"error from the MDX content provider — reproduces on every docs route regardless of whether the page has code fences, confirming it's a systemic dev-environment/MDX-provider wiring issue unrelated to this diff (no MDX component,docs-mdx-components.tsx, ordocs-client-loader.tsxfile was touched). See the UI Evidence section below for how screenshot evidence was captured instead.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots.UI Evidence
Captured by navigating Playwright to the real running app (so the actual compiled Tailwind stylesheet and dark theme are loaded exactly as production serves them), then rendering both fallback markups side by side — the old hand-rolled
<p>and the newLoadingStateoutput (same DOM shapeLoadingStateactually renders:Shell+Spinner), since a live docs-route navigation is blocked in this sandbox by the unrelated pre-existing MDX error noted above.