Skip to content

fix: updates schemas vtex.faststore - #3304

Merged
hellofanny merged 1 commit into
devfrom
fix/update-schemas
May 7, 2026
Merged

hellofanny merged 1 commit into
devfrom
fix/update-schemas

Conversation

@hellofanny

@hellofanny hellofanny commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

What's the purpose of this pull request?

Summary by CodeRabbit

Release Notes

  • New Features
    • Added quick ordering functionality with file attachment support for streamlined bulk uploads.
    • Introduced bulk file search capabilities with enhanced messaging and validation for CSV processing.
    • Expanded Shopping Assistant availability across additional page sections (headers, footers, product pages, search results).
    • Added Empty State component option for footer sections.

@hellofanny
hellofanny requested a review from a team as a code owner May 7, 2026 21:12
@hellofanny
hellofanny requested review from gabpaladino and lucasfp13 and removed request for a team May 7, 2026 21:12
@codesandbox-ci

codesandbox-ci Bot commented May 7, 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.

@coderabbitai

coderabbitai Bot commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR extends the CMS schema to enable the ShoppingAssistant component across all major page types and introduces comprehensive Quick Order configuration to the Navbar component with file upload, drawer modal, toast notifications, and comprehensive messaging and accessibility labeling.

Changes

ShoppingAssistant Component and Quick Order Feature

Layer / File(s) Summary
ShoppingAssistant Schema Definition
packages/core/cms/faststore/components/cms_component__shoppingassistant.jsonc, packages/core/cms/faststore/schema.json
ShoppingAssistant component schema adds explicit readOnly, writeOnly, deprecated, and $abstract metadata fields.
Component Whitelist and Page Contracts
packages/core/cms/faststore/schema.json
Schema $ALLOW_ALL_COMPONENTS whitelist updated to permit ShoppingAssistant in page sections, defining the contract for valid components across all page types.
Quick Order Configuration in Navbar
packages/core/cms/faststore/components/cms_component__navbar.jsonc
Navbar searchInput.quickOrderSettings gains attachmentButton, drawer modal config with table columns and messages, toastMessages for CSV upload outcomes, accessibilityLabels, and fileUploadCard with dropzone/button labels and detailed error message variants.
Quick Order Configuration in Central Schema
packages/core/cms/faststore/schema.json
Quick Order configuration blocks mirrored in central schema under components.Navbar.searchInput to synchronize both definition sources.
Page Content Type File Updates
packages/core/cms/faststore/pages/cms_content_type__*.jsonc
Individual page content type files (globalHeaderSections, globalFooterSections, home, landingPage, pdp, plp, search) updated to allow ShoppingAssistant as a section component; globalFooterSections also adds EmptyState.
Central Schema Page Type Registrations
packages/core/cms/faststore/schema.json
Content-type definitions for all pages updated to include ShoppingAssistant in sections.items.anyOf lists, keeping central schema synchronized with individual page files.
Structural Cleanup
packages/core/cms/faststore/schema.json
ScrollToTopButton component definition reordered within schema structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • vtex/faststore#3255: Adds ShoppingAssistant component and its initial schema definition that this PR extends across pages.
  • vtex/faststore#3275: Introduces ShoppingAssistant component registration and integration that this PR builds upon.
  • vtex/faststore#3165: Prior Navbar schema changes to searchInput configuration that this PR extends with Quick Order settings.

Suggested labels

cms, schema, configuration

Suggested reviewers

  • lemagnetic
  • lucasfp13
  • lariciamota

Poem

🐰 A shopping friend arrives to help customers find their way,
With quick orders, CSV files, and drawers that make a stay,
Toast messages and labels dance through every page,
From headers down to footers, they all engage—
Configuration complete, the stage is set for play! 🛒✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title "fix: updates schemas vtex.faststore" is vague and generic, using non-descriptive terms like "updates schemas" that don't convey meaningful information about the specific changes. Consider using a more specific title that describes the main change, such as: "fix: add ShoppingAssistant component to CMS page schemas" or "fix: extend Navbar quick order settings with file upload configuration".
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/update-schemas

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.

