Repository navigation
Fix stock refresh and held-basket resume after pagination - #1237
Merged
Merged
Conversation
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
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.
Sales stock tiles stopped refreshing after the catalogue pagination change removed the loader used by extension checkout. Cash sales and stock adjustments reached the server, but the tiles kept their old quantities; resuming a held basket also depended on that removed loader.
Refresh visible products and saved basket products through targeted item reads with bounded concurrency. Ignore stale refresh results after a newer request or branch change, retain the current cart, update variant choices, and show a retryable error when stock cannot be read. Also includes the expiry/low-stock pagination fixes from #1236 so unavailable navigation controls are hidden.
Validation: 18 local core regression tests and attribution check passed; frontend production build passed. Staging UI cash, card and adjustment tests each changed stock from 10 to 9, confirmed against the database. Holding kept stock at 10, resume restored the correct product/quantity, and manual refresh preserved the cart. The 17 extension workflow tests passed, including adjustment deletion without double deduction.