Skip to content

feat: turn on the Type Builder in prismic init - #389

Merged
angeloashmore merged 2 commits into
mainfrom
claude/focused-pascal-2fffvf-init
Oct 1, 2026
Merged

angeloashmore merged 2 commits into
mainfrom
claude/focused-pascal-2fffvf-init

Conversation

@angeloashmore

@angeloashmore angeloashmore commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Related: DT-3535

Description

Before this PR, prismic init stopped on a Legacy Builder repository and told the user to contact support.

After this PR, prismic init turns on the Type Builder through prismicio/obelix#2010. It also saves the project's framework, so the editor shows code snippets for that framework. Users who are not administrators get this error:

Repository "my-repo" uses the Legacy Builder. Only a repository administrator can turn on the Type Builder. Ask an administrator to run `prismic init`.

Upgrading legacy slices is in #388.

Checklist

  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

Deploy prismicio/obelix#2010 first. Until then, the init test "turns on the Type Builder when it is not enabled" fails with a 404.

As an administrator, run npx prismic init --repo <legacy-builder-repo> in a Next.js project. The repository then uses the Type Builder.

🤖 Generated with Claude Code

https://claude.ai/code/session_01H4jg7fmGVLhLJjo27eC7Mj


Note

Medium Risk
Init now mutates remote repository settings (Type Builder + framework) via API, with permission-dependent failure modes; behavior change for legacy repos that previously hard-failed.

Overview
prismic init now enables the Type Builder and aligns repository framework instead of failing with a “contact support” error when a connected repo still uses the Legacy Builder.

After the local framework adapter is resolved, init calls a new repository API (PATCH …/type-builder with the adapter’s framework id) when Type Builder is off or the remote framework does not match the project. Success logs that Type Builder was turned on; ForbiddenRequestError yields admin-focused errors (legacy builder) or a warning (framework only). The TypeBuilderRequiredError type and its CLI/Sentry handling are removed; repository responses may include an optional framework field.

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

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment. ↩

`prismic init` no longer stops on a Legacy Builder repository. It turns
on the Type Builder and saves the project's framework, so the editor
shows code snippets for that framework. Only repository administrators
can turn on the Type Builder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H4jg7fmGVLhLJjo27eC7Mj
@angeloashmore angeloashmore mentioned this pull request Oct 1, 2026
1 of 3 tasks
@angeloashmore
angeloashmore marked this pull request as ready for review October 1, 2026 01:01
@angeloashmore
angeloashmore merged commit 439e4e7 into main Oct 1, 2026
21 of 26 checks passed
@angeloashmore
angeloashmore deleted the claude/focused-pascal-2fffvf-init branch October 1, 2026 21:56
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.

3 participants