@hellofanny hellofanny changed the title fix: updates schemas fix: updates schemas vtex.faststore May 7, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 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/core/cms/faststore/schema.json`:
- Around line 2923-2933: The schema for the toastMessages entry "fileTimeout" is
missing a configurable title property; update the "fileTimeout" object in the
JSON schema to add a "title" property (type: string) alongside "message" so it
matches the shape used by other toast objects like "noFileSelected",
"noDataFound", and "fileProcessingError", ensuring CMS users can edit both title
and message for fileTimeout.
- Around line 2968-2983: The schema exposes two properties that configure the
same aria-label (accessibilityLabels.searchButtonAriaLabel and
searchInput.submitButtonAriaLabel), causing redundant configuration; remove the
duplicate by deleting searchInput.submitButtonAriaLabel from the schema and keep
accessibilityLabels.searchButtonAriaLabel as the single source-of-truth (ensure
its default remains "Submit Search"), and if code still supports the fallback,
add a short deprecation note to searchInput.submitButtonAriaLabel’s schema entry
(or omit it entirely) and update any schema descriptions to state that
accessibilityLabels.searchButtonAriaLabel is preferred.
🪄 Autofix (Beta)

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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9d3fbfb1-02f0-4945-b7a3-33065eb0927d

📥 Commits

Reviewing files that changed from the base of the PR and between a9d781c and b090616.

📒 Files selected for processing (10)
  • packages/core/cms/faststore/components/cms_component__navbar.jsonc
  • packages/core/cms/faststore/components/cms_component__shoppingassistant.jsonc
  • 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__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

Comment on lines +2923 to +2933
"fileTimeout": {
"title": "File timeout",
"type": "object",
"properties": {
"message": {
"title": "Message",
"type": "string",
"default": "The file may be too large, corrupted, or the parser may be stuck."
}
}
},

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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

fileTimeout toast is missing a configurable title field.

Every other toast object under toastMessages (noFileSelected, noDataFound, fileProcessingError, noDataAvailable, noValidSkus) exposes both a title and a message property. fileTimeout only exposes message, making its title non-configurable via the CMS.

🛠️ Proposed fix to add the missing `title` field
 "fileTimeout": {
   "title": "File timeout",
   "type": "object",
   "properties": {
+    "title": {
+      "title": "Title",
+      "type": "string",
+      "default": "File timeout"
+    },
     "message": {
       "title": "Message",
       "type": "string",
       "default": "The file may be too large, corrupted, or the parser may be stuck."
     }
   }
 }
🤖 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/core/cms/faststore/schema.json` around lines 2923 - 2933, The schema
for the toastMessages entry "fileTimeout" is missing a configurable title
property; update the "fileTimeout" object in the JSON schema to add a "title"
property (type: string) alongside "message" so it matches the shape used by
other toast objects like "noFileSelected", "noDataFound", and
"fileProcessingError", ensuring CMS users can edit both title and message for
fileTimeout.

Comment on lines +2968 to +2983
"accessibilityLabels": {
"title": "Accessibility Labels",
"type": "object",
"properties": {
"attachButtonAriaLabel": {
"title": "Attach file button aria-label",
"type": "string",
"default": "Attach File"
},
"searchButtonAriaLabel": {
"title": "Search button aria-label",
"type": "string",
"default": "Submit Search"
}
}
},

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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify which aria-label prop the search button component reads
rg -n "searchButtonAriaLabel\|submitButtonAriaLabel" --type ts -C 3

Repository: vtex/faststore

Length of output: 40


🏁 Script executed:

# First, verify the properties exist at the claimed lines
wc -l packages/core/cms/faststore/schema.json

Repository: vtex/faststore

Length of output: 103


🏁 Script executed:

# Check lines around 2980 and 2583 in schema.json
sed -n '2970,2985p' packages/core/cms/faststore/schema.json | cat -n

Repository: vtex/faststore

Length of output: 800


🏁 Script executed:

# Check lines around 2583 in schema.json
sed -n '2573,2593p' packages/core/cms/faststore/schema.json | cat -n

Repository: vtex/faststore

Length of output: 875


🏁 Script executed:

# Search for actual usage of these properties in TypeScript components
rg "searchButtonAriaLabel" -C 2 --glob "**/*.ts" --glob "**/*.tsx"

Repository: vtex/faststore

Length of output: 993


🏁 Script executed:

# Search for usage of submitButtonAriaLabel
rg "submitButtonAriaLabel" -C 2 --glob "**/*.ts" --glob "**/*.tsx"

Repository: vtex/faststore

Length of output: 5587


searchButtonAriaLabel and submitButtonAriaLabel both configure the same search button aria-label, creating redundant configuration options.

Both accessibilityLabels.searchButtonAriaLabel (default: "Submit Search") and searchInput.submitButtonAriaLabel (default: "Submit Search") set the aria-label for the same submit button. The component code shows searchButtonAriaLabel is preferred with submitButtonAriaLabel as a fallback, but this dual-path configuration is confusing for CMS users who may not realize they're setting the same property twice.

🤖 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/core/cms/faststore/schema.json` around lines 2968 - 2983, The schema
exposes two properties that configure the same aria-label
(accessibilityLabels.searchButtonAriaLabel and
searchInput.submitButtonAriaLabel), causing redundant configuration; remove the
duplicate by deleting searchInput.submitButtonAriaLabel from the schema and keep
accessibilityLabels.searchButtonAriaLabel as the single source-of-truth (ensure
its default remains "Submit Search"), and if code still supports the fallback,
add a short deprecation note to searchInput.submitButtonAriaLabel’s schema entry
(or omit it entirely) and update any schema descriptions to state that
accessibilityLabels.searchButtonAriaLabel is preferred.

@hellofanny
hellofanny merged commit 490175f into dev May 7, 2026
7 checks passed
@hellofanny
hellofanny deleted the fix/update-schemas branch May 7, 2026 21:29
eduardoformiga added a commit that referenced this pull request May 11, 2026
## What's the purpose of this pull request?

Bring `dev` into `main` so the next CD run on `main` cuts and publishes
`@faststore/*@4.1.0`. Includes the publish-pipeline fix from #3309, so
this is also the first release that exercises the `pnpm -r publish` flow
end-to-end (broken `4.0.0` is superseded by `4.1.0` as `latest`).

## What's included since v4.0.0

- #3308 — fix: PLP "Load more products" overwriting list instead of
appending
- #3306 — feat: user details adjusts — SFS-2950
- #3304 — fix: updates schemas vtex.faststore
- #3301 — fix: localization selector stale and reset selection for
unsaved changes
- `d1e40abe7` — fix: add repository field to diagnostics package for
OIDC provenance
- #3309 — fix: publish releases with pnpm to resolve workspace and
catalog protocols (already on `main`, kept by 3-way merge)

## How CD will behave on merge

1. `lerna version --conventional-commits --conventional-graduate --yes`
graduates `4.1.0-dev.1` → `4.1.0`, creates tag `v4.1.0`, and pushes the
`[no ci] Release: 4.1.0` commit.
2. `pnpm release:verify` packs every public package and asserts no
`workspace:` / `catalog:` literal survives the pack step.
3. `pnpm -r publish --access public --no-git-checks` uploads the 8
public packages with all `workspace:*` / `catalog:` references rewritten
to concrete versions.

## Sanity checks already performed locally

- `git merge-tree` between `origin/main` and `origin/dev`: clean, no
conflicts.
- `pnpm install --frozen-lockfile` on the merged tree: no lockfile
drift.
- `pnpm release:verify` on `release/4.1.0`: all 8 public packages clean
at `4.1.0-dev.1` (the same manifests that will be bumped to `4.1.0`).

## Follow-ups (not blocking)

- Once `4.1.0` is on `latest`, consider `npm deprecate
@faststore/<pkg>@4.0.0 "Broken release: workspace:/catalog: not
resolved. Use 4.1.0+"` for `cli`, `core`, `api`, `ui`, `components`,
`sdk`, `diagnostics`, `lighthouse`.
- Optional: add `workflow_dispatch` to `release.yml` so future hotfix
releases without `packages/*` changes can be triggered manually with
`--force-publish`.

Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Larícia Mota <[email protected]>
Co-authored-by: Matheus P. Silva <[email protected]>
Co-authored-by: Leandro Rodrigues <[email protected]>
Co-authored-by: vtexgithubbot <[email protected]>
Co-authored-by: Lucas Feijó <[email protected]>
Co-authored-by: Luiz Falcão <[email protected]>
Co-authored-by: Artur Santiago <[email protected]>
Co-authored-by: Sahan Jayawardana <[email protected]>
Co-authored-by: Mateus Pontes <[email protected]>
Co-authored-by: Matheus Martins <[email protected]>
Co-authored-by: renatomaurovtex <[email protected]>
Co-authored-by: Leandro Rodrigues <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Arthur Andrade <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Thiago Pereira <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Giuliana Rigaud <[email protected]>
Co-authored-by: renato <[email protected]>
Co-authored-by: Bruna Santos <[email protected]>
Co-authored-by: BrunaCubos <[email protected]>
Co-authored-by: Ícaro Oliveira <[email protected]>
Co-authored-by: Bruna Santos <[email protected]>
Co-authored-by: Everton Ataide <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Otavio Moreira Meirelles <[email protected]>
Co-authored-by: Marco Cardoso <[email protected]>
Co-authored-by: Gabriel Paladino <[email protected]>
Co-authored-by: CodeRabbit <[email protected]>
@coderabbitai coderabbitai Bot mentioned this pull request May 12, 2026
3 of 5 tasks
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.

2 participants