Context
scripts/check-ui-mcp-version-copy.mjs guards against stale @loopover/mcp version strings creeping back into UI copy (README badges, install commands, MCP client args). Its SCAN_TARGETS constant (check-ui-mcp-version-copy.mjs:15-19) is ["README.md", "packages/loopover-mcp/README.md", "apps/loopover-ui/src"], and isTextSource (check-ui-mcp-version-copy.mjs:144-146) only matches /\.(md|ts|tsx|js|jsx|json)$/ — no .mdx.
Since the fumadocs-mdx content-pipeline migration (5003fabe, "feat(docs): migrate loopover-ui docs pages to fumadocs-mdx content pipeline"), the docs website's prose content lives in apps/loopover-ui/content/docs/*.mdx — a directory that sits alongside apps/loopover-ui/src, not inside it. A sibling script, scripts/check-docs-drift.mjs, was correctly updated for this move (its DOCS_ROUTES_DIR = "apps/loopover-ui/content/docs", check-docs-drift.mjs:239), but check-ui-mcp-version-copy.mjs's SCAN_TARGETS was never touched, so it is now structurally blind to that entire directory — doubly so, since even if the directory were added, .mdx files still wouldn't pass isTextSource.
This is a live, non-theoretical gap: 10 real files under apps/loopover-ui/content/docs/*.mdx currently reference @loopover/mcp or loopover-mcp (confirmed via git grep), including install-command snippets this exact script is designed to catch drift in — e.g. apps/loopover-ui/content/docs/quickstart.mdx:13,16 (npx -y @loopover/mcp@latest --help, npm i -g @loopover/mcp@latest), apps/loopover-ui/content/docs/miner-quickstart.mdx:23-24, apps/loopover-ui/content/docs/beta-onboarding.mdx:24, and apps/loopover-ui/content/docs/mcp-clients.mdx. Every one of these currently uses the correct @latest/no-version form (so there is no CURRENT stale-version failure), but a future PR that hardcodes a version or drops @latest in any of these 10 files — the exact regression class collectVersionCopyFailures (check-ui-mcp-version-copy.mjs:82-124) exists to catch — would pass npm run test:ci's ui:version-audit step with zero signal.
Requirements
- Add
"apps/loopover-ui/content" to SCAN_TARGETS in scripts/check-ui-mcp-version-copy.mjs.
- Extend
isTextSource's regex from /\.(md|ts|tsx|js|jsx|json)$/ to also match .mdx (e.g. /\.(md|mdx|ts|tsx|js|jsx|json)$/), so .mdx files are scanned regardless of which directory contains them.
- Do not alter
collectVersionCopyFailures's matching logic itself — this issue is scoped to source-file discovery (SCAN_TARGETS + isTextSource), not the stale-version patterns.
Deliverables
Test Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch in scripts/check-ui-mcp-version-copy.mjs (root-level scripts/** is inside vitest.config.ts's coverage include list and is measured by Codecov, unlike apps/**), plus the two regression tests above.
Expected Outcome
npm run ui:version-audit (and its test:ci invocation) actually scans every .mdx file under apps/loopover-ui/content, so a future hardcoded/stale @loopover/mcp version string in the docs content pipeline is caught the same way it already is in apps/loopover-ui/src and the two README files.
Links & Resources
scripts/check-ui-mcp-version-copy.mjs:15-19 (SCAN_TARGETS), :144-146 (isTextSource) — the two lines to change.
scripts/check-docs-drift.mjs:239 (DOCS_ROUTES_DIR) — the sibling drift-checker that was correctly updated for the same content-directory move.
test/unit/check-ui-mcp-version-copy-script.test.ts — existing test file to extend.
apps/loopover-ui/content/docs/quickstart.mdx, miner-quickstart.mdx, beta-onboarding.mdx, mcp-clients.mdx — real files with live @loopover/mcp references this check should be scanning today.
Context
scripts/check-ui-mcp-version-copy.mjsguards against stale@loopover/mcpversion strings creeping back into UI copy (README badges, install commands, MCP client args). ItsSCAN_TARGETSconstant (check-ui-mcp-version-copy.mjs:15-19) is["README.md", "packages/loopover-mcp/README.md", "apps/loopover-ui/src"], andisTextSource(check-ui-mcp-version-copy.mjs:144-146) only matches/\.(md|ts|tsx|js|jsx|json)$/— no.mdx.Since the fumadocs-mdx content-pipeline migration (
5003fabe, "feat(docs): migrate loopover-ui docs pages to fumadocs-mdx content pipeline"), the docs website's prose content lives inapps/loopover-ui/content/docs/*.mdx— a directory that sits alongsideapps/loopover-ui/src, not inside it. A sibling script,scripts/check-docs-drift.mjs, was correctly updated for this move (itsDOCS_ROUTES_DIR = "apps/loopover-ui/content/docs",check-docs-drift.mjs:239), butcheck-ui-mcp-version-copy.mjs'sSCAN_TARGETSwas never touched, so it is now structurally blind to that entire directory — doubly so, since even if the directory were added,.mdxfiles still wouldn't passisTextSource.This is a live, non-theoretical gap: 10 real files under
apps/loopover-ui/content/docs/*.mdxcurrently reference@loopover/mcporloopover-mcp(confirmed viagit grep), including install-command snippets this exact script is designed to catch drift in — e.g.apps/loopover-ui/content/docs/quickstart.mdx:13,16(npx -y @loopover/mcp@latest --help,npm i -g @loopover/mcp@latest),apps/loopover-ui/content/docs/miner-quickstart.mdx:23-24,apps/loopover-ui/content/docs/beta-onboarding.mdx:24, andapps/loopover-ui/content/docs/mcp-clients.mdx. Every one of these currently uses the correct@latest/no-version form (so there is no CURRENT stale-version failure), but a future PR that hardcodes a version or drops@latestin any of these 10 files — the exact regression classcollectVersionCopyFailures(check-ui-mcp-version-copy.mjs:82-124) exists to catch — would passnpm run test:ci'sui:version-auditstep with zero signal.Requirements
"apps/loopover-ui/content"toSCAN_TARGETSinscripts/check-ui-mcp-version-copy.mjs.isTextSource's regex from/\.(md|ts|tsx|js|jsx|json)$/to also match.mdx(e.g./\.(md|mdx|ts|tsx|js|jsx|json)$/), so.mdxfiles are scanned regardless of which directory contains them.collectVersionCopyFailures's matching logic itself — this issue is scoped to source-file discovery (SCAN_TARGETS+isTextSource), not the stale-version patterns.Deliverables
SCAN_TARGETSincludesapps/loopover-ui/contentisTextSourcematches.mdxfilescollectSourceFilespicks up at least one real file underapps/loopover-ui/content/docs/*.mdx(e.g.quickstart.mdx).mdxfile (mirroringcheck-ui-mcp-version-copy-script.test.ts's existingcollectVersionCopyFailuresfixtures) is flagged as a failureTest Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch in
scripts/check-ui-mcp-version-copy.mjs(root-levelscripts/**is insidevitest.config.ts's coverage include list and is measured by Codecov, unlikeapps/**), plus the two regression tests above.Expected Outcome
npm run ui:version-audit(and itstest:ciinvocation) actually scans every.mdxfile underapps/loopover-ui/content, so a future hardcoded/stale@loopover/mcpversion string in the docs content pipeline is caught the same way it already is inapps/loopover-ui/srcand the two README files.Links & Resources
scripts/check-ui-mcp-version-copy.mjs:15-19(SCAN_TARGETS),:144-146(isTextSource) — the two lines to change.scripts/check-docs-drift.mjs:239(DOCS_ROUTES_DIR) — the sibling drift-checker that was correctly updated for the same content-directory move.test/unit/check-ui-mcp-version-copy-script.test.ts— existing test file to extend.apps/loopover-ui/content/docs/quickstart.mdx,miner-quickstart.mdx,beta-onboarding.mdx,mcp-clients.mdx— real files with live@loopover/mcpreferences this check should be scanning today.