docs: Completely remove deprecated docs - #11839
Conversation
`/docs-mintlify` has been the active documentation site for a while; the legacy Next.js/Nextra site at `/docs` was frozen and only served a cross-domain redirect shim from `cube.dev/docs/*` to `docs.cube.dev`. Removes the folder (458 files, 5.7 MB) along with everything that only existed to serve it: | Removed | Why | | --- | --- | | `docs/` | Legacy Nextra site, not a yarn workspace or lerna package | | `docs-mintlify/scripts/build_old_site_redirects.py` | Generated `docs/redirects-new-docs.json` | | `docs-mintlify/scripts/copy_content.py` | One-off `docs/content/product` -> Mintlify copier | | `docs-mintlify/scripts/migrate.py` | Orchestrator for the same one-off migration | | `docs-mintlify/scripts/migrate_redirects.py` | Consumed `docs/redirects.json` | The README hero images lived under `docs/content/` and were hotlinked via raw.githubusercontent, so they move to `.github/assets/` and the two URLs are updated. Dangling references cleaned up: the `/docs/` CODEOWNERS rule, the `docs/` oxlint ignore, the CONTRIBUTING link pointing contributors at the wrong folder, and the "legacy site" notes in both CLAUDE.md files. The `docs` PR label glob is repointed from `docs/*` to `docs-mintlify/**/*`, which previously had no labeler rule at all. Note: the Vercel project building from `docs/` needs to be disconnected, and the `cube.dev/docs/*` 301s must be re-homed outside this repo. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Claude finished @ovr's task in 2m 11s —— View job Review: deletion is clean and fully de-referenced — 0 high, 1 medium, 2 low. The
|
| Claim | Verified |
|---|---|
docs was never a yarn workspace or lerna package |
✅ root package.json workspaces are rust/* + packages/* only; lerna.json has no explicit package list |
No workflow referenced docs/ |
✅ only hit under .github/ is .claude/docs/review-threads.md in claude-code-review.yml — unrelated path |
| No dangling references remain | ✅ repo-wide grep for docs/content, cube/master/docs/, tree/master/docs, redirects-new-docs returns only the updated CONTRIBUTING line |
| No Vercel/Netlify config in-repo | ✅ no vercel.json / netlify.toml / .vercelignore at root — the Vercel wiring is project-side, matching the PR body's warning |
| Legacy site was a redirect shim | ✅ docs/next.config.mjs was / → docs.cube.dev/docs/introduction plus the spread of redirects-new-docs.json; content was frozen |
| Both hero images landed | ✅ present at .github/assets/, 6.7 KB + 437 KB, detected by git as pure renames (Bin 0 → 0) |
.oxlintrc.json still parses |
✅ single ignorePatterns entry removed, docs-mintlify/ retained |
The docs labeler glob is a genuine fix, not just a repoint: docs/* matched only top-level files in a folder whose content all lived under content/, so the label effectively never fired. docs-mintlify/**/* is correct.
Findings
Medium — the redirect table becomes unregenerable after this commit (inline)
build_old_site_redirects.py derives destinations by text-matching old page bodies against the Mintlify tree (--redirects ../docs/redirects.json --old-content ../docs/content/product). Both inputs and the generated docs/redirects-new-docs.json are deleted in this same commit. So the person re-homing the ~1900 301s can no longer regenerate them from the tree — only via git show 34e7b2b^:docs/redirects-new-docs.json. The script's own header documents that a naive prefix rewrite got ~76% of destinations wrong, so hand-rolling /docs/:path* → docs.cube.dev/:path* is a trap, not a fallback. Cleanest fix is merge-order: land the re-homing first. Otherwise keep just the generated JSON in-repo until the new host consumes it.
Low — three sibling migration scripts survive the cull (docs-mintlify/scripts/)
transform_components.py (Nextra→Mintlify component rewrites), rewrite_links.py (/product/* → /docs/* path table), and update_frontmatter.py are the same one-off migration vintage as the four deleted. They take a path argument so they don't break — nothing references ../docs — but by the PR's own rationale ("only existed to read from or write into it") they're equally vestigial, and rewrite_links.py's path table is the stale intermediate layout that build_old_site_redirects.py's header explicitly warns produced 404s. Not a blocker; either delete them in this sweep or leave them and let a follow-up handle it. Flagging only so the inconsistency is a decision rather than an oversight.
Low — README image URLs pin /master/ (inline)
Both hero images render broken on this branch until the commit reaches master. Self-resolving on merge; relative paths would sidestep it.
Notes, no action needed
docs-mintlify/CLAUDE.md:3still reads "All documentation work should happen here" after the "legacy site" note above it was dropped. Slightly orphaned phrasing now that there's no other site to contrast against, but it's still true and still useful.- Commit message is unusually good — the removed-and-why table means the deleted scripts' provenance is recoverable from
git logalone, which is most of what mitigates the medium finding. - Nothing to review on testing: no test touches
docs/, and the deletion can't affect build/test/publish given the workspace check above. The PR body's note thatyarn lintcouldn't run locally (nonode_modules) is fine — CI covers it and the.oxlintrc.jsondelta is one removed line.
| @@ -1,366 +0,0 @@ | |||
| #!/usr/bin/env python3 | |||
There was a problem hiding this comment.
The ~1900-entry redirect table stops being regenerable after this commit.
Per this script's own usage block, it derives destinations by text-matching old page bodies against the Mintlify tree:
python build_old_site_redirects.py \
--redirects ../docs/redirects.json \
--old-content ../docs/content/product \
--new-root ..
Both inputs — docs/redirects.json and docs/content/product — are deleted in this same commit, and so is the generated output docs/redirects-new-docs.json. The PR body correctly flags that the cube.dev/docs/* 301s need re-homing outside the repo, but once this lands, whoever does that re-homing cannot regenerate the table from the tree; they have to git show 34e7b2b^:docs/redirects-new-docs.json (and the script's header comment explains why a naive prefix rewrite gets ~76% of destinations wrong, so hand-rolling is not an option either).
Concretely: someone re-homes the redirects six months from now, doesn't know the generator ever existed, writes a /docs/:path* -> docs.cube.dev/:path* prefix rule, and most legacy URLs 301 into 404s.
Two ways out, either is fine:
- Land the re-homing first, then merge this. Cleanest — the
⚠️ in the PR body becomes a no-op. - Or keep
docs/redirects-new-docs.json(the generated output only — the 3862-line JSON, not the site) in-repo until the new host consumes it, so the data survives in the working tree rather than only in history.
If neither, at minimum record the recovery commit SHA in the PR/issue that tracks the Vercel disconnect, so the pointer isn't just this commit message.
| <a href="https://cube.dev?ref=github-readme"><img src="https://raw.githubusercontent.com/cube-js/cube/master/.github/assets/cube-core-logo.png" alt="Cube Core — Open-Source Semantic Layer" width="300px"></a> | ||
| </p> |
There was a problem hiding this comment.
Minor: these URLs hardcode /master/, so both hero images render broken on this branch (and in the PR's own README preview) until the commit reaches master — the old path is gone and the new one isn't on master yet. Self-resolving on merge, so not a blocker.
Since the assets now live in this repo rather than being cross-referenced, relative paths would sidestep the branch pin entirely and survive future moves:
| <a href="https://cube.dev?ref=github-readme"><img src="https://raw.githubusercontent.com/cube-js/cube/master/.github/assets/cube-core-logo.png" alt="Cube Core — Open-Source Semantic Layer" width="300px"></a> | |
| </p> | |
| <p align="center"> | |
| <a href="https://cube.dev?ref=github-readme"><img src=".github/assets/cube-core-logo.png" width="300px"></a> | |
| </p> |
One caveat if you take this: relative image paths only resolve where the README is rendered alongside the repo (GitHub, and it stays correct across branches/forks). This root README.md isn't published to npm — the client packages ship their own — so there's no registry-rendering regression, but it's the reason the absolute form was probably chosen originally. Your call; the absolute form is correct as written.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #11839 +/- ##
===========================================
- Coverage 84.74% 60.16% -24.58%
===========================================
Files 261 239 -22
Lines 87151 19204 -67947
Branches 0 3886 +3886
===========================================
- Hits 73855 11555 -62300
+ Misses 13296 7099 -6197
- Partials 0 550 +550
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
/docs-mintlifyhas been the active documentation site for a while, so this removes the frozen Next.js/Nextra site at/docs(458 files, 5.7 MB) along with the fourdocs-mintlify/scripts/*.pymigration scripts that only existed to read from or write into it. The README hero images lived underdocs/content/and were hotlinked via raw.githubusercontent, so they move to.github/assets/with the two URLs updated. Dangling references are cleaned up: the/docs/CODEOWNERS rule, thedocs/oxlint ignore, the CONTRIBUTING link pointing contributors at the wrong folder, and the "legacy site" notes in both CLAUDE.md files — and thedocsPR label glob is repointed fromdocs/*todocs-mintlify/**/*, which previously had no labeler rule at all.docswas never a yarn workspace or a lerna package and no workflow referenced it, so nothing in the build/test/publish pipeline is affected.cube.dev/docs/*todocs.cube.dev(~1900 entries inredirects-new-docs.json), so the Vercel project building fromdocs/needs to be disconnected and those redirects re-homed outside this repo — otherwise the legacy URLs start 404ing.Check List
Note on the linter: this worktree has no
node_modules, soyarn lintcould not execute (oxlintfails to load@stylistic/eslint-plugin). The.oxlintrc.jsonchange is the removal of a singleignorePatternsentry and the file was verified to still parse; CI will run the real lint.🤖 Generated with Claude Code