Skip to content

feat(react-markdown): port complete public contract - #543

Closed
jonkwheeler wants to merge 40 commits into
octanejs:mainfrom
jonkwheeler:jon/react-markdown-binding
Closed

jonkwheeler wants to merge 40 commits into
octanejs:mainfrom
jonkwheeler:jon/react-markdown-binding

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Applications using react-markdown can migrate through the ordinary package/import mapping to @octanejs/markdown without replacing their Unified plugins, component mappings, URL policy, or sync/async rendering model. The binding covers the pinned [email protected] default export, MarkdownAsync, MarkdownHooks, defaultUrlTransform, and all six public types while preserving the upstream MIT source and license evidence.

Parity is fail-closed rather than inferred from a sample: the harness executes all 87 pristine upstream identities, maps every upstream case injectively to maintained Octane evidence, inventories 174 adapted runtime identities across 14 files, and pairs the public type surface with pristine and TSRX-aware compiler lanes. Async SSR replay support landed separately in #506 and is now consumed from main.

Session-settled decisions carried from planning: ship an equivalent mapped package rather than an adjacent Markdown renderer (user-directed); reuse Octane's established HAST projection seam and preserve distinct react-markdown policy (user-approved).

Validation

  • pnpm format:check
  • pnpm typecheck
  • pnpm test
  • targeted tests:
    • CI=true pnpm --filter @octanejs/markdown test — 87/87 pristine upstream identities and 166/166 package tests passed, including SSR, hydration, async lifecycle, differential, adoption, and crosswalk coverage
    • CI=true pnpm markdown:typecheck — pristine/adapted public consumer types passed
    • node --test scripts/react-parity/harness-lib.test.mjs — 32/32 shared fail-closed harness tests passed
    • CI=true pnpm react-parity:check — 5,345 stable and 5,413 canary cases current
    • CI=true pnpm packages:pack:check — 70 package tarballs validated; 581 raw TSRX source files preserved; packed SSR/build consumers passed
    • scoped generated-file formatting and pnpm sync passed

Risk / follow-ups

The highest-risk surface is asynchronous plugin/component rendering. The required evidence covers rejection propagation, stale-run cancellation, unmount safety, SSR replay, hydration adoption, and exact React differential output; the PR remains draft for current-head automated review and maintainer feedback before any readiness promotion.

Provenance

  • An agent produced this diff (agent-authored)

Note

Medium Risk
Large new binding with security-sensitive URL/raw-HTML behavior and async/hooks lifecycle; risk is mitigated by exhaustive parity crosswalks and differential tests, but migration surface and renderer divergences still warrant careful review.

Overview
Introduces @octanejs/markdown, a source-compatible Octane port of [email protected], so apps can swap the dependency/import (react-markdown → @octanejs/markdown) and keep Unified plugins, component maps, URL transforms, and the sync / async / hooks APIs.

The package vendors pinned upstream source and tests, ships Markdown, MarkdownAsync, MarkdownHooks, defaultUrlTransform, and the public types, and wires fail-closed parity: all 87 upstream test.jsx cases map to adapted tests via crosswalk/audit JSON, plus pristine React lanes, differential processor/URL tests, SSR/hydration, and hooks lifecycle coverage. Documented divergences include Octane render types, no React 19 image preload hints on SSR, and MarkdownAsync returning an awaitable descriptor instead of throwing on sync render when suspending.

Repo integration updates generated binding/package inventories (61 bindings), CLI migration map, markdown:typecheck in root bindings:typecheck, react-parity harness hooks, a patch changeset, README/security notes, and an implementation plan under docs/plans/.

Reviewed by Cursor Bugbot for commit ed29198. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
octane-website Ready Ready Preview Aug 3, 2026 11:51am
octane-website-mcp Ready Ready Preview Aug 3, 2026 11:51am

Request Review

@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability labels Aug 3, 2026
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 11:34 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 3, 2026 11:34 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 11:50 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 3, 2026 11:51 Inactive
@jonkwheeler
jonkwheeler marked this pull request as ready for review August 3, 2026 12:25
@jonkwheeler
jonkwheeler marked this pull request as draft August 3, 2026 12:44
jonkwheeler and others added 2 commits August 7, 2026 15:25
Resolve inventory, eval manifest, hook-form parity lockfile, and root
package scripts while keeping react-markdown coverage.

Co-authored-by: Cursor <[email protected]>
Regenerate lockfile hashes and inventory for react-markdown.

Co-authored-by: Cursor <[email protected]>
jonkwheeler and others added 5 commits August 7, 2026 15:37
Resolve inventory, eval manifest, hook-form parity lockfile, and root
package scripts while keeping react-markdown coverage.

Co-authored-by: Cursor <[email protected]>
Regenerate lockfile hashes and inventory for react-markdown.

Co-authored-by: Cursor <[email protected]>
Resolve inventory, eval manifest, hook-form parity lockfile, and root
package scripts while keeping react-markdown coverage.
Regenerate lockfile hashes and inventory for react-markdown.
Comment thread package.json Resolved
Wire @octanejs/react-markdown into the shared bindings typecheck gate so CI covers package and consumer types.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

REVIEW WITHDRAWN

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Addressing open leonidaz parity-control threads (compiler-program membership + type-fixture classifications) and renaming @octanejs/react-markdown → @octanejs/markdown per maintainer naming guidance. Withdrawing readiness until those land and Bugbot is clean on the new head.

REVIEW WITHDRAWN

jonkwheeler and others added 3 commits August 10, 2026 11:26
Rename @octanejs/react-markdown to @octanejs/markdown, verify type-lane
compiler-program membership against parsed tsconfigs, and classify the
repo-authored type fixtures exactly once.

Co-authored-by: Cursor <[email protected]>
Remap adapted runtime ids after the package path move, register
react-markdown in the MCP/CLI catalog as @octanejs/markdown, and keep
type-lane compiler-program membership checks green.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Renamed @octanejs/react-markdown → @octanejs/markdown, closed the two open leonidaz parity-control threads (compiler-program membership + type-fixture classifications), merged origin/main, and Bugbot is clean on this head with no unresolved threads.

READY FOR REVIEW

Comment thread packages/markdown/package.json Resolved
jonkwheeler and others added 2 commits August 10, 2026 14:13
Merge origin/main to restore branch currency, add markdown-react-oracle
catalog with literal @types/[email protected] and @types/[email protected] pins,
and regenerate inventories via pnpm sync.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Merged latest origin/main, pinned exact type-oracle versions via markdown-react-oracle catalog, and resolved the open leonidaz thread. Bugbot is clean on this head with no unresolved threads.

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Branch is BEHIND main. Withdrawing readiness until branch currency is restored and Bugbot is clean on the new head.

REVIEW WITHDRAWN

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Updated branch via gh pr update-branch (merged latest main docs commit). Bugbot is clean on this head with no unresolved threads.

READY FOR REVIEW

@leonidaz

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! This pull request was incorporated into main as commit 4ae395d50c1d through consolidated PR #699.

@leonidaz leonidaz closed this Aug 12, 2026
kotarotaniguchi0523 pushed a commit to kotarotaniguchi0523/octane that referenced this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability READY FOR REVIEW

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants