Skip to content

Fix template sync after release#5045

Merged
zbeyens merged 5 commits into
mainfrom
templates/release-sync-failure
Jun 29, 2026
Merged

Fix template sync after release#5045
zbeyens merged 5 commits into
mainfrom
templates/release-sync-failure

Conversation

@zbeyens

@zbeyens zbeyens commented Jun 27, 2026

Copy link
Copy Markdown
Member
  • Auto release

🐛 Fixes ➖ N/A

🟢 95-100% confidence

Phase 🧪 Tests 🌐 Browser
Reproduced 🟢 Source audit: @platejs/ai emitted public types reference ai and @ai-sdk/react types. ➖ N/A
Verified 🟢 pnpm check, @platejs/ai typecheck, install, lint, and source audit passed locally. ➖ N/A

✅ Outcome

  • Migrated app, registry metadata, AI docs, and playground template to AI SDK v7.
  • Made ai and @ai-sdk/react explicit optional peers of @platejs/ai while keeping them as dev dependencies for package builds.
  • Changed the @platejs/ai changeset to minor because the public type compatibility contract changed.

⚠️ Caveat

  • Browser proof was not run; this follow-up changes package metadata/types only, and the earlier template Next build covers the affected AI routes.

🏗️ Design

  • Keep the app owning its AI SDK runtime version.
  • Use optional peers to document the public type contract without forcing non-AI-chat consumers into runtime installs.
  • Avoid dependencies because @platejs/ai has no runtime import of ai or @ai-sdk/react.

🧪 Verified

  • pnpm install
  • pnpm --filter @platejs/ai typecheck
  • pnpm lint:fix
  • git diff --check
  • pnpm check
  • source audit of packages/ai/package.json and .changeset/ai-sdk-v7-chat-types.md

@zbeyens zbeyens requested a review from a team June 27, 2026 22:24
@zbeyens zbeyens force-pushed the templates/release-sync-failure branch from 8c80deb to 2522ab3 Compare June 27, 2026 22:24
@codesandbox

codesandbox Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@changeset-bot

changeset-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c3834ee

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

This PR includes changesets to release 1 package
Name Type
@platejs/ai Minor

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

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. release labels Jun 27, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2522ab321f

ℹ️ 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".

Comment on lines +1557 to +1562
cmd = [
cursor_bin,
"--print",
"--output-format",
"stream-json" if args.stream_engine_output else "json",
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add workspace trust for headless Cursor runs

When Cursor reviews a repo whose folder/parent has not already been trusted, this command enters --print mode without --trust, so the new Cursor engine can stop at the workspace-trust prompt instead of producing review JSON. I checked Cursor's CLI support thread: it states cursor-agent --help lists --trust, that it works with -p / --print headless mode, and shows cursor-agent -p --trust "your prompt" for one-shot tasks (https://forum.cursor.com/t/trust-for-interactive-cursor-agent-or-auto-trust-new-workspaces-in-cli/162011). Since this helper already pre-filters project-local config before invocation, include/probe --trust for the safe headless path.

Useful? React with 👍 / 👎.

"class-variance-authority": "0.7.1",
"clsx": "^2.1.1",
"lucide-react": "1.20.0",
"lucide-react": "1.21.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Move template changes to source inputs

Root AGENTS.md says: “Templates: templates/** is CI-controlled output. Never manually edit or commit template source, manifests, or lockfiles. Fix the source registry, package, or workflow inputs and let CI regenerate templates.” This commit changes generated template files/manifests/lockfiles under templates/** directly, so the next template generation can overwrite these edits while the real source of truth stays stale; put the dependency/skill changes in the registry, preset, or workflow inputs instead and regenerate.

Useful? React with 👍 / 👎.

Comment on lines +1590 to +1594
if instruction_paths or local_mcp_paths:
print(
"cursor isolation warning: Cursor CLI does not document an ignore-rules/safe-mode flag; "
"trusted project-local surfaces are being allowed explicitly.",
file=sys.stderr,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Disable project Cursor config for reviews

When --cursor-allow-workspace-instructions is used in a repo containing .cursor/cli.json, this branch continues while relying on the temporary global cli-config.json deny list for read-only safety. Cursor support documents that project .cursor/cli.json permissions take precedence over the global config and suggests --disable-project-configs when only global config should apply (https://forum.cursor.com/t/cli-permission-allowlist-written-to-global-config-instead-of-project-level-cursor-cli-json/160343), so a trusted repo's project permissions can override the injected Shell/Write denies and let autoreview run commands or write files. Refuse .cursor/cli.json specifically or disable project configs before invoking Cursor.

Useful? React with 👍 / 👎.

Comment on lines +317 to +323
function getFirstSectionBlock(content, labels) {
for (const label of labels) {
const block = getSectionBlock(content, label);

if (block.trim()) {
return block;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Check every linked-plan section

Because new templates always include a non-empty Linked plans: - None. block, getFirstSectionBlock() returns that block and never inspects a later documented Linked goal plans: or Child plans: section. In that layout, missing or incomplete child plans under the alternate section names pass unchecked even though the skill text says all three section names are followed recursively; merge the links from all matching sections instead of stopping at the first non-empty one.

Useful? React with 👍 / 👎.

Comment on lines +323 to +324
download_to_path "$child_url" "$child_remote"
rewrite_screencastify_child_playlist "$child_remote" "$child_local" "$prefix" "$auth_query"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resolve HLS segments relative to child playlists

For Screencastify masters where a child playlist lives in a subdirectory, such as video/playlist.m3u8 with segment lines like segment0.ts, the child playlist is downloaded from prefix + child_uri but rewritten with the root prefix for every relative segment. That makes ffmpeg request prefix/segment0.ts instead of prefix/video/segment0.ts, so transcript generation fails for those HLS layouts; pass the child playlist's own directory/base URL into the rewrite step.

Useful? React with 👍 / 👎.

Comment on lines +1471 to +1475
candidates = [
repo / ".cursor" / "mcp.json",
repo / ".mcp.json",
repo / "mcp.json",
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Block global Cursor MCP config during reviews

This only rejects repo-local MCP files, but Cursor's docs say project MCP lives at .cursor/mcp.json and global MCP lives at ~/.cursor/mcp.json for tools available everywhere, and that Cursor automatically uses available MCP tools when relevant (https://cursor.com/docs/mcp.md). On a machine with a global MCP server configured, the Cursor reviewer can still load those external tools even when the reviewed repo has no local MCP config, bypassing the helper's stated read-only review isolation. Disable global MCP loading or run Cursor with an isolated home/config that also excludes ~/.cursor/mcp.json.

Useful? React with 👍 / 👎.

@zbeyens zbeyens force-pushed the templates/release-sync-failure branch from 2522ab3 to 07cdd68 Compare June 27, 2026 22:54
@zbeyens zbeyens merged commit 34fdca4 into main Jun 29, 2026
8 checks passed
@zbeyens zbeyens deleted the templates/release-sync-failure branch June 29, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant