Skip to content

Comments

feat: inline every rsc and remove is_root#356

Merged
davesnx merged 18 commits intomainfrom
inline-server-components-in-rsc-payload
Feb 11, 2026
Merged

feat: inline every rsc and remove is_root#356
davesnx merged 18 commits intomainfrom
inline-server-components-in-rsc-payload

Conversation

@davesnx
Copy link
Member

@davesnx davesnx commented Feb 9, 2026

@davesnx davesnx requested a review from Copilot February 11, 2026 18:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR changes the RSC/HTML streaming format to inline payloads (removing root special-casing), improves debug/context handling across async boundaries, and adds streaming controls (timeout + progressive chunk sizing).

Changes:

  • Inline RSC payloads into chunk 0 where possible and update model serialization shape (incl. debug/owner metadata).
  • Add render_html streaming controls: ~timeout and ~progressive_chunk_size; add stack-frame filtering hooks for model rendering.
  • Extend tests/benchmarks to cover the new inlining, context propagation across async Suspense, debug payloads, and streaming behavior.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
packages/server-reason-react-ppx/server_reason_react_ppx.ml Fix option prop JSON encoding to serialize Some via inner [%to_json].
packages/server-reason-react-ppx/cram/server-client-props.t/input.re Adds a PPX regression case for option(...) annotated props.
packages/server-reason-react-ppx/cram/server-client-props.t/run.t Updates expected expanded output for option prop serialization.
packages/reactDom/src/ReactServerDOM.mli Extends public API with timeout/chunk sizing and stack filtering hooks.
packages/reactDom/src/ReactServerDOM.ml Implements inlined model output, debug info, context across async, and buffered streaming + timeout.
packages/reactDom/src/dune Adds lwt.unix dependency for timeout support.
packages/reactDom/src/ReactDOM.mli Exposes attribute_to_html in the public interface.
packages/reactDom/src/ReactDOM.ml Updates Provider pattern matches for new Provider record fields.
packages/react/src/React.mli Extends Provider and Context.t to support async context propagation.
packages/react/src/React.ml Implements async context propagation via Lwt.with_value/Lwt.get in useContext.
packages/reactDom/test/test_RSC_model.ml Updates expected RSC chunks and adds extensive coverage for new behaviors.
packages/reactDom/test/test_RSC_html_shell.ml Updates shell streaming expectations and forces small progressive chunks in tests.
packages/reactDom/test/test_RSC_html.ml Adds timeout tests, chunk-size tests, and new escaping/context/Suspense expectations.
packages/html/Html.ml Escapes & in single-quote attribute escaping for safer HTML attributes.
demo/universal/native/DB.re Refactors editNote to update/write notes with explicit Result handling.
demo/server/pages/SinglePageRSC.re Switches to layout-based HTML wrapper and updates content markup.
demo/server/pages/ServerOnlyRSC.re Switches to layout callback API.
demo/server/DreamRSC.re Changes env debug comparison operator.
demo/client/SinglePageRSC.re Switches client boot to createFromFetch + createRoot render.
benchmark/dune Adds Lwt deps and lwt_ppx for async benchmarks.
benchmark/bench.ml Adds async RSC benchmarks via render_html and Lwt_main.run.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ml-in-barcelona ml-in-barcelona deleted a comment from Copilot AI Feb 11, 2026
@ml-in-barcelona ml-in-barcelona deleted a comment from Copilot AI Feb 11, 2026
@davesnx davesnx merged commit 48e09dd into main Feb 11, 2026
6 checks passed
@davesnx davesnx deleted the inline-server-components-in-rsc-payload branch February 11, 2026 21:06
@ml-in-barcelona ml-in-barcelona deleted a comment from Copilot AI Feb 11, 2026
@davesnx davesnx mentioned this pull request Feb 12, 2026
7 tasks
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.

Root Element and Suspense Handling HTML Encoding and Security Debug Information Improvements

1 participant