Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Prototype: extract pure sync/MDX modules into a standalone offlinedocs slice (split of #27390) - #28502

Closed
nickvigilante wants to merge 1 commit into
mainfrom
vigilante/docs-708-prototype-split-the-fumadocs-migration-extract-the-pure
Closed

Prototype: extract pure sync/MDX modules into a standalone offlinedocs slice (split of #27390)#28502
nickvigilante wants to merge 1 commit into
mainfrom
vigilante/docs-708-prototype-split-the-fumadocs-migration-extract-the-pure

Conversation

@nickvigilante

Copy link
Copy Markdown
Contributor

What this is

A prototype that carves the pure, dependency-light half of the Fumadocs
migration (#27390) into its own reviewable slice. I opened it to answer a
concrete question from that PR's review: can #27390 be broken into smaller
chunks without breaking things?

Short answer: it can be split for review, but not into two independently
green PRs. See "Trade-off" below before treating this as landable.

What moved here

  • scripts/lib/ - the manifest/route model plus the Markdown to MDX transform library
  • src/mdx-plugins/ - the remark/rehype plugins (coder tabs, details accordion, github callouts, step TOC numbers) and the shared mdast helpers
  • the tests for all of the above

These modules import only the Node stdlib, fumadocs-core, and each other.
No app wiring, no Chakra, no Next.js in this slice.

Size

Scope +added -removed
Library code + tests only (9 files) 2,390 0
Whole slice minus pnpm-lock.yaml 2,412 714
pnpm-lock.yaml (regenerated) 717 4,947
Whole slice (28 files) 3,129 5,661

For comparison, the full base PR #27390 is +7,014 / -4,472. The lockfile
shrinks here because removing the legacy Next.js/Chakra app drops far more
locked dependencies than fumadocs-core adds.

Trade-off: why the build check is red here

The extracted transform depends on fumadocs-core, which pulls js-yaml 4.
The legacy offlinedocs app pins js-yaml 3 (via its Next 15 / Chakra stack),
so both dependency sets cannot coexist in one package.json. To keep this
slice's own checks green, it removes the legacy app and ships a minimal
package.json scoped to the library.

The consequence is that the offlinedocs build check is red on this branch
by design: there is no app to build until the follow-up PR (PR B) adds the
Fumadocs Next.js app on top of this slice. The library test, lint
(tsc --noEmit), and format:check scripts are all green.

So the split buys reviewability (2,390 lines of pure logic reviewed on
their own, no lockfile noise) but not independent landability: PR A + PR B
together equal #27390, and only the pair is green.

Comments

Trimmed to the minimum needed to explain non-obvious intent: whole-line
comments across the moved sources went from 396 to 167 (-58%), comment-only
with no code changes. Non-obvious rationale (for example the OS-tab grouping
and the homepage-mapped section ordering) is kept.

Verification

  • pnpm test - 66 pass (35 route/transform + 31 mdx-plugins), 0 fail
  • pnpm lint (tsc --noEmit) - clean
  • pnpm format:check - clean

Links

This PR was created with AI assistance (Coder Agents).

…s slice

Splits the dependency-light pieces of the Fumadocs migration (PR #27390)
into a standalone slice for separate review:

  - scripts/lib: manifest/route model + Markdown to MDX transform library
  - src/mdx-plugins: remark/rehype plugins (coder tabs, details accordion,
    github callouts, step TOC numbers, mdast helpers)
  - the tests for both

Why this also removes the legacy app: the extracted transform depends on
fumadocs-core (js-yaml 4), which conflicts with the old Next 15 / Chakra
app's pinned js-yaml 3, so the two dependency sets cannot coexist in one
package.json. The old app therefore moves to a follow-up PR B that adds
the Fumadocs Next app on top of this slice.

Trade-off: the offlinedocs build check is red on this branch by design
(no app to build until PR B). The library test, typecheck, and format
checks are green. Comments were trimmed to the minimum needed to explain
non-obvious intent (396 to 167 whole-line comments across the moved
sources).

DOCS-708
@linear-code

linear-code Bot commented Aug 24, 2026

Copy link
Copy Markdown

DOCS-708

@nickvigilante

Copy link
Copy Markdown
Contributor Author

Closing as superseded. This prototype answered its question (the pure sync/MDX modules can be extracted and stay green), but the docs engine is being re-homed into its own repository and rebuilt there as packages, so this coder/coder branch is no longer the path forward. Thanks to everyone who looked.

@github-actions github-actions Bot locked and limited conversation to collaborators Aug 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant