Skip to content

fix(react): correct SSR behavior in direct Markdown rendering - #11

Open
SoonIter wants to merge 2 commits into
mainfrom
soon-codex/use-official-react-ssr
Open

SoonIter wants to merge 2 commits into
mainfrom
soon-codex/use-official-react-ssr

Conversation

@SoonIter

@SoonIter SoonIter commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

The direct Markdown renderer currently executes imperative handles, refs, and class mount lifecycles in Node.js, and silently ignores render errors. Keep the existing custom reconciler and Markdown serialization while correcting these SSR behaviors.

  • Follow React Fizz for imperative handles, external-store snapshots, deferred values, transitions, and optimistic updates.
  • Suppress ref and class layout lifecycle commit work using the pinned react-reconciler 0.33 commit flags, without modifying user components.
  • Reject render errors, including those reported by error boundaries, and wait for suspended content before returning Markdown.
  • Preserve direct React-to-Markdown rendering. No HTML conversion, HTML parser, production react-dom dependency, or README changes.

Validation: 41 tests pass, including react-dom/server comparisons; builds, TypeScript, Biome, Publint pass. Rspress website builds successfully in an isolated worktree with node_md resolve.alias pointing to the local renderer; 213 Markdown files generated, no React/SSG-MD errors, and both Tabs contents plus surrounding text verified.

Remaining differences: client reconciler ID format is retained; class boundaries may execute their error handlers, but the renderer rejects instead of accepting their fallback. Internal Fiber access is tied to the pinned reconciler and covered by behavior tests.

Copilot AI balanced review requested due to automatic review settings November 12, 2026 08:24
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-12T08:24:14.789896Z
We couldn’t complete this review. Comment @codex review to try again.
2f9996a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@SoonIter
SoonIter force-pushed the soon-codex/use-official-react-ssr branch from 2f9996a to 6883d75 Compare November 12, 2026 08:24
@SoonIter SoonIter changed the title refactor(react): delegate SSR execution to react-dom/server fix(react): correct SSR behavior in direct Markdown rendering Nov 12, 2026

This branch has not been deployed

No deployments
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.

2 participants