Remove dead code left by the Docusaurus migration - #48
Merged
Conversation
Three groups, all provably unreachable. Net -3,376 lines. FloatingHoverModal (components/mdx/FloatingHoverModal/) No .mdx file uses it, but it was registered in components/mdx.tsx, so its 18 statically-imported partials shipped in the first-load JS of every docs page. It was also the only importer of @mdx-js/react, now dropped from package.json. Deleting it leaves HoverPopover with one consumer (<Reference>/<Term>, tooltip variant), so the `modal` variant — the prop, the dialog role, the close-button header and ~40 lines of CSS — goes too. Stale codemods (scripts/codemods/, 2,429 lines) Every port-* script and generate-section-landings.mjs writes into content/docs/en, removed on 2026-08-18 with i18n; port-launch also reads a source tree that no longer exists. None can run without an edit, so "kept for reference" was already false. The two fix-admonition-titles scripts duplicated each other and targeted content-lint rules A1/A4, both now at zero. Nothing in package.json or .github/workflows invokes any of them. scripts/lib/port-pipeline.mjs and its test go with them: their only consumer was port-remaining.mjs. Test count drops 68 -> 58 accordingly. scripts/fix-links.mjs 123 lines, the only non-test script absent from package.json and every workflow. Referenced solely by two superseded plan docs. Also unifies isPartial. scripts/lib/doc-links.mjs carried a looser copy matching any `_`-prefixed basename (including `_diagram.png`) while scripts/lib/partials.mjs additionally required .md/.mdx. Both were live — move-doc read one, partials-check the other — so the answer depended on the caller's import. doc-links now re-exports the strict definition. CATALOG.md and manifest.json are regenerated (pnpm partials:catalog): the 18 partials lost their ESM importer, which partials:check caught as a stale catalog. Gates: all seven blocking checks pass. check-links unchanged at 15.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
Correction to the PR description: this deletion orphans 9 partials, not 7. Corrected in
The original count treated prose mentions inside Nothing in this PR's diff changes; the partials are untouched here either way. |
CI failed at `pnpm install --frozen-lockfile` with ERR_PNPM_OUTDATED_LOCKFILE: the previous commit dropped @mdx-js/react from package.json by hand without regenerating the lockfile, so the specifiers no longer matched. All three jobs died at the install step, which is why they failed in under 20 seconds without running a single check. Regenerated with `pnpm install --lockfile-only`. The diff is 15 deletions, all @mdx-js/react; no other package or version moves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Action 1 and action 3 from the codebase review. Net -3,376 lines, all provably unreachable.
FloatingHoverModal
No
.mdxfile uses it, but it was registered incomponents/mdx.tsx— so its 18 statically-imported partials shipped in the first-load JS of every docs page. It was also the only importer of@mdx-js/react, now dropped frompackage.json.Deleting it leaves
HoverPopoverwith one consumer (<Reference>/<Term>, tooltip variant), so themodalvariant goes too: the prop, thedialogrole, the close-button header, and ~40 lines of CSS.Stale codemods (2,429 lines)
Every
port-*script andgenerate-section-landings.mjswrites intocontent/docs/en, removed on 2026-08-18 with i18n;port-launchalso reads a source tree that no longer exists. None can run without an edit, so "kept for reference" was already false. The twofix-admonition-titlesscripts duplicated each other and targeted content-lint rules A1/A4, both now at zero. Nothing inpackage.jsonor.github/workflowsinvokes any of them.scripts/lib/port-pipeline.mjsand its test go with them — their only consumer wasport-remaining.mjs. Test count drops 68 → 58 accordingly.scripts/fix-links.mjs
123 lines; the only non-test script absent from
package.jsonand every workflow. Referenced solely by two superseded plan docs.One consolidation: isPartial
scripts/lib/doc-links.mjscarried a looser copy matching any_-prefixed basename (including_diagram.png), whilescripts/lib/partials.mjsadditionally required.md/.mdx. Both were live —move-docread one,partials-checkthe other — so the answer depended on the caller's import.doc-linksnow re-exports the strict definition.Notes for the reviewer
CATALOG.md/manifest.jsonare regenerated (pnpm partials:catalog): the 18 partials lost their ESM importer, whichpartials:checkcaught as a stale catalog.content/partials/launch-arbitrum-chain/. They were reachable only through a component that never rendered, so no reader has ever seen them — but they are prose, so they are logged indocs/code-review-backlog.md(added in the sibling PR) rather than deleted here.CLAUDE.mdcitedFloatingHoverModalas the example consumer of the ESM-import partial path. That path now has no consumer, though the tooling still supports it; the doc says so explicitly.Verification
All seven blocking gates pass (
types:check,test58/58,vars:check,nav:check,partials:check,versioned-docs-check,references:check).check-linksunchanged at 15.