docs(ui): replace 49 hand-rolled docs.*.tsx thin routes with one dynamic docs.$slug.tsx route#8182
Conversation
32e8b17 to
e792fdf
Compare
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 8dd7fb1 | Commit Preview URL Branch Preview URL |
Jul 23 2026, 09:35 AM |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-23 09:21:51 UTC
Review summary Nits — 6 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed 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. Scroll preview
A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show. 🟩 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.
|
…celled() (#8189) An earlier, unrelated step failing anywhere in validate-code's long chain of drift checks (migrations, schema, env-reference, docs, manifest, engine-parity, branding, .nvmrc, release-manifest, observability, the MCP version audit) -- without continue-on-error -- skips every step after it by GitHub Actions' own default. "UI tests (ui-miner)" and "UI tests (miner-extension)" already had a !cancelled() guard for exactly this reason, but "Build UI-kit package", "Generate docs content collections", "UI lint", "UI typecheck", "UI tests (ui)", "Extension lint", "Extension typecheck", and "UI build" didn't. Confirmed live: a same-day MCP release tripped the version-audit step, which skipped "Build UI-kit package" entirely (no guard), and "UI tests (ui-miner)" (guarded, so it still ran) then failed with a confusing "Failed to resolve import '@loopover/ui-kit/components/...'" that looked like a real code regression instead of a skipped upstream build (PR #8182). The job as a whole still fails if any step fails -- this only stops one unrelated failure from masking every UI-specific result behind it, matching the resilience the two guarded test steps already had.
…mic docs.$slug.tsx route
Every docs page carried an identical hand-rolled TanStack route file: a loader
calling getDocPage, head/og meta duplicating the .mdx frontmatter's own
title/description, and the same DocsPage + Suspense/LoadingState body. Adding
a page meant touching 5+ files and regenerating the route tree; two tests
pinned the route-file count and had to be bumped on every addition.
- One dynamic docs.$slug.tsx route replaces all 49 per-page files. title/
description come from frontmatter (already did); eyebrow (the one real
per-page datum, previously a hand-copied JSX prop) moves into frontmatter
too, via a new required field in source.config.ts's page schema.
- docs.index.tsx (a real static page) and docs.fumadocs-spike-api-reference.tsx
(a standalone Scalar widget, not DocsPage/MDX at all) stay as their own
routes -- audited, neither is boilerplate this replaces.
- Every literal `to="/docs/<slug>"` Link across the app (nav sidebar, footer,
header dropdown, home page, install flow, agents/miners/maintainers pages)
now uses the typed `to="/docs/$slug" params={{ slug }}` form instead --
done properly with real params, not a type-erasing cast, including fixing
two pre-existing `as "/docs"` casts in docs-nav.tsx/docs.index.tsx found
along the way.
- docs.miner-coding-agent.tsx's three exported data arrays (asserted against
by a test, unrelated to routing) moved to
src/lib/miner-coding-agent-docs-data.ts; their test moved alongside them.
- The two route-file-count-pinning tests (docs-source-server-isolation,
docs-routes-loading-state) now assert the single dynamic route's shape
instead of a per-page count.
- Three test-only `Link` mocks (docs.ams-observability-callout,
install, install.permissions) updated to interpolate $-params the same
way the real router resolves them, so their href assertions stay faithful.
Verified in the browser: real docs pages render correctly (title/eyebrow/
description/MDX content), sidebar nav renders + highlights the active page,
client-side navigation works, a nonexistent slug renders a real 404, the
docs index and the untouched Scalar API route both still work.
Closes #8151.
e792fdf to
8dd7fb1
Compare
Bundle ReportChanges will decrease total bundle size by 69.75kB (-0.94%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: loopover-uiAssets Changed:
|
…it in the ui:lint chain (#8193) Root cause of the #8182 docs mangling: prettier coverage differed between what 'npm run format' would rewrite locally and what CI checked (nothing). Now the three UI workspaces agree everywhere: - .prettierignore in every workspace covers the generated artifacts (openapi.json, routeTree.gen.ts, dist, CHANGELOG.md) and — deliberately — content/docs: prettier's mdx pass reformats the template-literal code inside <CodeBlock code={`...`}> attributes, destroying embedded YAML/compose indentation. Docs mdx stays formatter-free. - One mechanical reformat brings every remaining file to prettier-clean. - Each workspace gains format:check, wired into the root ui:lint chain that CI's validate job and npm run test:ci already run — local format runs and CI now enforce the identical surface, so drift of this class cannot land silently again.
… runner YAML snippet, kill-switch route assertion Three drift tests went red on main when #8182 replaced the per-page docs routes with the dynamic docs.$slug.tsx route: - selfhost-docs-audit's manifest pointed at the deleted docs.*.tsx files; its entries now name the pages' real sources (content/docs/<slug>.mdx). - The whole-tree format pass in that PR stripped the indentation out of self-hosting-operations.mdx's multi-runner docker-compose example, leaving invalid YAML operators would copy-paste; the snippet is restored verbatim (mdx code blocks are not formatter-enforced in CI — eslint-only). - kill-switch-incident-runbook's route assertion now checks the dynamic route that actually serves the page.
… runner YAML snippet, kill-switch route assertion (#8192) Three drift tests went red on main when #8182 replaced the per-page docs routes with the dynamic docs.$slug.tsx route: - selfhost-docs-audit's manifest pointed at the deleted docs.*.tsx files; its entries now name the pages' real sources (content/docs/<slug>.mdx). - The whole-tree format pass in that PR stripped the indentation out of self-hosting-operations.mdx's multi-runner docker-compose example, leaving invalid YAML operators would copy-paste; the snippet is restored verbatim (mdx code blocks are not formatter-enforced in CI — eslint-only). - kill-switch-incident-runbook's route assertion now checks the dynamic route that actually serves the page.




Summary
Every docs page carried an identical hand-rolled TanStack route file: a loader calling
getDocPage, head/og meta duplicating the.mdxfrontmatter's own title/description, and the sameDocsPage+Suspense/LoadingStatebody. Adding a page meant touching 5+ files and regenerating the route tree; two tests pinned the route-file count and had to be bumped on every addition.docs.$slug.tsxroute replaces all 49 per-page files.title/descriptioncome from frontmatter (already did);eyebrow(the one real per-page datum, previously a hand-copied JSX prop) moves into frontmatter too, via a new required field insource.config.ts's page schema.docs.index.tsx(a real static page) anddocs.fumadocs-spike-api-reference.tsx(a standalone Scalar widget, notDocsPage/MDX at all) stay as their own routes -- audited, neither is boilerplate this replaces.to="/docs/<slug>"Linkacross the app (nav sidebar, footer, header dropdown, home page, install flow, agents/miners/maintainers pages) now uses the typedto="/docs/$slug" params={{ slug }}form instead -- done properly with real params, not a type-erasing cast, including fixing two pre-existingas "/docs"casts indocs-nav.tsx/docs.index.tsxfound along the way.docs.miner-coding-agent.tsx's three exported data arrays (asserted against by a test, unrelated to routing) moved tosrc/lib/miner-coding-agent-docs-data.ts; their test moved alongside them.docs-source-server-isolation,docs-routes-loading-state) now assert the single dynamic route's shape instead of a per-page count.Linkmocks (docs.ams-observability-callout,install,install.permissions) updated to interpolate$-params the same way the real router resolves them, so their href assertions stay faithful.self-hosting-security.mdx's Caddyfile sample thatgit diff --checkcaught once this PR's diff touched a nearby line.Reopened as a fresh PR (was #8181, which GitHub blocked from reopening after a force-push while closed -- an intentional GitHub safety restriction, not an error).
Closes #8151.
Test plan
npm run --workspace apps/loopover-ui typecheck-- clean, zero errors (25 real type errors from the route collapse fixed with properparams, not casts).npm run --workspace apps/loopover-ui lint-- 0 errors (pre-existing repo-widereact-refresh/only-export-componentswarnings on route files, unrelated to this change).apps/loopover-uitest suite: 509/509 passing across 81 files.npm run docs:drift-check-- clean.npm run --workspace apps/loopover-ui build-- production build succeeds.git diff --check-- clean./docs/quickstart) renders correct title/eyebrow/description/MDX content; sidebar nav renders and highlights the active page; client-side navigation between docs pages works; a nonexistent slug renders a real 404 with a "Go home" link; the docs index (/docs) and the untouched Scalar API reference route (/docs/fumadocs-spike-api-reference) both still work.apps/**, outsidecoverage.include, so Codecov does not gate this patch (per the issue's own Test Coverage Requirements note).