Skip to content

Remove dead code left by the Docusaurus migration - #48

Merged
anegg0 merged 2 commits into
mainfrom
remove-migration-dead-code
Aug 21, 2026
Merged

Remove dead code left by the Docusaurus migration#48
anegg0 merged 2 commits into
mainfrom
remove-migration-dead-code

Conversation

@anegg0

@anegg0 anegg0 commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Action 1 and action 3 from the codebase review. Net -3,376 lines, all provably unreachable.

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.

rg -c FloatingHoverModal --glob '*.mdx' content/   # no matches
rg -n '@mdx-js/react' --glob '!node_modules'       # only package.json + this component

Deleting it leaves HoverPopover with one consumer (<Reference>/<Term>, tooltip variant), so the modal variant goes too: the prop, the dialog role, the close-button header, and ~40 lines of CSS.

Stale 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.

One consolidation: 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 livemove-doc read one, partials-check the other — so the answer depended on the caller's import. doc-links now re-exports the strict definition.

Notes for the reviewer

  • CATALOG.md / manifest.json are regenerated (pnpm partials:catalog): the 18 partials lost their ESM importer, which partials:check caught as a stale catalog.
  • Deleting the component orphans 7 partials under 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 in docs/code-review-backlog.md (added in the sibling PR) rather than deleted here.
  • CLAUDE.md cited FloatingHoverModal as 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, test 58/58, vars:check, nav:check, partials:check, versioned-docs-check, references:check). check-links unchanged at 15.

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.
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fumadocs-test Ready Ready Preview Aug 21, 2026 11:36pm

Request Review

@anegg0

anegg0 commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

Correction to the PR description: this deletion orphans 9 partials, not 7. Corrected in .claude/docs/code-review-backlog.md on #49 (6790f79).

FloatingHoverModal ESM-imported 18 partials. Nine (*-pc.mdx) are also <include>d by a live choose-*.mdx page and stay reachable. The other nine had no second consumer:

_config-account-abstraction.mdx     _config-force-inclusion.mdx
_config-customizable-governance.mdx _config-hardware.mdx
_config-data-posting-costs.mdx      _config-l1-challenge-period.mdx
_config-dedicated-throughput.mdx    _config-other-language-support.mdx
_config-evm-compatibility.mdx

The original count treated prose mentions inside .claude/ planning docs as references — _config-evm-compatibility.mdx and _config-l1-challenge-period.mdx are only named in a plan doc and registry.json, which render nothing.

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.
@anegg0
anegg0 merged commit 1c35192 into main Aug 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant