Skip to content

Fix @platejs/list headless React dependency - #5129

Merged
zbeyens merged 3 commits into
mainfrom
codex/issue-5128-headless-list
Sep 17, 2026
Merged

zbeyens merged 3 commits into
mainfrom
codex/issue-5128-headless-list

Conversation

@zbeyens

@zbeyens zbeyens commented Sep 16, 2026

Copy link
Copy Markdown
Member
  • Auto release

🐛 Fixes #5128

🧭 Task plan: docs/plans/5128-fix-list-headless-react-dependency.md

🟢 95-100% confidence

Phase 🧪 Tests 🌐 Browser
Reproduced 🔴 Fresh @platejs/list@53.1.3 install failed to import without React; the headless ownership test failed before the fix ➖ N/A
Verified 🟢 Packed root import without React; 113 package tests; package build/typecheck; pnpm check; autoreview clean ➖ N/A

✅ Outcome

@platejs/list can be imported from plain Node without React installed. The root entry graph no longer reaches react or react-compiler-runtime, while @platejs/list/react keeps the existing list wrapper markup.

⚠️ Caveat

The headless base plugin intentionally has no default React renderer. Static rendering remains caller-configured, as in the existing BaseListKit. pnpm check still reports the pre-existing sidebar exhaustive-deps warning but exits 0.

🏗️ Design

  • Chosen boundary: keep list parsing, rules, normalization, and transforms in BaseListPlugin; attach the JSX belowNodes renderer in ListPlugin.
  • Why not a quick package-config patch: optional peers or bundler externals would leave the headless source graph coupled to React.
  • Why not a broader change: the public exports, peer policy, list data model, and React markup already have the right contract.

🧪 Verified

  • pnpm --filter @platejs/list test
  • pnpm turbo typecheck --filter=./packages/list
  • pnpm --filter @platejs/list build
  • Fresh install of the locally packed package plus platejs, then import '@platejs/list' with React absent
  • Built root-entry graph audit for react and react-compiler-runtime
  • pnpm brl
  • pnpm lint:fix
  • .agents/skills/autoreview/scripts/autoreview --mode local --stream-engine-output
  • pnpm check

@codesandbox

codesandbox Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@zbeyens
zbeyens requested a review from a team September 16, 2026 22:30
@changeset-bot

changeset-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8ca1698

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@platejs/list Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-16T22:32:56.490281Z 1336dca 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.

@GauthierPLM GauthierPLM left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good for me :)

@zbeyens
zbeyens merged commit 94699ac into main Sep 17, 2026
3 of 4 checks passed
@zbeyens
zbeyens deleted the codex/issue-5128-headless-list branch September 17, 2026 18:34
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.

[Bug]: @platejs/list headless entry imports React, breaking Node/server-side use

2 participants