Repository navigation
feat(core): localized product URLs, breadcrumbs PDP and PLPs - #3402
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughVTEX localization adds Catalog Dataplane product lookups, by-linkId collection resolution, localized GraphQL fields, request-scoped caching, locale-aware Core rendering, hreflang metadata, and binding redirects with persisted localized slugs. ChangesVTEX API clients and localization
Core locale-aware navigation
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant ProductPage
participant GraphQLAPI
participant CatalogDataplane
participant LocalizedProductProvider
participant LocalizationButton
ProductPage->>GraphQLAPI: request product and otherLocales
GraphQLAPI->>CatalogDataplane: fetch localized product
CatalogDataplane-->>GraphQLAPI: localized linkIds and categories
GraphQLAPI-->>ProductPage: product and alternate slugs
ProductPage->>LocalizedProductProvider: provide otherLocales
LocalizationButton->>LocalizedProductProvider: read localized slugs
LocalizationButton-->>ProductPage: redirect to selected locale URL
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
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. |
92bc71f to
ae5b6fe
Compare
@faststore/api
@faststore/cli
@faststore/components
@faststore/core
@faststore/diagnostics
@faststore/lighthouse
@faststore/sdk
@faststore/ui
commit: |
…3352) ## Summary Implements localized product links for FastStore stores with localization.enabled: true (PDP only — PLP localized slugs are handled separately). **it-IT** <img width="1907" height="1001" alt="image" src="https://github.com/user-attachments/assets/b78831db-edbd-4db3-96bb-0c67b4b6c20b" /> **pt-BR** <img width="1918" height="992" alt="image" src="https://github.com/user-attachments/assets/f357c607-a37d-41e2-b13a-abf25de2629d" /> ### Problem FastStore stores with localization enabled had three major issues on the PDP: 1. Localized product URLs (e.g. `/it-IT/adidas-polo-uomo-65/p`) returned 404 because the `Query.product` resolver's `startsWith` guard rejected slugs whose prefix didn't match the Intelligent Search `linkText` (always in the default locale). 2. Breadcrumb items were rendered as non-clickable `<span>` elements and `BreadcrumbJsonLd` was suppressed entirely. 3. The `LocalizationSelector` had no localized product URL to navigate to when the shopper switched locale. 4. After landing on a 404 from a locale switch, the LocalizationSelector lost the product context and couldn't recover the correct localized URL — and the 404 page showed the bare asPath instead of the full locale-prefixed URL. ### Changes @faststore/api - New clients/catalog/ client — uses the public catalog-dataplane/product/{id} endpoint (Accept-Language header, no AppKey/AppToken required) to fetch localized product data (linkId, category.fullPathUriName) per locale - Query.product resolver: when startsWith fails and localization is enabled, validates the slug prefix against the - - Catalog Dataplane linkId for the current locale before rejecting - New StoreProduct.otherLocales: [StoreProductLocale!] field — fires Promise.all over all configured locales to build localized slug entries; zero overhead for non-localized stores - StoreProduct.breadcrumbList resolver: now async; uses category.fullPathUriName from the Catalog Dataplane for localized category URL paths and linkId for the product URL; falls back to slugify(IS name) when no translation exists - productTranslationsCache in GraphqlContext.storage — request-scoped cache keyed by productId:locale shared across all three resolvers to avoid duplicate API calls @faststore/core - New `LocalizedProductContext` — React context that provides otherLocales from the PDP GraphQL response to - any component in the tree (including global components like LocalizationButton) - `useLocalizedProduct_unstable` exported from experimental/index.ts for store customization - `LocalizationButton` / `useBindingSelector`: uses otherLocales to redirect to the correct localized product URL on locale switch; falls back to the defaultLocale slug when no translation exists for the target locale - `useBindingSelector`: persists otherLocales to sessionStorage keyed by SKU id (fs:otherLocales:{skuId}) so the locale selector can recover the correct product URL even after the user lands on a 404 (where the page no longer provides otherLocales) - `Breadcrumb.tsx`: removed localization.enabled workaround — always renders <Link> now that localized URLs are available -`p.tsx`: restored BreadcrumbJsonLd for all locales + added hreflang alternate tags via NextSeo.additionalLinkTags (including x-default pointing to the root store URL) - `EmptyState`: the fromUrl shown on the 404 page now includes the active Next.js locale prefix (e.g. /it-IT/...) so shoppers see the full URL they attempted to visit ### Architecture note The Catalog Dataplane is called once per product+locale combination. For otherLocales (all locales) and breadcrumbList (current locale only), results are shared via productTranslationsCache. A future optimization — replacing the Promise.all with a single "all-locales" endpoint from the Catalog team — would be a contained 2-file change with no behavior impact. The sessionStorage persistence in `useBindingSelector` uses a fs:otherLocales:{skuId} key and is intentionally session-scoped (cleared on tab close). It is a best-effort fallback; the locale selector always prefers live otherLocales from context when available. ## Test plan try using `brandless` acc - [ ] Visit a localized PDP (e.g. `/it-IT/{localized-slug}-{skuId}/p`) — page renders correctly eg. /adidas-mens-performance-polo-blast-blue-65/p -> switch to it-IT locale! You will be able to see the slug localized. - [ ] Visit a non-localized locale PDP (e.g. `/pt-BR/{default-slug}-{skuId}/p`) — page renders correctly (fallback path) eg. select en-CA - [ ] PDP breadcrumb items are clickable `<Link>` elements with localized category URLs - [ ] 2-level category hierarchy breadcrumb builds correct intermediate paths - [ ] `LocalizationSelector` navigates to the correct localized product URL for each locale - [ ] `LocalizationSelector` falls back to the default locale slug for locales without a translation - [ ] `hreflang` tags appear in `<head>` for all configured locales + `x-default` (lists only the `availableLinkIds`) <img width="1086" height="181" alt="Screenshot 2026-06-11 at 16 33 23" src="https://github.com/user-attachments/assets/e1dc0ed0-3332-492b-9a1d-84a33c3a1eb4" /> <img width="498" height="178" alt="Screenshot 2026-06-11 at 16 37 36" src="https://github.com/user-attachments/assets/6f52bb39-9211-4ece-8462-14e0841d6115" /> - [ ] `BreadcrumbJsonLd` appears in page source for all locales - [ ] Non-localized stores (`localization.enabled: false`) — no regression, no extra API calls - [ ] Switch locale on a PDP → land on a 404 → LocalizationSelector still shows/navigates to correct localized URLs for all locales - [ ] 404 page fromUrl displays the full locale-prefixed path (e.g. /it-IT/some-product/p) [Spec file for more information](vtex/faststore-dx-spec-kit#15) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit * **New Features** * Product pages now expose `otherLocales` via a dedicated localization context/provider. * Product pages generate multi-locale SEO `hreflang` alternate links. * Added localized VTEX catalog support to fetch locale-specific product/category details. * **Improvements** * Breadcrumbs now use localized category/product path segments when available and consistently render as links. * Locale-aware product slug validation and PDP redirects that use cached or persisted `otherLocales`. * Added request-scoped caching for localized product lookups. * **Tests** * Expanded coverage for PDP locale parsing plus `otherLocales` persistence/recovery behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…ion pages (#3401) - **Replaces `pagetype` with `by-linkid` cascade** for all stores in `Query.collection` and `collectionLoader`. The cascade tries `category/by-linkid` → `brand/by-linkid` → `collection/by-linkid` in sequence; 404 advances to the next step, 5xx is a hard failure. `pagetype` is retired on this code path. - **Adds `StoreCollection.otherLocales`** — a new lazy GraphQL field built from `availableLinkIds` in the `by-linkid` response, enabling the `LocalizationSelector` to navigate to the same collection in another locale. - **Adds `StoreProduct.otherLocales`** and uses the Catalog Dataplane API to resolve localized product slugs and breadcrumbs for PDP pages (`localization.enabled` stores only). - **Slug normalization**: all slugs are lowercased before `by-linkid` calls, preserving parity with `pagetype`'s case-insensitive behavior (merchants can register mixed-case `linkId` values via the Catalog multilanguage API). - **Canonical IS facets**: StoreCollection.meta for categories derives the canonical (default-locale) slug from availableLinkIds[defaultLocale] (falling back to the echoed linkId), since by-linkid echoes the queried/localized slug. Intelligent Search still receives canonical slugs regardless of the request locale. - **Localized PLP fields**: Accept-Language is forwarded to by-linkid (when localization.enabled), so collection name/title and breadcrumb names render in the current locale. - **Multi-segment paths**: the full accumulated path is sent to category/by-linkid, so nested categories resolve to the correct child unambiguously. - New `catalog.byLinkId.{category,brand,collection}` client methods (optional `locale` → `Accept-Language`; single-object + multi-segment path encoding fixes) - `collectionLoader`: replaced `pagetype` with the `by-linkid` cascade; added `entityType` discriminator; slug normalization (`toLowerCase`) - `StoreCollection` resolvers: `meta` (async, canonical slugs via category tree), `breadcrumbList`, `seo`, `type`, `otherLocales` (new) - `StoreProduct` resolvers: `otherLocales` (new), `breadcrumbList` (localized via Catalog Dataplane) - `Query.product`: localized slug validation via Catalog Dataplane when `localization.enabled` - `Query.collection`: `locale` arg validated against configured locales; `mutateLocaleContext` + captured locale passed to loader - GraphQL schema: `StoreCollectionLocale`, `StoreProductLocale` types; `otherLocales` on both `StoreCollection` and `StoreProduct` - `utils/localization.ts`: shared localization config helpers - Search client: prefer `ctx.storage.locale` over `vtex_segment` when `localization.enabled` - Context factory: assign `discoveryConfig` / account / OTEL before building clients/loaders - `[...slug].tsx`: passes `locale` to collection query; - `LocalizedProductContext` + `useBindingSelector`: page-agnostic locale switching with `urlSuffix` (empty for PLP, `/p` for PDP) - `LocalizationButton`: reads `urlSuffix` from context - [ ] Category PLP (`/apparel`) — products load, `selectedFacets: [{key:"category-1", value:"apparel"}]` - [ ] Sub-category PLP (`/Computer---Software/Eletronicos`) — multi-level breadcrumb correct http://localhost:3000/jumper-ezbook-x3-windows-10-laptop-36/p <img width="1918" height="980" alt="breadbrum-go-plp" src="https://github.com/user-attachments/assets/2b62cb72-2362-4657-9697-2a28a5f78f43" /> - [ ] Brand PLP (`/adidas`) — `selectedFacets: [{key:"brand", value:"adidas"}]` - [ ] Collection PLP (`/computer---software`) — `selectedFacets: [{key:"productclusterids", value:"..."}]` - [ ] Localized category PLP (`/it-IT/Abbigliamento`) — resolves, no IS 500s, canonical facets sent - [ ] Locale switch on PLP (IT → PT-BR) → navigates to `/pt-BR/Vestuário` - [ ] Locale switch on PLP (IT → EN) → navigates to `/apparel` - [ ] Non-existent slug → clean 404 - [ ] PDP locale switch — `otherLocales` drives `LocalizationSelector` - **Breadcrumb names are not localized**: `by-linkid` `name` field always returns the default-locale value. Feedback filed with the Catalog team to add `availableNames` or `Accept-Language` support. → Resolved: localized via Accept-Language on by-linkid. - **`availableLinkIds` excludes the default locale**: worked around via category tree lookup. Feedback filed with Catalog team to include the default locale in the map. → Resolved: beta API now includes it; category-tree workaround removed. - **`metaTagDescription` not yet in `by-linkid` response**: resolver already reads `root.metaTagDescription`; will work once Catalog team ships the field. SEO description is currently empty for collection pages (pre-existing gap, not a regression from this PR). - **Accent sensitivity**: by-linkid is case-insensitive but accent-sensitive by design (/vestuário → 200, /vestuario → 404); intentional, confirmed with Catalog team. - PLP canonical URL currently derives from the visited URL (router.asPath) → duplicate-content risk for casing variants. Pre-existing issue. (Follow up [task](https://vtex-dev.atlassian.net/browse/SFS-3281)) - Spec: `specs/localized-plp-collection-pages.md` [PR](vtex/faststore-dx-spec-kit#18) - Phase A (PDP): #3352 Reference: https://vtex-dev.atlassian.net/browse/SFS-3196 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **New Features** * Added locale-aware collection queries with support for category, brand, and collection lookup by URL. * Added localized collection links through the new `otherLocales` field. * Added locale-specific collection and product page navigation, including localized redirects and hreflang links. * Improved collection breadcrumbs, metadata, facets, and category hierarchy handling. * **Bug Fixes** * Improved localized product slug validation and locale selection. * Correctly handles missing catalog entries without masking unrelated errors. * **Tests** * Expanded coverage for localized lookups, collection resolution, URL encoding, and locale fallback behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Cursor <[email protected]>
3620470 to
3fd89c8
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (3)
packages/api/src/platforms/vtex/resolvers/collection.ts (1)
90-93: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated segment-slug construction across
meta,breadcrumbList, andotherLocales.The same
slug.split('/').filter(Boolean)→ cumulative-join pattern is repeated three times in this file. Extract a smallgetSegmentSlugs(slug: string): string[]helper to keep the three resolvers in sync.♻️ Suggested helper
+const getSegmentSlugs = (slug: string): string[] => { + const segments = slug.split('/').filter(Boolean) + return segments.map((_, i) => segments.slice(0, i + 1).join('/')) +}Then replace each inline duplication with
getSegmentSlugs(slug).Also applies to: 122-129, 166-171
🤖 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/api/src/platforms/vtex/resolvers/collection.ts` around lines 90 - 93, Extract a shared getSegmentSlugs(slug: string): string[] helper for the cumulative segment-slug construction, then replace the duplicated inline split/filter/map logic in the meta, breadcrumbList, and otherLocales resolvers with calls to getSegmentSlugs(slug).packages/core/src/components/ui/LocalizationButton/LocalizationButton.tsx (1)
45-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCall
useLocalizedProduct()once.Minor readability nit: the hook is invoked twice back-to-back for two different fields.
♻️ Suggested tweak
- const otherLocales = useLocalizedProduct()?.otherLocales ?? undefined - const urlSuffix = useLocalizedProduct()?.urlSuffix ?? '/p' + const localizedProduct = useLocalizedProduct() + const otherLocales = localizedProduct?.otherLocales ?? undefined + const urlSuffix = localizedProduct?.urlSuffix ?? '/p'🤖 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/src/components/ui/LocalizationButton/LocalizationButton.tsx` around lines 45 - 46, Update the LocalizationButton component to call useLocalizedProduct() once, store its result, and derive both otherLocales and urlSuffix from that shared value while preserving the existing fallback behavior.packages/api/src/platforms/vtex/clients/commerce/types/ByLinkId.ts (1)
1-46: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract shared fields into a base interface.
ByLinkIdCategoryResponse,ByLinkIdBrandResponse, andByLinkIdCollectionResponserepeat the same 5 fields (name,title,description,metaTagDescription,availableLinkIds) and duplicate the same JSDoc comment nearly verbatim. Extracting a shared base type keeps the three response contracts in sync as they evolve.♻️ Suggested base interface
+interface ByLinkIdBaseResponse { + id: number + name: string + title: string | null + description: string | null + /** + * Optional SEO meta description. pagetype.metaTagDescription + * was backed by the same source as `description`; prefer `description` for + * parity when this field is absent. + */ + metaTagDescription: string | null + /** Localized linkIds keyed by locale. Null when no multilanguage entries are registered. */ + availableLinkIds: Record<string, string> | null +} + -export interface ByLinkIdCategoryResponse { - id: number +export interface ByLinkIdCategoryResponse extends ByLinkIdBaseResponse { fatherCategoryId: number | null - name: string linkId: string - title: string | null - description: string | null - metaTagDescription: string | null - availableLinkIds: Record<string, string> | null } -export interface ByLinkIdBrandResponse { - id: number - name: string +export interface ByLinkIdBrandResponse extends ByLinkIdBaseResponse { linkId: string - title: string | null - description: string | null - metaTagDescription: string | null - availableLinkIds: Record<string, string> | null } -export interface ByLinkIdCollectionResponse { - id: number - name: string +export interface ByLinkIdCollectionResponse extends ByLinkIdBaseResponse { linkId: string | null - title: string | null - description: string | null - metaTagDescription: string | null - availableLinkIds: Record<string, string> | null }🤖 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/api/src/platforms/vtex/clients/commerce/types/ByLinkId.ts` around lines 1 - 46, Extract the repeated fields and associated JSDoc from ByLinkIdCategoryResponse, ByLinkIdBrandResponse, and ByLinkIdCollectionResponse into a shared base interface, then have each response interface extend it. Keep each interface’s unique fields—such as id, fatherCategoryId, linkId, and category-specific differences—defined locally, preserving the existing linkId types and response contracts.
🤖 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/api/src/platforms/vtex/resolvers/collection.ts`:
- Around line 67-73: Update the StoreCollectionType type resolver to return
distinct SubCategory and Cluster values where applicable, preserving Brand,
Collection, Department, and Category handling. Use the existing
collection/category discriminator symbols and recursive parent lookup needed to
identify third-level categories, and ensure curated collections and clusters are
not collapsed into Collection.
In `@packages/api/src/platforms/vtex/resolvers/query.ts`:
- Line 411: Guard URL parsing in the category mapping that computes slug from
node.url, so empty or relative values do not throw and abort the allCollections
query. Update the slug logic around new URL(node.url) to validate or safely
handle invalid URLs while preserving lowercase pathname slugs for valid absolute
URLs.
In `@packages/core/src/pages/`[slug]/p.tsx:
- Around line 98-118: Update buildHreflangLinks to select each locale’s binding
with find((b) => b.isDefault), falling back to the first binding when no default
exists, instead of always using bindings[0]. Preserve the existing URL
validation and hreflang link construction.
---
Nitpick comments:
In `@packages/api/src/platforms/vtex/clients/commerce/types/ByLinkId.ts`:
- Around line 1-46: Extract the repeated fields and associated JSDoc from
ByLinkIdCategoryResponse, ByLinkIdBrandResponse, and ByLinkIdCollectionResponse
into a shared base interface, then have each response interface extend it. Keep
each interface’s unique fields—such as id, fatherCategoryId, linkId, and
category-specific differences—defined locally, preserving the existing linkId
types and response contracts.
In `@packages/api/src/platforms/vtex/resolvers/collection.ts`:
- Around line 90-93: Extract a shared getSegmentSlugs(slug: string): string[]
helper for the cumulative segment-slug construction, then replace the duplicated
inline split/filter/map logic in the meta, breadcrumbList, and otherLocales
resolvers with calls to getSegmentSlugs(slug).
In `@packages/core/src/components/ui/LocalizationButton/LocalizationButton.tsx`:
- Around line 45-46: Update the LocalizationButton component to call
useLocalizedProduct() once, store its result, and derive both otherLocales and
urlSuffix from that shared value while preserving the existing fallback
behavior.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2535f4a9-2fcd-4981-8377-09e308ed32d6
⛔ Files ignored due to path filters (4)
packages/api/src/__generated__/schema.tsis excluded by!**/__generated__/**and included bypackages/**packages/api/test/integration/__snapshots__/queries.test.ts.snapis excluded by!**/*.snapand included bypackages/**packages/core/@generated/gql.tsis excluded by!**/@generated/**,!**/@generated/**and included bypackages/**packages/core/@generated/graphql.tsis excluded by!**/@generated/**,!**/@generated/**and included bypackages/**
📒 Files selected for processing (35)
packages/api/src/platforms/vtex/clients/catalog/index.tspackages/api/src/platforms/vtex/clients/commerce/index.tspackages/api/src/platforms/vtex/clients/commerce/types/ByLinkId.tspackages/api/src/platforms/vtex/clients/index.tspackages/api/src/platforms/vtex/clients/search/index.tspackages/api/src/platforms/vtex/index.tspackages/api/src/platforms/vtex/loaders/collection.tspackages/api/src/platforms/vtex/loaders/index.tspackages/api/src/platforms/vtex/resolvers/collection.tspackages/api/src/platforms/vtex/resolvers/product.tspackages/api/src/platforms/vtex/resolvers/query.tspackages/api/src/platforms/vtex/typeDefs/collection.graphqlpackages/api/src/platforms/vtex/typeDefs/product.graphqlpackages/api/src/platforms/vtex/utils/localization.tspackages/api/test/integration/queries.test.tspackages/api/test/mocks/AllCollectionsQuery.tspackages/api/test/mocks/CollectionQuery.tspackages/api/test/unit/platforms/vtex/clients/catalog.test.tspackages/api/test/unit/platforms/vtex/clients/commerce.test.tspackages/api/test/unit/platforms/vtex/clients/search.test.tspackages/api/test/unit/platforms/vtex/loaders/collection.test.tspackages/api/test/unit/platforms/vtex/resolvers/collection.test.tspackages/api/test/unit/platforms/vtex/resolvers/product.test.tspackages/api/test/unit/platforms/vtex/resolvers/query.test.tspackages/core/src/components/sections/EmptyState/EmptyState.tsxpackages/core/src/components/templates/ProductListingPage/ProductListingPage.tsxpackages/core/src/components/ui/Breadcrumb/Breadcrumb.tsxpackages/core/src/components/ui/LocalizationButton/LocalizationButton.tsxpackages/core/src/experimental/index.tspackages/core/src/pages/[...slug].tsxpackages/core/src/pages/[slug]/p.tsxpackages/core/src/sdk/localization/LocalizedProductContext.tsxpackages/core/src/sdk/localization/useBindingSelector.tspackages/core/src/server/index.tspackages/core/test/sdk/localization/useBindingSelector.test.tsx
💤 Files with no reviewable changes (1)
- packages/api/test/mocks/AllCollectionsQuery.ts
The by-linkid migration silently narrowed StoreCollection.type: `Cluster` and `SubCategory` are no longer reachable, because collection/by-linkid has no discriminator between clusters and curated collections, and category/by-linkid only exposes `fatherCategoryId` (root vs non-root, not tree depth). Mark both with @deprecated so introspection and generated types surface the change instead of advertising values the resolver can never produce. Removing them is a breaking change, tracked in SFS-3291. Co-authored-by: Cursor <[email protected]>

Localized Slugs Links Feature
PDP localized slugs feat(core): localized product URLs, breadcrumbs and hreflang for PDP #3352
PLP localized slugs feat: replace pagetype with by-linkid cascade + localized PLP/collection pages #3401
Behavioral changes
Retiring
pagetypeon the collection path in favor of the typedby-linkidcascade changes two observable behaviors. Neither is a schema change — no query breaks — but both are worth calling out for stores that rely on them.1.
StoreCollection.typeno longer returnsClusterorSubCategory.The old resolver passed the Catalog
pageTypestring through verbatim, so it could return any of six values. The new resolution infers the entity type from whichby-linkidendpoint answered, which yields three buckets (category / brand / collection), refined to four byfatherCategoryId:Collection. Clusters and curated collections are both served bycollection/by-linkid, and its response carries no discriminator between them.Category. The category response exposes onlyfatherCategoryId, which distinguishes root from non-root but not tree depth. RecoveringSubCategorywould require an extra parent lookup on the PLP hot path.Both enum values remain declared for backward compatibility and their descriptions now document that they are no longer returned. Nothing in
@faststore/coreselects or branches ontype, so only stores that explicitly querycollection { type }are affected — and they fail silently (a conditional stops matching) rather than erroring. Enum cleanup is tracked for the next major in SFS-3291.2. Slugs that exhaust the cascade now return 404 instead of falling back to full-text search.
pagetypeimplicitly promoted unmatched single-segment slugs to a full-text search. The cascade returnsNotFoundErrorwhen category, brand and collection all miss. This is a deliberate deferral (spec Decision 3) and can be revisited behind an explicit flag.Summary by CodeRabbit
hreflangalternate links).otherLocalesfor product and collection GraphQL responses, surfaced through new localized product page/PLP context.