fix(scripts): scan the fumadocs-mdx docs content for stale @loopover/mcp versions#7125
Conversation
…mcp versions check-ui-mcp-version-copy.mjs guards UI copy against stale @loopover/mcp version strings, but its SCAN_TARGETS only reached apps/loopover-ui/src and isTextSource didn't match .mdx. Since the fumadocs-mdx migration (5003fab) the docs prose moved to apps/loopover-ui/content/docs/*.mdx — a sibling of src/ — leaving ~10 files with @loopover/mcp install snippets unscanned (the sibling check-docs-drift.mjs was updated for the move; this scanner was not). Add apps/loopover-ui/content to SCAN_TARGETS and .mdx to isTextSource so the content pipeline is scanned the same way src/ and the READMEs already are. The current docs use the correct @latest form, so the live scan still passes (now across 4 targets); a future hardcoded/stale version in any .mdx is now caught. Closes JSONbored#7093
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7125 +/- ##
==========================================
+ Coverage 93.75% 95.98% +2.22%
==========================================
Files 692 609 -83
Lines 68809 48145 -20664
Branches 18781 15133 -3648
==========================================
- Hits 64512 46210 -18302
+ Misses 3302 1118 -2184
+ Partials 995 817 -178
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-17 23:17:38 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. 🟩 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.
|
Closes #7093
scripts/check-ui-mcp-version-copy.mjsguards UI copy against stale@loopover/mcpversion strings, but itsSCAN_TARGETSonly reachedapps/loopover-ui/srcandisTextSourcedid not match.mdx. Since the fumadocs-mdx migration (5003fabe) the docs prose moved toapps/loopover-ui/content/docs/*.mdx— a sibling ofsrc/— leaving ~10 files with@loopover/mcpinstall snippets unscanned. The siblingcheck-docs-drift.mjswas updated for the move; this scanner was not.Change (scoped to source-file discovery, per the issue)
apps/loopover-ui/contenttoSCAN_TARGETS.isTextSourcefrom/\.(md|ts|tsx|js|jsx|json)$/to also match.mdx.collectVersionCopyFailuresmatching logic is untouched.Tests (
test/unit/check-ui-mcp-version-copy-script.test.ts)SCAN_TARGETSincludes the content dir andisTextSourcematches.mdx.collectSourceFilesnow picks up a real file underapps/loopover-ui/content/docs/*.mdx(quickstart.mdx).@loopover/mcpversion in a fixture.mdxis flagged.seedTempRepoto create the new content target dir.Validation
npx vitest run test/unit/check-ui-mcp-version-copy-script.test.ts— 17 passed; 100% patch coverage on the changed lines.npm run ui:version-audit— passes, now scanning 4 targets (the content docs currently use the correct@latestform).