Repository navigation
refactor(mdx): compile providers as Strong templates - #2067
Merged
domgan-oai merged 4 commits intoOct 14, 2026
Merged
Conversation
domgan-oai
marked this pull request as ready for review
October 14, 2026 21:47
Contributor
Benchmark report🟢 No byte growth, no added work, and no timing changes beyond ±3%. Compares js-framework: 1k/10k row operationsAll 20 timed operations (20 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)No changes across 93 measured values. Public-import reachability bundles (bytes)No changes across 120 measured values. |
trueadm
added a commit
that referenced
this pull request
Oct 15, 2026
Brings in #2067 (mdx providers as Strong templates), #2068 (479118f, Strong named render blocks without descriptors), #2070 and Version Packages. #2068's squash matches its reviewed head 2203905 in runtime and compiler source; it adds only the MCP benchmark entry and its changeset line. Conflicts: - package.json: ci:workflow:test keeps the redesign's check-render-writes test in place of check-staged-dom; typecheck takes main's mdx typetests. - runtime.ts, hostComponent: #2068 drops the stable delegating children body; the redesign's commit-time props (state.next, commitHostComponent) stay. Re-expressed (the trial resolution of 4bf8ab0ddd): renderHostTagChildren's replacement. #2068 journalled the slot and its range, deferred the outgoing Block (deferRootReplacement, STAGED_DOM) and removed children at render. Here a different body builds in the slot's frontier over committed DOM, the outgoing Block and its nodes are queued as the slot's deletion, and landHostTagChildren swaps the slot's Block at commit; fresh DOM, or no open root render, replaces at once. scripts/render-writers.mjs classifies replaceHostTagChildren as fresh. Co-Authored-By: Claude Opus 5.5 <[email protected]>
11 of 12 tasks
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.
Summary
Convert the client and server
MDXProviderboundaries to Strong.tsrxtemplates. Public imports, component-map merging, parent-context opt-out, and interactive hydration retain their existing behavior. Part of #2059.Why
Both provider modules previously failed Strong compilation because they called
createElement. The new templates forward children directly through their existing contexts. Generated MDX documents remain a separate conversion.Changes
.tsrxentries with precise declaration companions and explicit type exports, preserving plain-TypeScript consumers. Build-tool types use MDX’s exported compile-only entry, preserving mutable options without introducing global JSX; remove the old ambient shim.Validation
git diff --check(generated JSONL is validated by its generator).0bb503fc: public provider SSR adoption, mapping/inheritance updates, counter state/DOM identity, events, and cleanup in both development and production modes; real production website SSR and client navigation, tables, code-copy and mobile docs menus at 1280×900 and 390×844. No console/page/recoverable errors. Provider screenshots and stable website captures match; an initial mobile-menu scroll-position difference also reproduced on main; replaying with interactions after opening animations completed produced matching captures.pnpm sync, typecheck coverage, and source-publication checks. All 45 packed-canary tests pass, including real TypeScript 5.9/7.1 Node/browser source-coverage and import-leak controls; freshly packed MDX source passes both environment projects locally.9d157b9b0, including all three required checks and CI provenance: CI run 38645916658, benchmark run. The four unit-test shards pass 53,936 tests (2 skipped); website integration passes 104/104. Packed-source validation passes on TypeScript 5.9.3, 6.0.3, and 7.1.0-dev.20260921.1, covering 51 bindings and 1,793 authored source checks per lane. React parity, browser integration, typechecks, lint, examples, package publishing, and bundle checks pass. Benchmark work counters, application-bundle bytes, and public-import reachability are unchanged; all 20 timed operations remain within noise. The global-JSX declaration and server/browser root failures found in earlier runs are resolved.perf-review: independent review and scan found no must-fix findings or mechanical flags. Provider render paths add no scheduling, DOM measurement, or children closures. Complete production JS comparison is recorded above; no latency claim.concise-code: authored runtime is 2 lines smaller; declaration companions preserve the public API, and the unused 16-line ambient JSX shim is removed. Two module renames preserve separate client/server contexts. Rejected extra runtime barrels/context modules and a generic provider factory; neither was needed. The two declarations preserve demonstrated plain-TS compatibility, the 2-line SSR fixture reuses existing compilation infrastructure, and the typetest protects all four public export paths, writable compile options, and absence of global JSX. The packed harness has one exact server-root exclusion, reused for file-coverage accounting; its negative controls retain browser import checking.Production provider parity compares
00b59cf6bwith main0bb503fc, usingdev:false,hmr:false,profile:falseandNODE_ENV=productionthroughout. The development provider and production website comparisons used854550e14; the follow-up changes only declarations, the compile-only typetest, and changeset prose, leaving runtime sources unchanged. Final head9d157b9b0adds only the packed-consumer harness fix and its regression tests. Full workspace tests, repository-wide formatting/typecheck, and broader browser/benchmark gates pass in current-head CI.Risk / follow-ups
useMDXComponentsbut supplies table/pre mappings through document props; it never mountsMDXProvider. Direct provider lifecycle proof comes from the public-API fixture and package tests, separately from real website QA..tsand new.tsrxproviders produce byte-identical diagnostics under the same browser-only settings. Public browser-facing declarations and the environment-correct packed source projects pass locally and in CI; the server remains fully checked with Node types. No global-type shim or core workaround was added.Provenance
agent-authored)Codex task · implementation host:
com-79386Need help on this PR? Tag
@codesmith-botwith what you need.Note
Medium Risk
Touches the MDX provider boundary used for component mapping across SSR and hydration; behavior is heavily tested but export and typing paths changed for consumers.
Overview
@octanejs/mdx now ships the client and server
MDXProviderlayers as Strong.tsrxtemplates instead of plain TypeScript. Providers render context via JSX (<MDXContext … />) rather thancreateElement, while merge semantics, nested providers,disableParentContext, anduseMDXComponentsbehavior stay aligned with @mdx-js/react.Package surface: public entries point at
index.tsrx/server.tsrxwith hand-written.d.tscompanions; the globalJSXambient shim is removed.@octanejs/mdx/compiletypes avoid pulling in global JSX. Roottypecheckaddspackages/mdx/typetests.Tests & tooling: SSR/hydration suites load the real server provider through an
?octane-ssrfixture; new cases cover mapping updates without remounting children, nested/function/disabled provider mappings, and post-hydration interactivity. Vitest drops MDX source aliases in favor ofoctaneServerFixtures. Packed-tarball browser typecheck excludesserver.tsrxwhile still failing on accidental client imports of server code.Docs, status metadata, CLI catalog, and a patch changeset reflect Strong provider templates and expanded SSR/hydration evidence. Generated MDX documents are unchanged (still value-position rendering).
Reviewed by Cursor Bugbot for commit 9d157b9. Bugbot is set up for automated code reviews on this repo. Configure here.