Skip to content

fix(ui): resolve "CodeBlock is not defined" crash on docs pages#7614

Merged
loopover-orb[bot] merged 1 commit into
mainfrom
fix/docs-codeblock-not-defined-7578
Jul 21, 2026
Merged

fix(ui): resolve "CodeBlock is not defined" crash on docs pages#7614
loopover-orb[bot] merged 1 commit into
mainfrom
fix/docs-codeblock-not-defined-7578

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Root cause: content/docs/maintainer-workflow.mdx pulls its <WorkflowMirror> steps prop out into a top-level export const steps = [...] ESM block that embeds <CodeBlock> JSX. fumadocs-mdx only resolves capitalized JSX tags against the components prop (with a friendly "missing reference" guard) inside the markdown body, compiled into _createMdxContent. A top-level export const runs eagerly at module-evaluation time, before any components prop exists, so an unimported provided-component name there is a bare, unresolved identifier — a raw ReferenceError: CodeBlock is not defined, not fumadocs' friendly message.
  • Why it broke every docs page, not just its own: docs-source.ts (used by every docs.*.tsx route's server loader) imports fumadocs-mdx's generated collections/server module, which globs all content/docs/*.mdx files with eager: true. One file throwing during module evaluation takes down every docs route's SSR loader, not just /docs/maintainer-workflow.
  • Fix: import CodeBlock directly into the .mdx file (import { CodeBlock } from "@/components/site/primitives";), the same way it already imports MAINTAINER_COMMAND_LIST/PUBLIC_COMMAND_LIST. MDX treats an explicitly-imported identifier as a normal JS binding rather than routing it through the components prop, so it resolves correctly regardless of eager vs. lazy evaluation.
  • Added a regression test (apps/loopover-ui/src/routes/docs-mdx-eager-scope.test.ts) that scans every content/docs/*.mdx file's top-level export const blocks for JSX tags that are only supplied via the MDX components prop (cross-checked against the real docsMdxComponents map) and not also directly imported — guarding the whole bug class, not just this one file.

Closes #7578

Root cause detail (for reviewers)

The original issue's read-only investigation correctly ruled out dep-cache staleness, HMR, missing imports, and circular imports, and confirmed the compiled MDX output looked structurally correct — because it was. The actual failure never went through the rendering path it inspected. Instrumenting docs-client-loader.tsx's component() callback showed it was never called before the crash. Capturing the real (unformatted) error stack — the React-proxied console log truncates it — showed the true origin:

ReferenceError: CodeBlock is not defined
    at http://localhost:8080/content/docs/maintainer-workflow.mdx?collection=docs:71:130

...thrown while docs-source.ts's eager glob (apps/loopover-ui/.source/server.ts, import.meta.glob([...], { eager: true })) evaluated maintainer-workflow.mdx's compiled module — triggered by literally any docs route's server loader (including /docs/quickstart, the page from the original report).

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (Closes #7578).

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally — this change touches only apps/loopover-ui/**, which Codecov's codecov/patch does not measure (only src/** counts); the new regression test lives in apps/loopover-ui/src/routes/ and is exercised by ui:test.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate — pre-existing findings (adm-zip via github-actionlint, body-parser) already tracked in fix(deps): clear adm-zip and body-parser npm audit findings #7607; unrelated to this diff (no package.json/lockfile changes here).
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries — see docs-mdx-eager-scope.test.ts; verified it fails on the pre-fix content (reverted the import locally, confirmed the test catches it) and passes on the fix.
  • npm run test:ci (full local gate)

Additional manual verification (this bug is an SSR-loader-time crash, so it needed real requests, not just unit tests):

  • All 47 docs.*.tsx routes returned HTTP 500 before the fix and HTTP 200 after, in vite dev (curl + browser).
  • All 47 routes verified again against a real production build served by wrangler dev --config dist/server/wrangler.json (this repo's nitro build targets the cloudflare-module preset; vite preview does not understand that output layout and 500s on an unrelated pre-existing dist/server/server.js module-resolution mismatch — not something this PR touches).
  • Confirmed in-browser (both vite dev and the wrangler-served production build) that /docs/quickstart (the original repro) and /docs/maintainer-workflow (the actual broken file) render fully, including the previously-crashing <CodeBlock> elements inside maintainer-workflow.mdx's steps array.

If any required check was skipped, explain why:

  • None skipped.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests. (N/A — no auth/CORS/session surface touched.)
  • API/OpenAPI/MCP behavior is updated and tested where needed. (N/A — no API/OpenAPI/MCP surface touched.)
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks. (N/A — static docs content only.)
  • Visible UI changes include a UI Evidence section below with screenshots — skipped: this is an availability fix (every docs page 500ing vs. loading), which reproducible HTTP-status checks across all 47 routes evidence more rigorously than static before/after screenshots would. See the manual verification list above for exactly what was checked, in which environments.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs. (No changelog edit — this is a bug fix, not a release.)

Notes

  • The fumadocs-mdx "eager glob" behavior in docs-source.ts (server-only collection) means any future content/docs/*.mdx file that references a provided-only component (Callout, CodeBlock, FeatureRow, AmsObservabilityCallout, CommandTable, WorkflowMirror) inside a top-level export const — instead of within the markdown body — would reproduce this exact class of bug and take down every docs page again. The new docs-mdx-eager-scope.test.ts test guards against that going forward.

content/docs/maintainer-workflow.mdx used <CodeBlock> inside a
top-level `export const steps = [...]` block instead of the markdown
body. fumadocs-mdx only resolves capitalized JSX tags against the
components prop inside the compiled body function; a top-level export
const runs eagerly at module-evaluation time, before any components
prop exists, so the unimported name threw a raw ReferenceError instead
of fumadocs' friendly missing-reference message.

Because docs-source.ts (used by every docs.*.tsx route's server
loader) globs all content/docs/*.mdx files with eager: true, that one
file's module-evaluation crash took down every docs route's SSR
loader, not just its own page -- matching the "affects most/all docs
pages" scope from the original report.

Fixed by importing CodeBlock directly into the .mdx file, the same way
it already imports MAINTAINER_COMMAND_LIST/PUBLIC_COMMAND_LIST -- MDX
treats an explicit import as a normal JS binding rather than routing
it through the components prop.

Added a regression test that scans every content/docs/*.mdx file's
top-level export const blocks for JSX tags that are only supplied via
the MDX components prop and not also directly imported, guarding the
whole bug class rather than just this file.

Closes #7578
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
loopover-ui 301466f Commit Preview URL

Branch Preview URL
Jul 21 2026, 01:48 AM

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 37.47kB (-0.49%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
loopover-ui 7.62MB -37.47kB (-0.49%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: loopover-ui

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/add-scalar-classes-DBwd5Raw.js (New) 2.17MB 2.17MB 100.0% 🚀
assets/tanstack-vendor-nFI7xV5z.js (New) 820.63kB 820.63kB 100.0% 🚀
openapi.json -1.14kB 521.69kB -0.22%
assets/docs.fumadocs-spike-api-reference-CCD1kGJk.js (New) 442.94kB 442.94kB 100.0% 🚀
assets/AgentScalarChatInterface.vue-BXm8p7Cd.js (New) 201.71kB 201.71kB 100.0% 🚀
assets/modal-DixEy4pa.js (New) 184.28kB 184.28kB 100.0% 🚀
assets/client-a-8jqhEv.js (New) 146.06kB 146.06kB 100.0% 🚀
assets/styles-CSs2FpVK.css (New) 130.78kB 130.78kB 100.0% 🚀
assets/maintainer-panel-B_-nbHjF.js (New) 78.49kB 78.49kB 100.0% 🚀
assets/ui-vendor-DYpFG4D2.js (New) 57.04kB 57.04kB 100.0% 🚀
assets/routes-B7ai_odA.js (New) 34.29kB 34.29kB 100.0% 🚀
assets/ams-operations-runbook-D5dxbOAa.js (New) 29.79kB 29.79kB 100.0% 🚀
assets/owner-panel-B5zTTLtI.js (New) 27.13kB 27.13kB 100.0% 🚀
assets/app-tfN1Cid3.js (New) 25.65kB 25.65kB 100.0% 🚀
assets/ams-config-precedence-Bt5RRin-.js (New) 24.01kB 24.01kB 100.0% 🚀
assets/app.runs-Dm7kQmRJ.js (New) 23.56kB 23.56kB 100.0% 🚀
assets/miner-panel-pgNsSk4R.js (New) 20.25kB 20.25kB 100.0% 🚀
assets/docs-source-CXPH4XYC.js (New) 19.36kB 19.36kB 100.0% 🚀
assets/api._op-Bgf6ina2.js (New) 17.55kB 17.55kB 100.0% 🚀
assets/self-hosting-docs-audit-CDttPygu.js (New) 16.73kB 16.73kB 100.0% 🚀
assets/app.index-BdDhgmAm.js (New) 15.62kB 15.62kB 100.0% 🚀
assets/playground-panel-DyVaA68i.js (New) 14.35kB 14.35kB 100.0% 🚀
assets/app.audit-C77b4dbW.js (New) 10.11kB 10.11kB 100.0% 🚀
assets/extension-B1Qsq-cK.js (New) 10.04kB 10.04kB 100.0% 🚀
assets/app.config-generator-D6OcCnpE.js (New) 9.88kB 9.88kB 100.0% 🚀
assets/maintainers-B4ZPd_9K.js (New) 8.03kB 8.03kB 100.0% 🚀
assets/miners-DaGlJ_wl.js (New) 7.85kB 7.85kB 100.0% 🚀
assets/agents-aWQhnWYn.js (New) 7.76kB 7.76kB 100.0% 🚀
assets/commands-panel-eqedvyQc.js (New) 6.65kB 6.65kB 100.0% 🚀
assets/maintainer-workflow-DelSSCyx.js (New) 6.61kB 6.61kB 100.0% 🚀
assets/roadmap-2Af7o2QK.js (New) 6.33kB 6.33kB 100.0% 🚀
assets/digest-panel-CHq7mxuR.js (New) 6.14kB 6.14kB 100.0% 🚀
assets/repos._owner._repo.quality-BNpLtzfC.js (New) 6.14kB 6.14kB 100.0% 🚀
assets/docs.index-BU7aWOBQ.js (New) 5.47kB 5.47kB 100.0% 🚀
assets/api.index-CqhOMPmC.js (New) 4.7kB 4.7kB 100.0% 🚀
assets/api-Cp3LwrxP.js (New) 2.69kB 2.69kB 100.0% 🚀
assets/docs-CMaGw_GD.js (New) 2.67kB 2.67kB 100.0% 🚀
assets/app.workbench-D0X21nIo.js (New) 1.58kB 1.58kB 100.0% 🚀
assets/session-B8l9WAeV.js (New) 1.45kB 1.45kB 100.0% 🚀
assets/tooltip-ImlFNQQ9.js (New) 1.45kB 1.45kB 100.0% 🚀
assets/tabs-C5E59W47.js (New) 1.39kB 1.39kB 100.0% 🚀
assets/app.repos-CfvKiKvu.js (New) 1.07kB 1.07kB 100.0% 🚀
assets/input-ClF3DSze.js (New) 796 bytes 796 bytes 100.0% 🚀
assets/file-cog-C6RXLIoJ.js (New) 758 bytes 758 bytes 100.0% 🚀
assets/docs.ai-summaries-CdBrwBDs.js (New) 506 bytes 506 bytes 100.0% 🚀
assets/app.maintainer-6VTnNfhU.js (New) 502 bytes 502 bytes 100.0% 🚀
assets/docs.branch-analysis-Aqm4Vhhp.js (New) 499 bytes 499 bytes 100.0% 🚀
assets/docs.scoreability-DKWaFs-d.js (New) 499 bytes 499 bytes 100.0% 🚀
assets/docs.upstream-drift-7Isswoxy.js (New) 499 bytes 499 bytes 100.0% 🚀
assets/docs.federated-fleet-intelligence-B78c4DnX.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.maintainer-install-trust-ZfOgxA57.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-ai-providers-CaXKAopg.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-backup-scaling-C5TmkE-y.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-configuration-CZm50Dtd.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-docs-audit-DtmNhgl6.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-github-app-CuQInQgc.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-quickstart-B4uLb4sj.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-rag-DSx-wAtf.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-rees-analyzers-C50x2oaJ.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-rees-kuTpnimn.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-release-checklist-Dira8KJP.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-releases-B5JaTcXr.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-security-fnDfaFj0.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-troubleshooting-CCgTZGqs.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.self-hosting-unified-ams-orb-jgtTshJ_.js (New) 498 bytes 498 bytes 100.0% 🚀
assets/docs.ams-config-precedence-XOmoDwLu.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.ams-deployment-KRTUD7ge.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.ams-discovery-plane-6eC4yVJN.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.ams-env-reference-DmqX71ch.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.ams-fleet-manifest-B3z28YtP.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.ams-goal-spec-RTw2C7o9.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.ams-observability-BUh1VlK6.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.ams-operations-runbook-CsdIRlpN.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.ams-sizing-BvbeeG7x.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.ams-unattended-scheduling-CLjczWwa.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.beta-onboarding-cPh2CSNN.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.capacity-CU1909Er.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.maintainer-self-hosting-CLX5rfhV.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.mcp-clients-WyGchtEC.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.owner-checklist-BX-lt3aZ.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.quickstart-B3X83-2z.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/docs.github-app-oUUqKCGL.js (New) 495 bytes 495 bytes 100.0% 🚀
assets/docs.maintainer-workflow-DNOIkOqR.js (New) 495 bytes 495 bytes 100.0% 🚀
assets/docs.privacy-security-yGV9_nGc.js (New) 495 bytes 495 bytes 100.0% 🚀
assets/docs.troubleshooting-IN1pE9Og.js (New) 495 bytes 495 bytes 100.0% 🚀
assets/docs.tuning-ubnw1qZe.js (New) 495 bytes 495 bytes 100.0% 🚀
assets/docs.loopover-commands-BWZ9woVo.js (New) 494 bytes 494 bytes 100.0% 🚀
assets/sparkles-DueoR_T-.js (New) 494 bytes 494 bytes 100.0% 🚀
assets/docs.how-reviews-work-B0FBCAYr.js (New) 493 bytes 493 bytes 100.0% 🚀
assets/app.owner-DvpYQBwk.js (New) 474 bytes 474 bytes 100.0% 🚀
assets/app.commands-aZeh7VQm.js (New) 455 bytes 455 bytes 100.0% 🚀
assets/app.playground-Ce6RdXqI.js (New) 442 bytes 442 bytes 100.0% 🚀
assets/reveal-CdMaSb8-.js (New) 442 bytes 442 bytes 100.0% 🚀
assets/index-8FqSeZT0.js (New) 438 bytes 438 bytes 100.0% 🚀
assets/app.digest-COdbSGZ4.js (New) 430 bytes 430 bytes 100.0% 🚀
assets/eye-off-VZSxwnbt.js (New) 430 bytes 430 bytes 100.0% 🚀
assets/app.miner-DXBWrdCL.js (New) 422 bytes 422 bytes 100.0% 🚀
assets/key-round-BIkZVoyC.js (New) 355 bytes 355 bytes 100.0% 🚀
assets/bot-mZnYEV2a.js (New) 328 bytes 328 bytes 100.0% 🚀
assets/trash-2-CA5AgAy4.js (New) 328 bytes 328 bytes 100.0% 🚀
assets/save-CRoXUSfg.js (New) 327 bytes 327 bytes 100.0% 🚀
assets/git-pull-request-arrow-DxIL37Le.js (New) 321 bytes 321 bytes 100.0% 🚀
assets/wrench-B8MoojnF.js (New) 303 bytes 303 bytes 100.0% 🚀
assets/list-checks-CkSrZDWR.js (New) 279 bytes 279 bytes 100.0% 🚀
assets/shield-QElx_cv2.js (New) 272 bytes 272 bytes 100.0% 🚀
assets/workflow-CrY5cFYJ.js (New) 265 bytes 265 bytes 100.0% 🚀
assets/compass-Cvh5Dqx7.js (New) 251 bytes 251 bytes 100.0% 🚀
assets/history-A0uUnYEr.js (New) 237 bytes 237 bytes 100.0% 🚀
assets/activity-z6XiAzZ5.js (New) 234 bytes 234 bytes 100.0% 🚀
assets/message-square-DgUOGZtj.js (New) 233 bytes 233 bytes 100.0% 🚀
assets/lock-DSwqr5m1.js (New) 206 bytes 206 bytes 100.0% 🚀
assets/rotate-cw-DKhvairZ.js (New) 201 bytes 201 bytes 100.0% 🚀
assets/play-NAOI7LBa.js (New) 190 bytes 190 bytes 100.0% 🚀
assets/circle-check-D0v0Rt_y.js (New) 178 bytes 178 bytes 100.0% 🚀
assets/search-aoER415Z.js (New) 174 bytes 174 bytes 100.0% 🚀
assets/maintainer-workflow-BCSYvtNw.js (New) 155 bytes 155 bytes 100.0% 🚀
assets/ams-operations-runbook-3bwxMwdA.js (New) 145 bytes 145 bytes 100.0% 🚀
assets/ams-config-precedence-Dtw87syI.js (New) 144 bytes 144 bytes 100.0% 🚀
assets/self-hosting-docs-audit-cYqZrlpL.js (New) 141 bytes 141 bytes 100.0% 🚀
assets/circle-7bJWGYIh.js (New) 130 bytes 130 bytes 100.0% 🚀
assets/modal-MtiHgOnL.js (New) 115 bytes 115 bytes 100.0% 🚀
assets/add-scalar-classes-DovJOH2u.js (Deleted) -2.17MB 0 bytes -100.0% 🗑️
assets/tanstack-vendor-DKkuCBmj.js (Deleted) -823.76kB 0 bytes -100.0% 🗑️
assets/docs.fumadocs-spike-api-reference-DjR3EjkU.js (Deleted) -442.94kB 0 bytes -100.0% 🗑️
assets/AgentScalarChatInterface.vue-BEo-gGED.js (Deleted) -201.71kB 0 bytes -100.0% 🗑️
assets/modal-DzKz9jHa.js (Deleted) -184.28kB 0 bytes -100.0% 🗑️
assets/client-FLUEa-iw.js (Deleted) -146.06kB 0 bytes -100.0% 🗑️
assets/styles-Dr56QFvq.css (Deleted) -130.81kB 0 bytes -100.0% 🗑️
assets/maintainer-panel-l1N6NGTy.js (Deleted) -78.53kB 0 bytes -100.0% 🗑️
assets/ui-vendor-C61zgCb7.js (Deleted) -57.04kB 0 bytes -100.0% 🗑️
assets/routes-CoSmqlkQ.js (Deleted) -34.83kB 0 bytes -100.0% 🗑️
assets/ams-operations-runbook-DjVunQ2N.js (Deleted) -30.09kB 0 bytes -100.0% 🗑️
assets/owner-panel-D_bujBJ6.js (Deleted) -27.2kB 0 bytes -100.0% 🗑️
assets/app-BXrlzDzo.js (Deleted) -25.65kB 0 bytes -100.0% 🗑️
assets/ams-config-precedence-DPHC9M0C.js (Deleted) -24.26kB 0 bytes -100.0% 🗑️
assets/app.runs-B8odb4E4.js (Deleted) -23.55kB 0 bytes -100.0% 🗑️
assets/ams-kill-switch-incident-CDmRTIyw.js (Deleted) -22.62kB 0 bytes -100.0% 🗑️
assets/miner-panel-oTGk1oYU.js (Deleted) -20.25kB 0 bytes -100.0% 🗑️
assets/docs-source-DorUINqj.js (Deleted) -19.46kB 0 bytes -100.0% 🗑️
assets/api._op-CWGHMIL3.js (Deleted) -17.55kB 0 bytes -100.0% 🗑️
assets/self-hosting-docs-audit-z47wcNAF.js (Deleted) -16.73kB 0 bytes -100.0% 🗑️
assets/app.index-BfwTa_3c.js (Deleted) -15.62kB 0 bytes -100.0% 🗑️
assets/playground-panel-CqBjxRsa.js (Deleted) -14.49kB 0 bytes -100.0% 🗑️
assets/app.audit-DdBzvaXQ.js (Deleted) -10.11kB 0 bytes -100.0% 🗑️
assets/extension-D-MiHbIe.js (Deleted) -10.04kB 0 bytes -100.0% 🗑️
assets/app.config-generator-BJcD7WcB.js (Deleted) -9.88kB 0 bytes -100.0% 🗑️
assets/fairness-6hiVcCfC.js (Deleted) -8.34kB 0 bytes -100.0% 🗑️
assets/maintainers-CwSdXVbo.js (Deleted) -8.03kB 0 bytes -100.0% 🗑️
assets/miners-D5r6ZpxO.js (Deleted) -7.85kB 0 bytes -100.0% 🗑️
assets/agents-DztQtKh7.js (Deleted) -7.76kB 0 bytes -100.0% 🗑️
assets/commands-panel-ChKhWmIJ.js (Deleted) -6.65kB 0 bytes -100.0% 🗑️
assets/maintainer-workflow-hi33Hh8x.js (Deleted) -6.61kB 0 bytes -100.0% 🗑️
assets/roadmap-p_zGAWKj.js (Deleted) -6.33kB 0 bytes -100.0% 🗑️
assets/digest-panel-DSQixChJ.js (Deleted) -6.18kB 0 bytes -100.0% 🗑️
assets/repos._owner._repo.quality-ptdk-Jw_.js (Deleted) -6.14kB 0 bytes -100.0% 🗑️
assets/docs.index-DXROxBVL.js (Deleted) -5.55kB 0 bytes -100.0% 🗑️
assets/api.index-BKDrN6iX.js (Deleted) -4.7kB 0 bytes -100.0% 🗑️
assets/api-BpoA45bG.js (Deleted) -2.69kB 0 bytes -100.0% 🗑️
assets/docs-A-NpI83Z.js (Deleted) -2.67kB 0 bytes -100.0% 🗑️
assets/app.workbench-CqjygjH5.js (Deleted) -1.58kB 0 bytes -100.0% 🗑️
assets/session-yNsYd3Of.js (Deleted) -1.45kB 0 bytes -100.0% 🗑️
assets/tooltip-BnSweOR3.js (Deleted) -1.45kB 0 bytes -100.0% 🗑️
assets/tabs-BUBoJpmc.js (Deleted) -1.39kB 0 bytes -100.0% 🗑️
assets/app.repos-D2uxeAoA.js (Deleted) -1.07kB 0 bytes -100.0% 🗑️
assets/input-Cgmg-38l.js (Deleted) -796 bytes 0 bytes -100.0% 🗑️
assets/file-cog-Dr7w5G19.js (Deleted) -758 bytes 0 bytes -100.0% 🗑️
assets/docs.ai-summaries-BBOltMHq.js (Deleted) -506 bytes 0 bytes -100.0% 🗑️
assets/app.maintainer-ChbpVOyp.js (Deleted) -502 bytes 0 bytes -100.0% 🗑️
assets/docs.branch-analysis-DffXK3lC.js (Deleted) -499 bytes 0 bytes -100.0% 🗑️
assets/docs.scoreability-Djs96HwS.js (Deleted) -499 bytes 0 bytes -100.0% 🗑️
assets/docs.upstream-drift-Ru91wsN0.js (Deleted) -499 bytes 0 bytes -100.0% 🗑️
assets/docs.federated-fleet-intelligence-B59cDcnM.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.maintainer-install-trust-Dfqz5hgp.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-ai-providers-C8Ba2wG9.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-backup-scaling-BuT1ZQSq.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-configuration-DF4F2xTq.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-docs-audit-C5U-QaE7.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-github-app-CNxeNYQH.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-quickstart-C6vi0wWb.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-rag-CtTlRjPt.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-rees-DzHHs703.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-rees-analyzers-BE5Q2xH0.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-release-checklist-CGXgccq7.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-releases-DGTG-4sQ.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-security-Dy1xUvq2.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-troubleshooting-CZy0J9aj.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-unified-ams-orb-D2jXGVT-.js (Deleted) -498 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-config-precedence-DKGNKI7c.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-deployment-kdz2c4CY.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-discovery-plane-DMJPTOmI.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-env-reference-DCDsKFh3.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-fleet-manifest-eie2s92a.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-goal-spec-CXW3c4YE.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-kill-switch-incident-Dxin1asM.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-observability-CK_bpFrz.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-operations-runbook-_-GECc78.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-sizing-B14AWCQW.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-unattended-scheduling-o_pwRx-y.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.beta-onboarding-BDCjgf5V.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.capacity-6mBolS0x.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.maintainer-self-hosting-CHNsaQ1_.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.mcp-clients-DvLzJhgC.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.owner-checklist-Dw1seHIn.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.quickstart-Dmyu_2fU.js (Deleted) -497 bytes 0 bytes -100.0% 🗑️
assets/docs.github-app-WAq3FZOF.js (Deleted) -495 bytes 0 bytes -100.0% 🗑️
assets/docs.maintainer-workflow-BesN5UyW.js (Deleted) -495 bytes 0 bytes -100.0% 🗑️
assets/docs.privacy-security-QFEEJ7F4.js (Deleted) -495 bytes 0 bytes -100.0% 🗑️
assets/docs.troubleshooting-BJHUiDzj.js (Deleted) -495 bytes 0 bytes -100.0% 🗑️
assets/docs.tuning-BzC_66zJ.js (Deleted) -495 bytes 0 bytes -100.0% 🗑️
assets/docs.loopover-commands-DUTs-7Op.js (Deleted) -494 bytes 0 bytes -100.0% 🗑️
assets/sparkles-BFvN_vRP.js (Deleted) -494 bytes 0 bytes -100.0% 🗑️
assets/docs.how-reviews-work-BxPtZDhd.js (Deleted) -493 bytes 0 bytes -100.0% 🗑️
assets/app.owner-tEEingoL.js (Deleted) -474 bytes 0 bytes -100.0% 🗑️
assets/app.commands-CygYF0_N.js (Deleted) -455 bytes 0 bytes -100.0% 🗑️
assets/app.playground-D0X3bM5T.js (Deleted) -442 bytes 0 bytes -100.0% 🗑️
assets/reveal-G1QSjPk7.js (Deleted) -442 bytes 0 bytes -100.0% 🗑️
assets/index-IvjHunG2.js (Deleted) -438 bytes 0 bytes -100.0% 🗑️
assets/app.digest-BRW28j6v.js (Deleted) -430 bytes 0 bytes -100.0% 🗑️
assets/eye-off-DH-aun4p.js (Deleted) -430 bytes 0 bytes -100.0% 🗑️
assets/app.miner-BLK6s1nP.js (Deleted) -422 bytes 0 bytes -100.0% 🗑️
assets/key-round-*.js (Deleted) -355 bytes 0 bytes -100.0% 🗑️
assets/bot-DpbJHAJR.js (Deleted) -328 bytes 0 bytes -100.0% 🗑️
assets/trash-2-C5VEVbYa.js (Deleted) -328 bytes 0 bytes -100.0% 🗑️
assets/save-Dd0D8H1T.js (Deleted) -327 bytes 0 bytes -100.0% 🗑️
assets/git-pull-request-arrow-CwHR4R7L.js (Deleted) -321 bytes 0 bytes -100.0% 🗑️
assets/wrench-BG03kQOH.js (Deleted) -303 bytes 0 bytes -100.0% 🗑️
assets/list-checks-DxmWo7FJ.js (Deleted) -279 bytes 0 bytes -100.0% 🗑️
assets/shield-BSJ3pGt-.js (Deleted) -272 bytes 0 bytes -100.0% 🗑️
assets/workflow-DE1mGPiq.js (Deleted) -265 bytes 0 bytes -100.0% 🗑️
assets/compass-CKRdhC9e.js (Deleted) -251 bytes 0 bytes -100.0% 🗑️
assets/history-CXA6tME_.js (Deleted) -237 bytes 0 bytes -100.0% 🗑️
assets/activity-4JmeMq1y.js (Deleted) -234 bytes 0 bytes -100.0% 🗑️
assets/message-square-BBWLo81N.js (Deleted) -233 bytes 0 bytes -100.0% 🗑️
assets/lock-DHS5UNTg.js (Deleted) -206 bytes 0 bytes -100.0% 🗑️
assets/rotate-cw-CAeuQ-Ud.js (Deleted) -201 bytes 0 bytes -100.0% 🗑️
assets/play-CykUoKMT.js (Deleted) -190 bytes 0 bytes -100.0% 🗑️
assets/circle-check-c_pSZoQW.js (Deleted) -178 bytes 0 bytes -100.0% 🗑️
assets/search-Dkcz8b73.js (Deleted) -174 bytes 0 bytes -100.0% 🗑️
assets/maintainer-workflow-D-1Qk5OP.js (Deleted) -155 bytes 0 bytes -100.0% 🗑️
assets/ams-kill-switch-incident--nGDV8tu.js (Deleted) -147 bytes 0 bytes -100.0% 🗑️
assets/ams-operations-runbook-Csl_nHOe.js (Deleted) -145 bytes 0 bytes -100.0% 🗑️
assets/ams-config-precedence-C0nMSGtq.js (Deleted) -144 bytes 0 bytes -100.0% 🗑️
assets/self-hosting-docs-audit-BBCDVFsG.js (Deleted) -141 bytes 0 bytes -100.0% 🗑️
assets/circle-BvhSbUO1.js (Deleted) -130 bytes 0 bytes -100.0% 🗑️
assets/modal-CpNcW7J0.js (Deleted) -115 bytes 0 bytes -100.0% 🗑️

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 21, 2026
@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-21 01:53:34 UTC

2 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
The fix correctly resolves the root cause: `CodeBlock` is now imported directly into `maintainer-workflow.mdx`, matching the existing pattern for `MAINTAINER_COMMAND_LIST`/`PUBLIC_COMMAND_LIST`, so the top-level `export const steps` block no longer relies on an unresolved identifier at eager module-evaluation time. The added regression test scans all docs .mdx files' top-level export const blocks for capitalized JSX tags that are provided-only (in `docsMdxComponents`) but not directly imported, which correctly generalizes the fix to guard the whole bug class rather than just this one file. The one-line source fix is minimal and traceable; the test's line-based block extraction (matching from `export const` to a closing `];`/`};` at column 0) is a reasonable heuristic for the current file shapes but is inherently a bit fragile to nested top-level export const declarations, though CI passes on the real repo content.

Nits — 3 non-blocking
  • docs-mdx-eager-scope.test.ts's `extractTopLevelExportConstBlocks` closes a block on the first line matching `^(\];|\};)` at column 0, which would misparse a top-level export const whose value is a deeply nested object/array containing an inner `};`/`];` at column 0 (unlikely given current formatting, but worth a comment noting the assumption).
  • PR description states the test is 'cross-checked against the real `docsMdxComponents` map' — worth confirming `docsMdxComponents` doesn't also need a corresponding CHANGELOG/doc note since it's now a load-bearing contract for this test.
  • Consider extending the regression test comment to note the block-extraction heuristic's assumption (closing bracket at column 0) so future contributors adding multiline nested exports know why the parser might need updating.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7578
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 23 registered-repo PR(s), 16 merged, 368 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 23 PR(s), 368 issue(s).
Improvement ℹ️ Insufficient signal risk: clean · value: insufficient-signal · LLM: significant
Linked issue satisfaction

Addressed
The PR identifies a plausible root cause (eager top-level export const referencing a provided-only component before the components prop exists) and fixes it by directly importing CodeBlock in maintainer-workflow.mdx, plus adds a regression test scanning all docs mdx files for the same pattern, directly matching the issue's reported crash and broad scope.

Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, Ruby, Go, JavaScript, MDX, Shell, Solidity
  • Official Gittensor activity: 23 PR(s), 368 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Treat this as maintainer-lane context rather than normal contributor-lane activity.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (mobile)
after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

Scroll preview
Route Before (production) After (this PR's preview)
/ before / (scroll)
before / (scroll)
after / (scroll)
after / (scroll)

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.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit ca125fd into main Jul 21, 2026
13 checks passed
@loopover-orb
loopover-orb Bot deleted the fix/docs-codeblock-not-defined-7578 branch July 21, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(site): docs pages crash with "CodeBlock is not defined" (both dev and production build)

1 participant