Feat/zipcode soft refresh query allowlist#760
Conversation
…clear Co-authored-by: Cursor <cursoragent@cursor.com>
…clear When vtex.delivery-promise-components clears the `page` query param through render-runtime after a location change, the useFetchMore reducer was left on the stale page. A shopper on page 5 would see page-1 results but the next "load more" fetched page 6. Detect the external transition (`runtimeQuery.page` going absent/1 while the reducer is past page 1) and dispatch RESET so the next "load more" correctly fetches page 2. Shopper- driven "load more"/"fetch previous" and initial mount are unaffected. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
With enableLazySearchQuery on and maxItemsPerPage > 18, SearchQuery fetches the first 18 items and lazily loads items 18..N-1 once. An external refetch (vtex.delivery-promise-components location change) resets the Apollo cache to the initial 18-item window, but lazyItemsRemaining was already consumed at mount — items 18..N-1 would never be fetched again, leaving a permanent gap before the next "load more" page. The new useLazyItemsRearm hook detects the cached list shrinking back to (or below) the initial window while on the first page and resets lazyItemsRemaining, re-triggering the existing 500ms lazy-refill effect. Guards prevent false positives on initial mount, list growth, empty lists, and pages past the first. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
|
Beep boop 🤖 I noticed you didn't make any changes at the
In order to keep track, I'll create an issue if you decide now is not a good time
|
chrsmutti
left a comment
There was a problem hiding this comment.
I'm not very familiar with the lazyItems stuff, but it looks right! Just have a nitpick on the Changelog.
…efresh-query-allowlist Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # CHANGELOG.md
|
Your PR has been merged! App is being published. 🚀 After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:
After that your app will be updated on all accounts. For more information on the deployment process check the docs. 📖 |
What problem is this solving?
How to test it?
[Workspace](Link goes here!)
Screenshots or example usage:
Describe alternatives you've considered, if any.
Related to / Depends on
How does this PR make you feel? 🔗
