Skip to content

fix(ui): generate fumadocs-mdx collections/* via postinstall - #6310

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
oktofeesh1:fix/fumadocs-mdx-postinstall-6304
Jul 16, 2026
Merged

fix(ui): generate fumadocs-mdx collections/* via postinstall#6310
JSONbored merged 1 commit into
JSONbored:mainfrom
oktofeesh1:fix/fumadocs-mdx-postinstall-6304

Conversation

@oktofeesh1

Copy link
Copy Markdown
Contributor

Summary

  • apps/loopover-ui/tsconfig.json maps collections/* to ./.source/*, a directory fumadocs-mdx's Vite plugin generates from source.config.ts. .source/ is gitignored and nothing generated it outside of an actual vite dev/vite build run.
  • npm run ui:typecheck (and therefore CI's validate-code/validate jobs) runs bare tsc --noEmit with no prior Vite invocation, so on a genuinely fresh checkout collections/browser/collections/server fail to resolve (TS2307: Cannot find module).
  • This has been broken since the fumadocs-mdx docs migration landed in PR #6271 — that PR's own CI failed for this exact reason. Every PR touching apps/loopover-ui since inherits the same failure on a fresh CI runner, even when npm run test:ci passes locally on a working tree that has ever run vite dev/build before (which leaves .source/ on disk).
  • Fix: wire fumadocs-mdx's own generator (node_modules/.bin/fumadocs-mdx, its documented postinstall entry point) as apps/loopover-ui/package.json's postinstall script, so npm ci always regenerates .source/ before any other script runs.

Scope

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally — apps/loopover-ui/** only, outside coverage.include; codecov/patch does not apply
  • 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
  • Reproduced the exact CI failure locally and confirmed the fix: rm -rf apps/loopover-ui/.source && npm ci --prefer-offline --no-audit --no-fund (the literal command CI runs) regenerates .source/ via the new postinstall hook, and npm --workspace apps/loopover-ui run typecheck then passes — it failed with the identical TS2307 errors before this fix.

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
  • API/OpenAPI/MCP behavior is updated and tested where needed. — N/A
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks. — N/A, build-tooling fix only, no UI behavior changes
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Notes

…ed#6304)

apps/loopover-ui/tsconfig.json maps collections/* to ./.source/*, which
fumadocs-mdx's Vite plugin generates from source.config.ts. .source/ is
gitignored and nothing generated it outside of an actual vite dev/build run,
so tsc --noEmit (ui:typecheck, unlike ui:build, never invokes Vite first)
fails to resolve collections/browser and collections/server on a fresh
checkout -- broken since the fumadocs-mdx docs migration landed and only
masked locally by leftover .source/ files from a prior dev/build run.

Wire fumadocs-mdx's own generator (its bin, designed for exactly this) as a
postinstall script so npm ci always regenerates .source/ before any other
script runs.
@oktofeesh1
oktofeesh1 requested a review from JSONbored as a code owner July 16, 2026 00:48
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored
JSONbored merged commit 7e526a5 into JSONbored:main Jul 16, 2026
12 checks passed
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 16, 2026
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.

fix(ui): fumadocs-mdx collections/* virtual modules missing on a fresh checkout

2 participants