Repository navigation
integrate(mdx-8je) rounds 1-3: mdxui leaves the repo (.8); one diff implementation (.12); hono serves text registers by Accept (.18) - #15
Conversation
…xt and @mdxui/fumadocs from npm (mdx-8je.8) dot-do/ui owns mdxui (7.0.0-alpha) and every @mdxui/* package; the format renderers were received there (ui-9ml4.1) and @mdxui/markdown became the md register of @mdxui/text. This repo now has no @mdxui sources. Removed - packages/mdxui, packages/@mdxui/* (33 packages, all already private) - apps/storybook and .github/workflows/chromatic.yml (hosted only @mdxui kits) - the packages/@mdxui/editor/app submodule entry, the @mdxui workspace glob, the mdxui changeset group, the @mdxui/fumadocs publish-all entry, the root `storybook` script Re-pointed - @mdxe/hono: `md` format renders through npm @mdxui/text/md (frontmatter + clean markdown, JSX stripped) instead of mdxld stringify; @mdxui/fumadocs stays on the registry range ^1.9.0 - @mdxe/workers: the `.md` static asset renders through @mdxui/text/md (no frontmatter; the .json asset carries the data) - @mdxe/vitest: generated test code imports renderMarkdown from '@mdxui/text/md'; the mdxui component-factory auto-import is gone - mdxe db command: @mdxui/editor is only ever an installed npm package - @mdxai/integration: dropped the unused @mdxui/plan devDependency - vitest.mdx.config.ts / tests/$.mdx: no workspace @mdxui aliases; the component-factory blocks (a dot-do/ui API) are removed - README.md / CLAUDE.md describe the new home Guards (tests first) - test/repo/mdxui-home.test.ts: packages/mdxui, packages/@mdxui and apps/storybook stay gone; no workspace: dependency on mdxui/@mdxui; only NPM_ALLOWED (@mdxui/text, @mdxui/fumadocs) with registry ranges; no source import outside that set; @mdxe/hono and @mdxe/workers depend on and import @mdxui/text/md; the installed @mdxui/text is the registry package and its md register is witnessed at runtime - packages/@mdxe/hono/src/format.test.ts, packages/@mdxe/workers/src/ build-assets.test.ts, @mdxe/vitest generated-import tests Lockfile: regenerated. Because the 2026-09 release (9dab805) pins mdxld ^1.9.2, @mdxe/hono ^3.0.0 and @mdxe/fumadocs ^3.0.0 that are not on npm yet, a plain `pnpm install` fails; the lockfile was produced with `--config.link-workspace-packages=true`, which resolves exactly those four entries to workspace links and nothing else (mdx-w89.5). A plain install after the publish rewrites them to registry versions. Gaps filed under mdx-w89: .5 (unpublished release pins), .6 (@mdxui/fumadocs@1.9.0 ships workspace:* deps), .7 (acceptance names html/json registers @mdxui/text does not have), .8 (md register keeps inline {expr}), .9 (test:mdx lane broken by mdxdb MemoryDBClient). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e/mdx-8je Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ReviewThis is a large PR by file count, but almost all of it is mechanical deletion of Worth double-checking
Nits
Overall: solid, well-tested migration. The 🤖 Generated with Claude Code |
`Accept: text/markdown` now returns the md register rendered by @mdxui/text
(byte-identical to the mdxe CLI's `--format md`) with the Markdown-for-Agents
headers — `Content-Type: text/markdown; charset=utf-8`, `Vary: Accept`,
`x-markdown-tokens` from the @mdxe/cli-core token oracle with its method
labelled in `x-markdown-tokens-method`. `Accept: text/plain` returns the plain
register. An `Accept` naming only unimplemented formats is refused with a 406
`application/problem+json` naming every media type that exists — never a
silent downgrade. Accept is read by `q` (a browser Accept is html, not xml as
the old substring match decided).
- src/text.ts: the Accept rung via resolveCapabilities({ accept }) from
@mdxui/text/capabilities (detectedBy 'accept', agent for md / human for
plain, harness null, never interactive), render via @mdxui/text/core,
header stamping, the 406 problem.
- src/format.ts: q-ordered negotiateFormat, FormatContext carries the
decision + frozen capabilities, documentResponse/formatResponse are async
(token count). `.md` is the md register; `.mdx` is the raw source
(text/mdx). server.ts serves every face through documentResponse.
- Tests: src/format.test.ts + src/text.test.ts (node) and
test/workers/text-registers.test.ts under @cloudflare/vitest-pool-workers
(headers verified via SELF.fetch in workerd). The optional js-tiktoken
backend is stubbed in the pool (test/stubs) — see mdx-w89.14.
- Deps: @mdxui/text ^0.1.0; devDeps @cloudflare/vitest-pool-workers,
@cloudflare/workers-types. mdxld → workspace:^.
Also: packages/mdxe devDependency mdxld and dependencies @mdxe/hono /
@mdxe/fumadocs → workspace:^. The release commit 9dab805 bumped them to
unpublished versions, so a fresh checkout could not `pnpm install` at all
(mdx-w89.13). Lockfile re-resolved accordingly.
Gaps filed (parent mdx-w89): mdx-w89.13 (unpublished specifiers),
mdx-w89.14 (token oracle optional backend under workerd), mdx-w89.15 (md
register passes body JSX through verbatim — upstream @mdxui/text).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…, 3-way mergeExtract, real extractWithAI, render→extract identity vs @mdxui/text (mdx-8je.12) - @mdxld/diff: merge3way returns merged content with git-style conflict regions; new path-based diffPaths / applyPaths / merge3wayObjects, exported deepEqual - @mdxld/extract: diff / applyExtract delegate to @mdxld/diff; new mergeExtract (base / current / extracted) for props and markdown both changed; extractWithAI implemented over ai-functions generateObject (optional peer, injectable generate); loop / conditional slots captured as regions instead of poisoning neighbouring scalars; entity tables go through @mdxld/markdown parseTable / renderTable - @mdxld/markdown: diff / applyExtract / DiffResult removed; parseTable / renderTable shared with @mdxld/extract; fromMarkdown keeps empty cells positional - @mdxld/formats: re-exports parseTable / renderTable instead of the removed diff API - tests: round-trip identity for every Role fixture against npm @mdxui/text md register (ROLE_MD_TEMPLATES / MD_EXTRACTORS / ROUND_TRIP_GAPS), 3-way merge, extractWithAI with mocked ai-functions, test/repo/diff-home witnesses one diff implementation; pre-existing typecheck errors in diff/markdown test files fixed Refs: mdx-8je.12. Follow-up mdx-w89.17 (rename/fold @mdxld/markdown once @mdxui/markdown leaves the tree). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…te/mdx-8je # Conflicts: # pnpm-lock.yaml
ReviewFocused on the actual logic changes ( OverallSolid piece of work. The "one diff implementation" consolidation is real: Potential issues
Nits
No security concerns spotted — the AI-assisted extraction path takes a caller-supplied 🤖 Generated with Claude Code |
…te/mdx-8je — resolve hono format/text conflicts with mdx-8je.8 Conflicts resolved: - packages/@mdxe/hono/src/format.ts: mdx-8je.18's contract (q-ordered negotiateFormat, FormatContext with decidedBy + frozen capabilities, async documentResponse/formatResponse, 406 problem+json naming the available media types; `.md` = md register via @mdxui/text/core through ./text.ts, `.mdx` = raw source). mdx-8je.8's constraint (md rendered by npm @mdxui/text, never a workspace source) holds through text.ts. - packages/@mdxe/hono/src/format.test.ts: one suite, mdx-8je.18's cases plus mdx-8je.8's (json round-trip, html fallback/custom renderer, extension mapping, md keeps document data). Dropped .8's `txt === doc.content` and `*/*` → null (superseded by .18's registers/negotiation) and the byte-identity with @mdxui/text/md: in @mdxui/text@0.1.0 core's md register and the /md entry are different renderers (data block + JSX kept vs YAML + JSX stripped) — gap noted against dot-do/ui. - packages/@mdxe/hono/package.json: union — ./format and ./text exports, workers-pool test script, @cloudflare/vitest-pool-workers + workers-types devDeps, mdxld workspace:^; @mdxui/text ^0.1.0 and @mdxui/fumadocs ^1.9.0 stay registry ranges. - pnpm-lock.yaml: regenerated with `pnpm install --config.link-workspace-packages=true`; diff vs origin/integrate/mdx-8je is the hono importer (+2 devDeps, mdxld specifier) and the mdxe importer mirroring its merged package.json. - test/repo/mdxui-home.test.ts: the md witness accepts `@mdxui/text/md` or `/core` from format.ts or text.ts (render path moved into text.ts under mdx-8je.18). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The merge commit carried the .18 branch's lockfile verbatim; this is the `pnpm install --config.link-workspace-packages=true` result for the merged package.jsons. Diff vs b629c8a is the hono importer (mdxld → workspace:^, @cloudflare/vitest-pool-workers + workers-types devDeps) and the mdxe importer. `pnpm install --frozen-lockfile` and test/repo/lockfile-drift are green. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ReviewThis is a large, well-documented integration PR (mdxui removal + Code quality / correctness
const trailing = oursTrailing !== baseLines.trailing ? oursTrailing : theirsTrailingis asymmetric — if both sides change the trailing newline differently from base,
Minor:
Test coverageTest coverage for the new/changed logic looks appropriately targeted: round-trip identity tests against the published Scope / process
Overall this reads as careful, well-tested work with good self-documentation. The nits above are minor and not blocking. |
Review: integrate(mdx-8je) rounds 1-3This is a large, unusually well-self-documented integration PR (three rounds merged, each with its own intent/verification writeup). That transparency makes review much easier, but the PR is also big enough (2,400+ files touched overall per the merge commit, and GitHub's own diff view hits its 300-file cap) that I focused on the substantive new code — Findings1. Changeset likely under-bumps a breaking change ( 2. The "known gap" between hono's
3. Minor: CDATA injection in <content><![CDATA[${doc.content}]]></content>
What looks solid
Process noteBundling three independently-scoped issues (.8, .12, .18) plus a lockfile regen into one PR/branch, with an automated integrator resolving cross-round conflicts, works here because the writeup is thorough — but it does mean a single approval is being asked to cover a semver-relevant API removal, a content-negotiation semantics decision, and a mechanical package removal all at once. Landing each round as its own PR going forward would make review and any future revert much cheaper. |
integrate(mdx-8je) round 3: hono serves text registers by Accept (mdx-8je.18)
Integration branch
integrate/mdx-8je=origin/main(2b1fa0e) + round 1 (d113a9d) + round 2 (b629c8a) + this merge (5a7d7fa) + lockfile regeneration (4a2e18a). Merged by the release integrator with authority for PR #15; nothing here is deployed or published.Merged
worktree-wf_db5bf2c3-d4f-2worktree-wf_db5bf2c3-d4f-6worktree-wf_db5bf2c3-d4f-7mdx-8je.18 — @mdxe/hono: serve text registers by Accept via @mdxui/text. New
src/text.ts(resolveTextRegister,renderTextRegister,textRegisterHeaderswith labelledx-markdown-tokens/x-markdown-tokens-method,notAcceptableproblem+json), rewrittensrc/format.ts(q-orderednegotiateFormat,FormatContextwithdecidedBy+ frozen capabilities, asyncdocumentResponse/formatResponse, 406 naming the available media types,.md= md register,.mdx= raw source),./formatand./textexports, workers-pool suite (@cloudflare/vitest-pool-workers,SELF.fetch),mdxld→workspace:^(mdx-w89.5/.13 interim).Conflict resolution with round 1 (mdx-8je.8)
The round-2 hold ("which
@mdxui/textentry is the md face") was decided for .18's contract: hono'smdregister renders through@mdxui/text/corerender(doc, capabilities)so a served page is byte-identical to the CLI's--format md.src/format.ts: .18's file. mdx-8je.8's constraint (md rendered by npm@mdxui/text, never a workspace source) holds throughtext.ts;@mdxui/textstays^0.1.0,@mdxui/fumadocs^1.9.0, no@mdxui/*workspace deps anywhere.src/format.test.ts: one suite — .18's cases plus .8's (json round-trip, html fallback / custom renderer, nested extension mapping, md keeps document data). Dropped .8'stxt === doc.contentand*/*→null(superseded by .18's plain register / negotiation) and the byte-identity with@mdxui/text/md: in@mdxui/text@0.1.0core's md register and the/mdentry are different renderers (## Typedata block + JSX kept vs YAML frontmatter + JSX stripped). Known gap (dot-do/ui): honotext/markdownand workers'.mdasset (still@mdxui/text/md) differ for the same document until upstream reconciles the two; recorded in the test header.package.json: union —./format+./textexports,testruns node then the workers pool,@cloudflare/vitest-pool-workers+@cloudflare/workers-typesdevDeps,mdxld: workspace:^.pnpm-lock.yaml: not hand-merged — regenerated withpnpm install --config.link-workspace-packages=true(committed as 4a2e18a on top of the merge); diff vs b629c8a is 5 hunks, allimporters:— hono (mdxld specifier, the two new devDeps) and mdxe (mirrors its cleanly merged package.json).--frozen-lockfileinstall clean.test/repo/mdxui-home.test.ts: the hono md witness accepts@mdxui/text/mdor/coreimported fromformat.tsortext.ts(the render path moved intotext.ts); the runtime witness of the registry package is unchanged.Verification on the integration branch (4a2e18a)
@mdxe/honobuild./format,./textentries emitted)@mdxe/honotest — node@mdxe/honotest — workers pool@mdxe/workers@mdxe/vitestmdxepnpm test:repo(incl.mdxui-home,diff-home,lockfile-drift)@mdxe/honotypechecksrc/index.test.ts(12 × TS2339:@mdxe/test-utilsmatcher augmentation is dropped from its dist.d.ts) — identical on main, on round 2 and on the .18 branch; CI Type Check is already red on mainNote on
test:repocounts: 204 is the branch's count since round 1 (tsconfig-includesemits 3 tests per workspace package; the 17 removed@mdxui/*packages account for the earlier 255).Remaining in epic mdx-8je (not in this PR)
.9 / .10 / .15 (gated on ai-evaluate 3.0 on npm), .1 (E2E vs auth.apis.do), .20 (mdxld publish), .17 (deferred).
integrate(mdx-8je) round 2: one diff implementation (mdx-8je.12); mdx-8je.18 held
Integration branch
integrate/mdx-8je=origin/main(2b1fa0e) + round 1 (d113a9d, below) + one reviewed merge (b629c8a). A human approves and merges this PR; nothing here is deployed.Merged
worktree-wf_db5bf2c3-d4f-6mdx-8je.12 — @mdxld/extract: wire @mdxld/diff as the one diff implementation, 3-way
mergeExtract, realextractWithAI, render→extract identity vs @mdxui/textIntent:
@mdxld/extractand@mdxld/markdowneach carried their owndiff/applyExtractwhile@mdxld/diffwas never wired in;extractWithAIwas a stub; nothing proved a template renders markdown its own regex can reverse. Acceptance: identity test green across the Role fixture set; one diff implementation in the repo.What the diff does, checked against that intent and CLAUDE.md:
@mdxld/diffowns the structured primitives (diffPaths,applyPaths,merge3wayObjects, exporteddeepEqual);merge3waynow returns merged content with git-style conflict regions (it returned a unified patch and printed[object Object]for conflicts).@mdxld/extract'sdiff/applyExtractare one-line delegations;mergeExtract(base, current, extracted)is the 3-way case where props and markdown both changed, and a path the template does not render is never treated as deleted.@mdxld/markdowndropsdiff/applyExtract/DiffResultand gains the one table primitive (parseTable/renderTable) that both packages now use;@mdxld/formatsre-exports accordingly. Changeset present (minor x4).extractWithAIis real: onegenerateObjectcall (ai-functions as an optional peer, injectablegenerate) for the slots the matcher cannot reverse, answers landing at the expression's data path; loop/conditional slots are captured as regions instead of breaking the scalars beside them; slot parsing is brace-balanced.round-trip.test.tsprovesextract(template, render(props, 'md')).datadeep-equals the round-trip props for every Role that npm@mdxui/text0.1.0 publishes (Hero/Features/Pricing/Testimonials/CTA/FAQ, 22 tests) and witnesses the publishedROUND_TRIP_GAPSrouted here;merge.test.ts(8) covers props-and-markdown-both-changed;ai.test.ts(8) mocks ai-functions for a loop + conditional template;@mdxld/markdownpins that it exports no diff;test/repo/diff-home.test.ts(4) is the repo-level witness: nodiff/applyExtractbody outsidepackages/@mdxld/diffand the dist re-exports produce exactly@mdxld/diff's results.@mdxld/markdown(name collision with the departed@mdxui/markdown) is mdx-w89.17. Reasonable: round 1 already removed@mdxui/markdownfrom this tree, so the collision is historical.diff/applyExtractfrom@mdxld/markdown(README x4, docs/ x4).Verification on the integration branch (after merge,
pnpm install --frozen-lockfile --config.link-workspace-packages=true, no lockfile drift)@mdxld/diff@mdxld/markdown@mdxld/extract(6 files, incl. round-trip identity, merge, ai)@mdxld/formatspnpm test:repo(incl.diff-home)tsc --noEmit) on the four packages@mdxld/extractshows 4 errors, all present on main in files this diff does not touch (extract.test.ts,integration.test.ts,integration.ts); main has 5, this diff removes theentity.tsoneLockfile: the merge conflicted only in
pnpm-lock.yaml; it was regenerated (pnpm install --lockfile-only --config.link-workspace-packages=true, the same mode round 1 used, needed because main'smdxld ^1.9.2/@mdxe/* ^3.0.0pins are unpublished, mdx-w89.5 / mdx-w89.13). The regenerated lockfile differs from round 1's by exactly the 13 lines@mdxld/extract's new dependencies need.Held
worktree-wf_db5bf2c3-d4f-7(pushed)@mdxui/textrenderer is the md face, regressing a round-1 guarantee. Round 1 (mdx-8je.8, merged above) made@mdxe/hono'smdformat and@mdxe/workers'.mdasset render through@mdxui/text/mdrender(doc): frontmatter kept, JSX stripped, tested (not.toContain('<Hero')). .18 rewritesformat.tssotext/markdownrenders through@mdxui/text/corerender(doc, capabilities)instead. Those two entries of the same npm package disagree: for a doc with<Hero title="x" />in the body,/mdgives---\n$type: BlogPost\n…---\n\n# Hello\n\n\n\nA **bold** line…while/coremd gives## BlogPost\n\n- title: Hello\n- tags: […]\n\n---\n\n\n# Hello\n\n<Hero title="x" />\n\nA **bold** line…(data as a synthesized heading + list, JSX passed verbatim; the branch itself files this as mdx-w89.15 "upstream"). Merging would serve raw JSX on the agent register and make hono'stext/markdowndiffer from workers'.mdfor the same document. On a trial merge the branch was green on its own (136 node tests, 5/5 in the workers pool viaSELF.fetch, tsc clean for touched src, lint errors all pre-existing on main), and the conflicts with round 1 (format.ts,format.test.ts,package.json, lockfile) were mechanically trivial, but round 1's carried testrenderDocument(doc,'md') === render(doc)from@mdxui/text/mdfails under it. Human decision needed: which register is the md face (or wait for dot-do/ui to make/coremd strip JSX like/md), then re-merge; the rest of .18 (q-ordered Accept, 406 problem+json naming what exists, labelledx-markdown-tokens, workers-pool test,workspace:^fix for the unpublished pins) reads well.integrate(mdx-8je) round 1 (post-#14): mdxui leaves the repo
Integration branch
integrate/mdx-8je, fast-forwarded toorigin/main(2b1fa0e), plus one reviewed merge. A human approves and merges this PR; nothing here is deployed.Merged
worktree-wf_db5bf2c3-d4f-2mdx-8je.8 — delete mdxui and @mdxui/ sources; consume @mdxui/text and @mdxui/fumadocs from npm*
Intent (un-deferred note on the issue): dot-do/ui owns
mdxuiand every@mdxui/*; the receipt there is done (ui-9ml4.1,@mdxui/text0.1.0 published). Delete the sources here, repoint consumers to the registry, keep the guards green, do not publish.What the diff does, checked against that intent and CLAUDE.md:
packages/mdxui,packages/@mdxui/*(33 private packages),apps/storybook, the chromatic workflow, the@mdxui/editor/appsubmodule entry, the workspace glob, the changeset group, thepublish-allentry, and the rootstorybookscript.git ls-treeconfirms no gitlink survives.@mdxe/honomdformat and@mdxe/workers.mdasset render through@mdxui/text/md(render);@mdxe/vitestgenerated code importsrenderMarkdownfrom@mdxui/text/md— verified against the installed 0.1.0md/index.d.ts, which exportsrender,renderContent, and therenderMarkdown/renderMdaliases.mdxe dbonly ever resolves an installed@mdxui/editor;@mdxai/integrationdrops an unused@mdxui/plandevDep.test/repo/mdxui-home.test.ts(12 tests) pins the removal, theworkspace:-free dependency rule with anNPM_ALLOWEDset, a source-import sweep, and a runtime witness that the installed@mdxui/textis the registry package (resolves undernode_modules/.pnpm/, repository dot-do/ui) and renders a parsed document with JSX stripped. Plushono/src/format.test.ts,workers/src/build-assets.test.ts, and vitest generated-import tests.@mdxui/texthas only themdregister today (html = honorenderPage/ workersgenerateHtmlPage, json =JSON.stringify(doc)), which is the acceptance nuance filed as mdx-w89.7.docs/(UI Components)/mdxui/*,packages/mdxe/ECOSYSTEM.md,VERSIONING.md, some example.mdx) and comments still name the old packages; no source, tsconfig, turbo, or workflow reference remains. Doc drift is a follow-up, not a blocker.Verification on the integration branch (after merge,
pnpm install --frozen-lockfile --config.link-workspace-packages=true, no lockfile drift)pnpm test:repo(repo guards, incl.mdxui-homeandpackage-allowlist)@mdxe/hono@mdxe/workers@mdxe/vitest@mdxai/integrationmdxe@mdxe/hono,@mdxe/workers,@mdxe/vitest,@mdxe/fumadocs,mdxePre-existing, not introduced here (recorded so the reviewer does not re-derive it)
origin/main's lockfile is stale against the release commit 9dab805 (e.g. hono importer recordsmdxld ^1.9.0while package.json says^1.9.2). This branch's regenerated lockfile is honest to the package.jsons; the four unpublished pins (mdxld ^1.9.2,@mdxe/hono ^3.0.0,@mdxe/fumadocs ^3.0.0x2) resolve tolink:entries. Human step after publishing the release from main: plainpnpm install, commit the lockfile.mdxedepends on@mdxe/hono/@mdxe/fumadocsthrough^3.0.0registry ranges, turbo does not see those workspace edges: a parallelturbo run buildonce racedmdxe's DTS against hono's, andmdxe...did not build@mdxe/fumadocs. Both go away when the pins are published (mdx-w89.5); sequential builds are green.@mdxe/vitest src/__tests__/index.test.ts(32 errors, lines 299-396; this diff adds lines 629-677),@mdxe/hono src/index.test.ts(12),@mdxe/workers src/local.test.ts(8),mdxe src/cli.ts(8, main has 12),mdxe src/commands/notebook.ts(3). All present on main in the same untouched files.node_modules/disthusks under directories deleted by integrate(mdx-8je): Cloudflare-native kernel round 1 — prune to workerd-only, mdxdb root, @mdxe/cli-core + @mdxe/tui seam, sqlite pools + $init, mdxld 1.9.2 alias release #14 and by this merge; they made 25 "no longer exists" guards fail until removed. A clean checkout does not have them.Held
Nothing held this round.
Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com