feat: add the builder package - #646
Conversation
The editor half of the rebuilt page builder needs to exist before its name can be claimed on npm: trusted publishing cannot perform a first publish, and the bootstrap script refuses a package that is not already in the workspace. No features. What ships is the boundary: the canvas will render through blocks-react rather than carry a renderer of its own, and admin is reachable only through the plugin-sdk facade. A layering test enforces both, with a positive control so it cannot pass by reading nothing. The first-publish acknowledgement is added here so release preflight can tell a placeholder-only package apart from a missing trusted publisher.
The package was added without an entry in the fixed group, so it would have versioned on its own while every other package moved together, and its changeset would have named twenty-two packages that no longer describe the set.
|
@codex please review this PR |
|
Warning Review limit reached
Next review available in: 50 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds the initial ChangesBuilder package
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b18c51d1b6
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@nextlyhq/adapter-drizzle
@nextlyhq/adapter-mysql
@nextlyhq/adapter-postgres
@nextlyhq/adapter-sqlite
@nextlyhq/admin
@nextlyhq/admin-css
@nextlyhq/blocks-engine
@nextlyhq/blocks-react
@nextlyhq/builder
create-nextly-app
nextly
@nextlyhq/plugin-form-builder
@nextlyhq/plugin-page-builder
@nextlyhq/plugin-sdk
@nextlyhq/plugin-seo
@nextlyhq/storage-s3
@nextlyhq/storage-uploadthing
@nextlyhq/storage-vercel-blob
@nextlyhq/ui
commit: |
|
@codex please review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85b5741f3c
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex please review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf1e562e37
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex please review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b684cbe0ab
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex please review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b29229094
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex please review this PR |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
packages/builder/tsconfig.json (1)
9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
check-typesdoes not cover the package's own config files.
includeis limited tosrc/**/*.tsup.config.tsandvitest.config.tsare TypeScript files at the package root, sotsc --noEmitskips them. A type error in either file reaches CI only when the build or the test run fails. Consider adding the root config files toinclude, or add a second tsconfig for them, if the other packages in this repository do the same.♻️ Optional: widen the type-check surface
- "include": ["src/**/*"], + "include": ["src/**/*", "tsup.config.ts", "vitest.config.ts"], "exclude": ["dist", "node_modules"]Note:
rootDir: "src"conflicts with including files outsidesrconly when emitting.check-typesuses--noEmit, andtsupperforms the build, so the emit path is unaffected.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/builder/tsconfig.json` around lines 9 - 10, Update the package tsconfig include configuration to type-check the root TypeScript config files tsup.config.ts and vitest.config.ts in addition to src/**/*, while preserving the existing no-emit check-types behavior and exclude settings.packages/builder/tsup.config.ts (1)
18-24: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument tsup’s automatic dependency externalization.
@nextlyhq/blocks-engineand@nextlyhq/blocks-reactare runtime dependencies, and tsup 8.5.0 externalizes them by default. Adding them toexternalis redundant.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/builder/tsup.config.ts` around lines 18 - 24, Update the tsup configuration’s external list by removing any redundant entries for `@nextlyhq/blocks-engine` and `@nextlyhq/blocks-react`, relying on tsup’s automatic externalization for these runtime dependencies while preserving the explicitly configured externals.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/builder/eslint.config.js`:
- Around line 1-4: Correct the comment above the ESLint configuration to
identify this package as the builder, not the renderer; describe that rendering
is delegated to `@nextlyhq/blocks-react` while preserving the explanation of
shared React rule layering and direct package linting.
---
Nitpick comments:
In `@packages/builder/tsconfig.json`:
- Around line 9-10: Update the package tsconfig include configuration to
type-check the root TypeScript config files tsup.config.ts and vitest.config.ts
in addition to src/**/*, while preserving the existing no-emit check-types
behavior and exclude settings.
In `@packages/builder/tsup.config.ts`:
- Around line 18-24: Update the tsup configuration’s external list by removing
any redundant entries for `@nextlyhq/blocks-engine` and `@nextlyhq/blocks-react`,
relying on tsup’s automatic externalization for these runtime dependencies while
preserving the explicitly configured externals.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 45c7b317-2442-4b69-be34-05a760b2a1af
⛔ Files ignored due to path filters (3)
.changeset/builder-package.mdis excluded by!.changeset/**.changeset/config.jsonis excluded by!.changeset/**pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!**/pnpm-lock.yaml
📒 Files selected for processing (12)
.github/workflows/ci.yml.github/workflows/pr-title.ymlAGENTS.mdeslint.config.mjspackages/builder/eslint.config.jspackages/builder/package.jsonpackages/builder/src/index.tspackages/builder/src/layering.test.tspackages/builder/tsconfig.jsonpackages/builder/tsup.config.tspackages/builder/vitest.config.tsscripts/release/first-publish-acknowledged.json
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50c2242386
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex please review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9af8d23fc9
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex please review this PR |
|
@codex please review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fd2f886c9
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex please review this PR |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Plan 04's B-1. The package exists so its name can be claimed; it has no
features, and that is the whole scope.
Trusted publishing (OIDC) cannot perform a package's first publish, and the
bootstrap script refuses a package that is not already in the workspace:
So the claim cannot precede the package, and the merge cannot precede the claim
— merging first puts a package in the lockstep train whose first publish answers
404 and strands it after the others are live.
The sequence:
npm logindone:node scripts/release/bootstrap-package.mjs @nextlyhq/builder --publishnextlyhq/nextly, workflowrelease.yml, environmentProduction)The dry run already passes on this branch:
What actually ships
No features.
src/index.tsexports one constant and carries the moduledoc. What this PR really adds is the package's boundary, made executable:
src/layering.test.tsenforces two promises as an allowlist (a blocklistonly stops what someone thought to name):
@nextlyhq/admindirectly — the only route is@nextlyhq/plugin-sdk/admin, the curated facade where each export carries astability tag. This matters more here than elsewhere: Phase 3 has a
sanctioned reason to want admin code (the Lexical node set for B-19,
founder-decided 2026-08-11 to go through the facade), so this test keeps the
shortcut closed while that extraction is in flight. Checked as a prefix, so
@nextlyhq/admin/anythingis caught too.@nextlyhq/blocks-reactis on theallowlist because the canvas draws with the same renderer that serves
published pages (Plan 04 D-04.7). The previous generation carried its own
renderer, and the two disagreed about condition gating in opposite
directions for as long as both existed (task 175).
Imports are read from the TypeScript AST, not by regex, and the suite opens
with a positive control asserting it read files at all — a guard that passes
because it found nothing is a failure mode this program has paid for repeatedly.
Stub-verified: adding
import { Card } from "@nextlyhq/admin"tosrc/index.tsfails both layering assertions; removing it restores green.Two things caught while building it
The tsconfig does NOT exclude test files (Plan 04 D-04.9). Four packages
currently ship test files no
tscever checks, which makes type-levelassertions in them decorative;
adminproves the strict pattern works. The newpackage starts correct —
check-typesis a singletsc --noEmit.@nextlyhq/builderwas missing from the changesetfixedgroup, so it wouldhave versioned on its own while every other package moved in lockstep. Caught by
asserting the group actually contained it rather than assuming the generated
changeset was right. Fixed in the second commit; the group is now 23.
3 tests; build, typecheck and lint clean.
Summary by CodeRabbit
New Features
@nextlyhq/builderpackage foundation for editor-based page building and rendering.Documentation
Chores