Repository navigation
fix: Consider the session when finding orderForm changes - #3091
Merged
Merged
Conversation
|
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. |
sahanljc
marked this pull request as ready for review
November 3, 2025 13:19
sahanljc
requested review from
lemagnetic and
renatomaurovtex
and removed request for
a team
November 3, 2025 13:19
Contributor
Author
|
@lemagnetic Hi, would you be able to review this PR and provide your feedback please? Thanks. |
* dev: fix: validateSession error when isSessionReady is sent - SFS-2944 (vtex#3115)
Contributor
Author
|
@eduardoformiga I see that the work related to #3001, #3101 has caused GraphQL build errors in the main DEV branch. Do we know how to fix that? |
* dev: Trigger build
* dev: [no ci] Release: 3.94.1-dev.0 [no ci] Release: 3.94.0 feat: update version to 3.93.0-dev.4 and clean up changelogs (vtex#3127) feat: release version 20251119 17 05 (vtex#3126) feat: Trigger build [no ci] Release: 3.93.0 Trigger build feat: release version 20251118 (vtex#3121) [no ci] Release: 3.93.0 feat: RTL (vtex#3098)
* dev: [no ci] Release: 3.95.0-dev.0 feat: Add svg extension to public folder copy's allow list (vtex#3123)
eduardoformiga
approved these changes
Nov 25, 2025
sahanljc
added a commit
to clouda-inc/faststore
that referenced
this pull request
Nov 25, 2025
* dev: fix: Consider the session when finding orderForm changes (vtex#3091)
thiagopereira-vtex
pushed a commit
that referenced
this pull request
Jan 8, 2026
## What's the purpose of this pull request? This PR considers the session when deducing the changes to the orderForm done externally. ## What it aims to solve The current FastStore shows a competing nature when dealing with the same cart on two different devices (E.g. 2 browsers, Chrome and Firefox). ### How to reproduce the problem - Open your store in Chrome and Firefox - Make note of the checkout.vtex.com cookie value of Chrome and view the content of the orderForm using a client like Postman - Paste the value of the cookie to the checkout cookie of Firefox - Now you should have the same orderForm in Chrome, Firefox and Postman - Add an item to the cart from Chrome - Without going to Firefox, verify that the item is present in the orderForm using Postman - Now go to Firefox, but you will not see the item (Expected: the item should be present in the cart, Actual: the browser cart in Firefox will override the items of the real orderForm object) - Open Postman, and you will notice that the item is not present in the orderForm - Now go back to Chrome, and it will add back the item to the orderForm - Open Postman, and you will notice that the item is present in the orderForm ## How it works? We include the session ID to the MD5 hash, so that when the store is used in a different browser with the same orderForm, the two hashes are different. The two browsers should respect the changes performed by each other. ## How to test it? - First verify that the existing behavior of the mutation `validateCart` is as expected. - Follow the steps under **How to reproduce the problem**, and verify that the expected behavior is observed. ### Starters Deploy Preview <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> ## References <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> ## Checklist <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) 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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What's the purpose of this pull request?
This PR considers the session when deducing the changes to the orderForm done externally.
What it aims to solve
The current FastStore shows a competing nature when dealing with the same cart on two different devices (E.g. 2 browsers, Chrome and Firefox).
How to reproduce the problem
How it works?
We include the session ID to the MD5 hash, so that when the store is used in a different browser with the same orderForm, the two hashes are different. The two browsers should respect the changes performed by each other.
How to test it?
validateCartis as expected.Starters Deploy Preview
References
Checklist
You may erase this after checking them all 😉
PR Title and Commit Messages
feat,fix,chore,docs,style,refactor,ciandtestPR Description
breaking change,bug,contributing,performance,documentation..Dependencies
pnpm-lock.yamlfile when there were changes to the packagesDocumentation
@Mariana-Caetanoto review and update (Or submit a doc request)