Skip to content

fix: allow_all_components for CMS and faststore v3 - #3313

Merged
mateuspontes merged 2 commits into
3.xfrom
fix/allow-all-cms-components-3.x
May 12, 2026
Merged

mateuspontes merged 2 commits into
3.xfrom
fix/allow-all-cms-components-3.x

Conversation

@mateuspontes

Copy link
Copy Markdown
Contributor

What's the purpose of this pull request?

ℹ️ The same was done for vtex.faststore@4 via #3312

Fix a bug where CMS content-types (Home, PDP, PLP, Search, Landing Page, Global Sections) had their sections field hardcoded to an explicit list of allowed components instead of using $ALLOW_ALL_COMPONENTS.

This prevented custom components from appearing in the CMS editor. Any store that created new sections would need to manually rewrite FastStore's schema, breaking the onboarding experience entirely.

Reported by Otavio and Caixeta. A patch was already shipped in v4.0.1 as a hotfix.

How it works?

FastStore's base.jsonc defines a $ALLOW_ALL_COMPONENTS sentinel in $defs. This sentinel is replaced at build time (before sending to Schema Registry) with the full dynamic list of all registered components, including user-defined ones.

Previously, the .jsonc files generated for each content type had the sections array expanded inline with a hardcoded anyOf list of known built-in components. This list was stale and excluded any custom component.

This PR removes the hardcoded anyOf blocks and replaces them with a reference to $ALLOW_ALL_COMPONENTS, consistent with how 404, 500, and login content types already work. Also removes the now-obsolete schema.json that duplicated this data.

How to test it?

Add a new custom component using the faststore@3 base. This new fixed version is already deployed in v3.99.1.

image

Checklist

You may erase this after checking them all 😉

PR Title and Commit Messages

  • PR title and commit messages follow the Conventional Commits specification
    • Available prefixes: feat, fix, chore, docs, style, refactor, ci and test

PR Description

  • Added a label according to the PR goal - breaking change, bug, contributing, performance, documentation..

Dependencies

  • Committed the pnpm-lock.yaml file when there were changes to the packages

Documentation

  • PR description
  • For documentation changes, ping @Mariana-Caetano to review and update (Or submit a doc request)

@mateuspontes mateuspontes self-assigned this May 12, 2026
@mateuspontes
mateuspontes requested a review from a team as a code owner May 12, 2026 17:36
@mateuspontes
mateuspontes requested review from hellofanny and ommeirelles and removed request for a team May 12, 2026 17:36
@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@mateuspontes has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 28 minutes and 32 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ad3f4749-4d91-4add-81b5-cd98474e7704

📥 Commits

Reviewing files that changed from the base of the PR and between b9c1601 and 1ec94d3.

📒 Files selected for processing (9)
  • packages/core/cms/faststore/pages/cms_content_type__globalfootersections.jsonc
  • packages/core/cms/faststore/pages/cms_content_type__globalheadersections.jsonc
  • packages/core/cms/faststore/pages/cms_content_type__globalsections.jsonc
  • packages/core/cms/faststore/pages/cms_content_type__home.jsonc
  • packages/core/cms/faststore/pages/cms_content_type__landingpage.jsonc
  • packages/core/cms/faststore/pages/cms_content_type__pdp.jsonc
  • packages/core/cms/faststore/pages/cms_content_type__plp.jsonc
  • packages/core/cms/faststore/pages/cms_content_type__search.jsonc
  • packages/core/cms/faststore/schema.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/allow-all-cms-components-3.x

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mateuspontes mateuspontes added the bug Something isn't working label May 12, 2026
@codesandbox-ci

codesandbox-ci Bot commented May 12, 2026 •

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@pkg-pr-new

pkg-pr-new Bot commented May 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

@faststore/api

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/cli

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/components

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/core

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/graphql-utils

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/lighthouse

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/sdk

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/ui

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

commit: 1ec94d3

@mateuspontes
mateuspontes merged commit fe8914b into 3.x May 12, 2026
3 of 4 checks passed
@mateuspontes
mateuspontes deleted the fix/allow-all-cms-components-3.x branch May 12, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants