Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
a0b5f17
feat: faststore's default image loader (#3082)
lariciamota Oct 30, 2025
58b2c3d
chore: update release scripts for dev and main publishes (#3088)
matheusps Oct 30, 2025
9e5a64d
fix: add background color to TextareaField label (#3079)
lemagnetic Oct 30, 2025
270588f
fix: remove purchaseAgentId filter - SFS-2942 (#3085)
eduardoformiga Oct 30, 2025
cc383c2
[no ci] Release: 3.91.3-dev.0
Oct 30, 2025
8426a50
[EXPERIMENTAL] feat: FastStore's scroll restoration (#3068)
lucasfp13 Oct 30, 2025
065cbda
[no ci] Release: 3.91.3-dev.1
Oct 30, 2025
b513c55
chore: release (#3096)
matheusps Nov 3, 2025
9ee7e58
[no ci] Release: 3.92.1-dev.0
Nov 3, 2025
e293857
feat: Add RTL Support (#3097)
matheusps Nov 3, 2025
416e688
[no ci] Release: 3.93.0-dev.0
Nov 3, 2025
ff808f5
Merge branch 'main' into dev
matheusps Nov 4, 2025
7323d8a
fix: Handle empty footer logo scenario (#3094)
lucasfp13 Nov 6, 2025
e61f33d
[no ci] Release: 3.93.0-dev.1
Nov 6, 2025
c491593
fix(ui): update slider variable for border-radius in the mozilla rule…
llfalcao Nov 7, 2025
e6e3c7e
[no ci] Release: 3.93.0-dev.2
Nov 7, 2025
c4c3f6a
feat: add filter and selected tag for pending my approval (#3001) (#3…
lucasfp13 Nov 11, 2025
951bfc3
fix: validateSession error when isSessionReady is sent - SFS-2944 (#3…
eduardoformiga Nov 13, 2025
3d19d61
Trigger build
eduardoformiga Nov 13, 2025
fde7eb6
fix: build among diff modules (#3119)
eduardoformiga Nov 17, 2025
85cd1c0
[no ci] Release: 3.93.0-dev.3
Nov 17, 2025
1acb303
fix: Show skeleton when product price is validating (#3112)
lucasfp13 Nov 17, 2025
7d84a6a
[no ci] Release: 3.93.0-dev.4
Nov 17, 2025
723368a
Merge branch 'main' into dev
eduardoformiga Nov 19, 2025
451e291
[no ci] Release: 3.94.1-dev.0
Nov 19, 2025
15aca77
feat: Add svg extension to public folder copy's allow list (#3123)
lariciamota Nov 20, 2025
049e62f
[no ci] Release: 3.95.0-dev.0
Nov 20, 2025
b5cfb55
fix: Consider the session when finding orderForm changes (#3091)
sahanljc Nov 25, 2025
73fb9ed
fix: Update search results description formatting (#3128)
eduardoformiga Nov 26, 2025
c8cbb52
fix: Update `validateCart` mutation tests (#3132)
eduardoformiga Dec 1, 2025
d64b7f6
fix: remove unnecessary fields from session in validateSession functi…
eduardoformiga Dec 1, 2025
6962ca8
[no ci] Release: 3.95.0-dev.1
Dec 1, 2025
8b22a22
Merge branch 'main' into dev
eduardoformiga Dec 2, 2025
34263a4
[no ci] Release: 3.95.0-dev.3
Dec 2, 2025
56ef591
Merge branch 'main' into dev
eduardoformiga Dec 2, 2025
4088c3d
[no ci] Release: 3.95.1-dev.0
Dec 2, 2025
d1b3869
feat: adds `priceTags` as tax - SFS-2970 (#3144)
eduardoformiga Dec 10, 2025
f0d5940
[no ci] Release: 3.96.0-dev.0
Dec 10, 2025
3d5de93
chore: add content platform cms schemas - CP-860 (#3071)
mateuspontes Dec 16, 2025
7350dc8
[no ci] Release: 3.96.0-dev.1
Dec 16, 2025
862ea50
fix: adds cache busting to bypass cache when logged in/out. (#3152)
eduardoformiga Dec 18, 2025
a6608ce
[no ci] Release: 3.96.0-dev.2
Dec 18, 2025
5cff7d7
chore: add publishConfig to package.json for public access
eduardoformiga Dec 22, 2025
c1c0cb5
[no ci] Release: 3.96.0-dev.3
Dec 22, 2025
4247f92
fix: update release workflow to handle both main and dev branches (#3…
eduardoformiga Dec 23, 2025
cec6905
[no ci] Release: 3.96.0-dev.4
Dec 23, 2025
28b6ec0
feat: Trigger build
eduardoformiga Dec 23, 2025
1a43d32
chore: triger CI with changes
eduardoformiga Dec 23, 2025
b576e12
[no ci] Release: 3.96.0-dev.5
Dec 23, 2025
c1aa9b8
chore: upgrade npm for OIDC support in release workflow
eduardoformiga Dec 23, 2025
7ec5f64
chore: reorder npm upgrade step in release workflow for OIDC support
eduardoformiga Dec 23, 2025
29ae7d4
chore: update Node.js version to 20 in release workflow
eduardoformiga Dec 23, 2025
3088080
[no ci] Release: 3.96.0-dev.6
Dec 23, 2025
0d6903c
chore: update Node.js version to 22 in release workflow
eduardoformiga Dec 23, 2025
b03968c
fix: correct comment for platform specific API configuration in disco…
eduardoformiga Dec 23, 2025
e2df329
[no ci] Release: 3.96.0-dev.7
Dec 23, 2025
aa6e3d9
chore: update repository field in package.json files to include type …
eduardoformiga Dec 23, 2025
79d0c0a
[no ci] Release: 3.96.0-dev.8
Dec 23, 2025
7ec1d4d
chore: update repository URLs in package.json files to remove trailin…
eduardoformiga Dec 23, 2025
46e5653
[no ci] Release: 3.96.0-dev.9
Dec 23, 2025
3092ccd
chore: update pnpm version to 10.26.2 in release workflow
eduardoformiga Dec 23, 2025
7f5c9bd
chore: upgrade pnpm version to 10.26.2 in package.json and CI workflow
eduardoformiga Dec 23, 2025
fc0af94
[no ci] Release: 3.96.0-dev.10
Dec 23, 2025
4874471
chore: add NODE_AUTH_TOKEN environment variable to release commands i…
eduardoformiga Dec 23, 2025
0fea6fa
fix: correct comment for platform specific config in discovery config…
eduardoformiga Dec 23, 2025
9f17f33
[no ci] Release: 3.96.0-dev.11
Dec 23, 2025
cd93499
chore: upgrade GitHub Actions to use checkout@v6 and setup-node@v6
eduardoformiga Dec 23, 2025
9969176
[no ci] Release: 3.96.0-dev.12
Dec 23, 2025
98df725
chore: remove preinstall script from package.json and correct comment…
eduardoformiga Dec 23, 2025
fa7e01f
[no ci] Release: 3.96.0-dev.13
Dec 23, 2025
f230805
chore: update Node.js version to 24 in release workflow and refine co…
eduardoformiga Dec 23, 2025
84cf703
[no ci] Release: 3.96.0-dev.14
Dec 23, 2025
d3daae2
chore: remove NODE_AUTH_TOKEN from release commands in workflow and u…
eduardoformiga Dec 23, 2025
488b254
[no ci] Release: 3.96.0-dev.15
Dec 23, 2025
fd3a278
chore: add publishConfig with public access to package.json files acr…
eduardoformiga Dec 23, 2025
015729b
[no ci] Release: 3.96.0-dev.16
Dec 23, 2025
eec84b4
chore: update lerna configuration and dependencies, enhance GitHub Ac…
eduardoformiga Dec 23, 2025
a322f88
chore: remove npm authentication verification step from release workf…
eduardoformiga Dec 23, 2025
303ea1a
[no ci] Release: 3.96.0-dev.17
Dec 23, 2025
d96d7d3
chore: downgrade pnpm version to 9.15.5 in package.json and CI workfl…
eduardoformiga Dec 24, 2025
9bf2cea
chore: update Node.js version to 20 in CI and release workflows, and …
eduardoformiga Dec 24, 2025
9542c22
[no ci] Release: 3.96.0-dev.18
Dec 24, 2025
1fbacc3
feat: logout clear storage (#3163)
eduardoformiga Jan 8, 2026
f0c3863
[no ci] Release: 3.96.0-dev.19
Jan 8, 2026
41b9878
fix: Add slug field to landing page schema - CROC-185 (#3166)
mateuspontes Jan 8, 2026
ac463e8
[no ci] Release: 3.96.0-dev.20
Jan 8, 2026
997252e
fix: Prevent Partytown cross-origin errors in iframe environments (#3…
mmartinsoliv Jan 8, 2026
c71b031
[no ci] Release: 3.96.0-dev.21
Jan 8, 2026
5c81e96
chore: Create .coderabbit.yaml (#3172)
renatomaurovtex Jan 15, 2026
f3f69bc
fix: Clear cart (get new orderForm) if there is no checkout cookie pr…
eduardoformiga Jan 21, 2026
c504ae5
Merge branch 'main' into release/version-2026-21-1144
eduardoformiga Jan 21, 2026
c31c307
chore: Update CHANGELOG for version 3.96.0-dev.21 release
eduardoformiga Jan 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@

language: "en-US"

# Customize tone so CodeRabbit reviews with clear guidelines for FastStore
tone_instructions: >
Review FastStore PRs focusing on performance, SEO, accessibility, and TypeScript safety. Be concise and actionable.

early_access: false
enable_free_tier: true

reviews:
auto_review:
enabled: true
base_branches:
- "dev"
- ".*"
# Review tone (chill vs assertive)
profile: "chill"

# Provide a high level summary of PR changes
high_level_summary: true

# Optional: include extra review behaviours
request_changes_workflow: false
high_level_summary_in_walkthrough: false
auto_title_placeholder: "@coderabbitai"

# Helpful flags
review_status: true
commit_status: false
collapse_walkthrough: false
changed_files_summary: true

# Path filters to exclude things like output, generated files, and build folders
path_filters:
- "packages/**"
- "!**/dist/**"
- "!**/.next/**"
- "!**/node_modules/**"
- "!**/@generated/**"
- "!**/storybook-static/**"
- "src/**"
- "apps/**"
- "!dist/**"
- "!.next/**"
- "!node_modules/**"

# Optional path specific instructions (useful for FastStore code patterns)
path_instructions:
- path: "packages/**/src/components/**"
instructions: |
Component code:
- Ensure React hooks follow rules of hooks (no conditional hooks, proper dependencies)
- Check rendering performance (avoid heavy operations on render, use memo/useMemo/useCallback when appropriate)
- Favor lazy loading for large components using dynamic imports
- Use semantic HTML and proper ARIA labels for accessibility
- Ensure components are properly typed with TypeScript

- path: "packages/core/src/pages/**"
instructions: |
Page-level code (Model in MVC - data fetching):
- Ensure correct use of Next.js conventions (getStaticProps, getServerSideProps, File System Routing)
- Validate SEO-related tags (meta tags, structured data, Open Graph)
- Performance implications: static generation vs SSR vs ISR
- Proper error handling (404, 500 pages)
- Static data fetching should happen here, dynamic enrichment in components

- path: "packages/**/src/sdk/**"
instructions: |
SDK code:
- Custom hooks should follow React hooks conventions
- GraphQL queries should be optimized (avoid over-fetching, use fragments)
- Business logic should be separated from UI concerns

- path: "packages/api/src/**"
instructions: |
GraphQL API code:
- TypeDefs should follow GraphQL best practices
- Resolvers should be platform-agnostic when possible
- Proper error handling and validation
- Consider performance implications of resolvers
- Type safety with generated types

- path: "packages/**/*.ts"
instructions: |
TypeScript files:
- Ensure type safety and avoid type assertions when possible
- Consider bundle size impact of dependencies

chat:
auto_reply: true
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

- version 20251223 ([#3161](https://github.com/vtex/faststore/issues/3161)) ([ad5e8d1](https://github.com/vtex/faststore/commit/ad5e8d12fe45f1fb8e1134165172bf1c6b2a91e2))

# [3.96.0-dev.21](https://github.com/vtex/faststore/compare/v3.96.0-dev.20...v3.96.0-dev.21) (2026-01-08)

### Bug Fixes

- Prevent Partytown cross-origin errors in iframe environments ([#3155](https://github.com/vtex/faststore/issues/3155)) ([997252e](https://github.com/vtex/faststore/commit/997252e9a18807f4c26c350197d4f2d139de58f8))

# [3.96.0-dev.20](https://github.com/vtex/faststore/compare/v3.96.0-dev.19...v3.96.0-dev.20) (2026-01-08)

### Bug Fixes

- Add slug field to landing page schema - CROC-185 ([#3166](https://github.com/vtex/faststore/issues/3166)) ([41b9878](https://github.com/vtex/faststore/commit/41b987825ee5ebb7d311eef33e2ca65034dc130d))

# [3.96.0-dev.19](https://github.com/vtex/faststore/compare/v3.96.0-dev.18...v3.96.0-dev.19) (2026-01-08)

### Features

- logout clear storage ([#3163](https://github.com/vtex/faststore/issues/3163)) ([1fbacc3](https://github.com/vtex/faststore/commit/1fbacc3b3e32b4f83a2f56c1f97eb0f8ff843f61))

# 3.96.0-dev.18 (2025-12-24)

**Note:** Version bump only for package faststore
Expand Down
15 changes: 8 additions & 7 deletions packages/api/src/platforms/vtex/clients/commerce/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,26 +224,27 @@ export const VtexCommerce = (
refreshOutdatedData = true,
channel = ctx.storage.channel,
}: {
id: string
id?: string
refreshOutdatedData?: boolean
channel?: Required<Channel>
}): Promise<OrderForm> => {
const { salesChannel } = channel
const params = new URLSearchParams({
refreshOutdatedData: refreshOutdatedData.toString(),
sc: salesChannel,
})

const headers: HeadersInit = withCookie({
'content-type': 'application/json',
'X-FORWARDED-HOST': forwardedHost,
})
const params = new URLSearchParams({ sc: salesChannel })
if (id) {
params.set('refreshOutdatedData', refreshOutdatedData.toString())
}
const url = `${base}/api/checkout/pub/orderForm${id ? `/${id}` : ''}?${params.toString()}`

return fetchAPI(
`${base}/api/checkout/pub/orderForm/${id}?${params.toString()}`,
url,
{
...BASE_INIT,
headers,
...(id ? {} : { body: '{}' }),
},
{ storeCookies }
)
Expand Down
19 changes: 7 additions & 12 deletions packages/api/src/platforms/vtex/resolvers/validateCart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,6 @@ const isOrderFormStale = (form: OrderForm, sessionJwt: SessionJwt) => {
return newEtag !== oldEtag
}

// Returns the regionalized orderForm
const getOrderForm = async (id: string, { clients: { commerce } }: Context) => {
return commerce.checkout.orderForm({
id,
})
}

const clearOrderFormMessages = async (
id: string,
{ clients: { commerce } }: Context
Expand Down Expand Up @@ -360,10 +353,6 @@ export const validateCart = async (
ctx.headers.cookie,
'checkout.vtex.com'
)
const orderNumber =
orderFormIdFromCookie !== '' ? orderFormIdFromCookie : order?.orderNumber

const { acceptedOffer, shouldSplitItem } = order
const {
clients: { commerce },
loaders: { skuLoader },
Expand All @@ -381,7 +370,11 @@ export const validateCart = async (
}

// Step1: Get OrderForm from VTEX Commerce
const orderForm = await getOrderForm(orderNumber, ctx)
const orderForm = await commerce.checkout.orderForm({
id: orderFormIdFromCookie || undefined,
channel: ctx.storage.channel,
})
const orderNumber = orderForm.orderFormId

// Clear messages so it doesn't keep populating toasts on a loop
// In the next validateCart mutation it will only have messages if a new message is created on orderForm
Expand All @@ -392,6 +385,8 @@ export const validateCart = async (
const sessionCookie = parse(ctx?.headers?.cookie ?? '')?.vtex_session
const sessionJwt = parseJwt(sessionCookie)

const { acceptedOffer, shouldSplitItem } = order

// Step1.5: Check if another system changed the orderForm with this orderNumber
// If so, this means the user interacted with this cart elsewhere and expects
// to see this new cart state instead of what's stored on the user's browser.
Expand Down
7 changes: 6 additions & 1 deletion packages/api/test/integration/mutations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,19 @@ const createRunner = () => {
return async (query: string, variables?: any) => {
const schema = await schemaPromise
const context = contextFactory({})
const orderFormCookie =
'checkout.vtex.com=__ofid=edbe3b03c8c94827a37ec5a6a4648fd2'

return execute(
schema,
parse(query),
null,
{
...context,
headers: { 'content-type': 'application/json', cookie: '' },
headers: {
'content-type': 'application/json',
cookie: orderFormCookie,
},
},
variables
)
Expand Down
8 changes: 4 additions & 4 deletions packages/api/test/mocks/ValidateCartMutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export const InvalidCart = {
// Valid Cart

export const checkoutOrderFormValidFetch = {
info: 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2?refreshOutdatedData=true&sc=1',
info: 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2?sc=1&refreshOutdatedData=true',
init: {
method: 'POST',
headers: { 'content-type': 'application/json', 'X-FORWARDED-HOST': '' },
Expand All @@ -288,7 +288,7 @@ export const checkoutOrderFormCustomDataValidFetch = {
// "Invalid" Cart

export const checkoutOrderFormInvalidFetch = {
info: 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2?refreshOutdatedData=true&sc=1',
info: 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2?sc=1&refreshOutdatedData=true',
init: {
method: 'POST',
headers: { 'content-type': 'application/json', 'X-FORWARDED-HOST': '' },
Expand All @@ -300,7 +300,7 @@ export const checkoutOrderFormInvalidFetch = {
}

export const checkoutOrderFormItemsInvalidFetch = {
info: 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2/items?allowOutdatedData=paymentData&sc=1',
info: 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2/items?sc=1&allowOutdatedData=paymentData',
init: {
method: 'PATCH',
headers: {
Expand Down Expand Up @@ -531,7 +531,7 @@ export const productSearchPage1Count1Fetch = {

// Stale Cart
export const checkoutOrderFormStaleFetch = {
info: 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2?refreshOutdatedData=true&sc=1',
info: 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2?sc=1&refreshOutdatedData=true',
init: {
method: 'POST',
headers: { 'content-type': 'application/json', 'X-FORWARDED-HOST': '' },
Expand Down
12 changes: 12 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

- version 20251223 ([#3161](https://github.com/vtex/faststore/issues/3161)) ([ad5e8d1](https://github.com/vtex/faststore/commit/ad5e8d12fe45f1fb8e1134165172bf1c6b2a91e2))

# [3.96.0-dev.21](https://github.com/vtex/faststore/compare/v3.96.0-dev.20...v3.96.0-dev.21) (2026-01-08)

**Note:** Version bump only for package @faststore/cli

# [3.96.0-dev.20](https://github.com/vtex/faststore/compare/v3.96.0-dev.19...v3.96.0-dev.20) (2026-01-08)

**Note:** Version bump only for package @faststore/cli

# [3.96.0-dev.19](https://github.com/vtex/faststore/compare/v3.96.0-dev.18...v3.96.0-dev.19) (2026-01-08)

**Note:** Version bump only for package @faststore/cli

# 3.96.0-dev.18 (2025-12-24)

**Note:** Version bump only for package @faststore/cli
Expand Down
22 changes: 14 additions & 8 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ npm install -g @faststore/cli
```

<!-- usage -->

```sh-session
$ npm install -g @faststore/cli
$ faststore COMMAND
Expand All @@ -36,19 +37,23 @@ USAGE
$ faststore COMMAND
...
```

<!-- usagestop -->

## Commands

<!-- commands -->
* [`faststore build [ACCOUNT] [PATH]`](#faststore-build-account-path)
* [`faststore cms-sync [PATH]`](#faststore-cms-sync-path)
* [`faststore create [PATH]`](#faststore-create-path)
* [`faststore dev [ACCOUNT] [PATH] [PORT]`](#faststore-dev-account-path-port)
* [`faststore generate-graphql [PATH]`](#faststore-generate-graphql-path)
* [`faststore help [COMMAND]`](#faststore-help-command)
* [`faststore start [ACCOUNT] [PATH] [PORT]`](#faststore-start-account-path-port)
* [`faststore test [PATH]`](#faststore-test-path)

- [Installation](#installation)
- [Commands](#commands)
- [`faststore build [ACCOUNT] [PATH]`](#faststore-build-account-path)
- [`faststore cms-sync [PATH]`](#faststore-cms-sync-path)
- [`faststore create [PATH]`](#faststore-create-path)
- [`faststore dev [ACCOUNT] [PATH] [PORT]`](#faststore-dev-account-path-port)
- [`faststore generate-graphql [PATH]`](#faststore-generate-graphql-path)
- [`faststore help [COMMAND]`](#faststore-help-command)
- [`faststore start [ACCOUNT] [PATH] [PORT]`](#faststore-start-account-path-port)
- [`faststore test [PATH]`](#faststore-test-path)

## `faststore build [ACCOUNT] [PATH]`

Expand Down Expand Up @@ -176,4 +181,5 @@ ARGUMENTS
```

_See code: [dist/commands/test.js](https://github.com/vtex/faststore/blob/v3.96.2/dist/commands/test.js)_

<!-- commandsstop -->
18 changes: 18 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

- version 20251223 ([#3161](https://github.com/vtex/faststore/issues/3161)) ([ad5e8d1](https://github.com/vtex/faststore/commit/ad5e8d12fe45f1fb8e1134165172bf1c6b2a91e2))

# [3.96.0-dev.21](https://github.com/vtex/faststore/compare/v3.96.0-dev.20...v3.96.0-dev.21) (2026-01-08)

### Bug Fixes

- Prevent Partytown cross-origin errors in iframe environments ([#3155](https://github.com/vtex/faststore/issues/3155)) ([997252e](https://github.com/vtex/faststore/commit/997252e9a18807f4c26c350197d4f2d139de58f8))

# [3.96.0-dev.20](https://github.com/vtex/faststore/compare/v3.96.0-dev.19...v3.96.0-dev.20) (2026-01-08)

### Bug Fixes

- Add slug field to landing page schema - CROC-185 ([#3166](https://github.com/vtex/faststore/issues/3166)) ([41b9878](https://github.com/vtex/faststore/commit/41b987825ee5ebb7d311eef33e2ca65034dc130d))

# [3.96.0-dev.19](https://github.com/vtex/faststore/compare/v3.96.0-dev.18...v3.96.0-dev.19) (2026-01-08)

### Features

- logout clear storage ([#3163](https://github.com/vtex/faststore/issues/3163)) ([1fbacc3](https://github.com/vtex/faststore/commit/1fbacc3b3e32b4f83a2f56c1f97eb0f8ff843f61))

# 3.96.0-dev.18 (2025-12-24)

**Note:** Version bump only for package @faststore/core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"type": "object",
"title": "Landing Page",
"properties": {
"slug": {
"widget": {
"ui:widget": "slug"
},
"type": "string"
},
"seo": {
"title": "SEO",
"description": "Search Engine Optimization options",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ function ThirdPartyScripts() {
{includeGTM && <GoogleTagManager containerId={gtmContainerId} />}
{includeVTEX && <VTEX />}
<OverrideComponents.ThirdPartyScripts />
<Partytown key="partytown" />
{/* Only render Partytown when not in an iframe to prevent cross-origin errors. */}
{typeof window !== 'undefined' && window.self === window.top && (
<Partytown key="partytown" />
)}
Comment on lines +40 to +43
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Potential hydration mismatch with window check in JSX.

The typeof window !== 'undefined' check evaluates differently between SSR (false) and client hydration (true), causing a hydration mismatch. During SSR, Partytown won't be included in the HTML, but React will try to render it during hydration.

Consider using a useEffect with state to handle the iframe detection client-side only:

🔧 Suggested fix
+import { useState, useEffect } from 'react'
+
 function ThirdPartyScripts() {
   const forwards = []
   if (includeVTEX) forwards.push('sendrc')
+  
+  const [shouldRenderPartytown, setShouldRenderPartytown] = useState(true)
+  
+  useEffect(() => {
+    // Disable Partytown in iframe contexts to prevent cross-origin errors
+    if (window.self !== window.top) {
+      setShouldRenderPartytown(false)
+    }
+  }, [])

   return (
     <>
       {/* ... existing code ... */}
-      {/* Only render Partytown when not in an iframe to prevent cross-origin errors. */}
-      {typeof window !== 'undefined' && window.self === window.top && (
-        <Partytown key="partytown" />
-      )}
+      {shouldRenderPartytown && <Partytown key="partytown" />}
     </>
   )
 }
🤖 Prompt for AI Agents
In `@packages/core/src/components/ThirdPartyScripts/ThirdPartyScripts.tsx` around
lines 40 - 43, The current conditional render in ThirdPartyScripts.tsx uses
typeof window !== 'undefined' && window.self === window.top which differs
between SSR and client and causes hydration mismatch; update the
ThirdPartyScripts component to perform the iframe/top check only on the client
by introducing local state (e.g., isTopWindow) and setting it inside a useEffect
that runs on mount, then render <Partytown /> only when that state is true;
reference the ThirdPartyScripts component, the Partytown JSX element, and
useEffect/state to locate and modify the code.

</>
)
}
Expand Down
Loading
Loading