feat(point-of-sale): add resolution target types for cart and payment validations - #4641
Merged
Conversation
… validations Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
Contributor
Author
|
/snapit |
Contributor
|
🫰✨ Thanks @vctrchu! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260820182142",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260820182142" |
henryStelle
approved these changes
Aug 20, 2026
…gets Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
…rget convention Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
…xpress Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
…s too Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
…on targets Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
…a DOM Event Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
Contributor
Author
|
/snapit |
Contributor
|
🫰✨ Thanks @vctrchu! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260820185458",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260820185458" |
Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
Contributor
Author
|
/snapit |
Contributor
|
🫰✨ Thanks @vctrchu! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260820191219",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260820191219" |
2 tasks
akhayoon
approved these changes
Aug 20, 2026
aaronschubert0
approved these changes
Aug 21, 2026
Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
… framing Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
…dation obligations Assisted-By: devx/c380b28c-ab53-4c64-a5d7-b1e4b72559e9
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.
Resolves https://github.com/shop/issues-retail/issues/33801
Background
POS intercept extensions (
shopify.intercept('cartvalidations' | 'paymentvalidations', ...)) block a workflow by returning anERROR-levelvalidationAdd. When that happens, POS opens an app-owned remediation UI inside its resolution flow. Each interceptable event gets its own dedicated resolution render target so the public types can express per-event API availability.This adds the TypeScript contracts for those targets. Everything lands
@private, matching the rest of the intercept type family, until early access.Solution
Two new render targets in
RenderExtensionTargets:pos.cart.validations.resolution.render— Standard APIs + Scanner + mutating Cart +ResolutionApi<CartValidationsEvent>pos.payment.validations.resolution.render— Standard APIs + Scanner + read-only Cart +ResolutionApi<PaymentValidationsEvent>The cart is frozen during payment, so the payment target reuses
ReadonlyCartApi; the cart target mutates via the existingCartApi. Neither target exposes the Action API (resolution is host-invoked, not merchant-invoked) or domain-scoped APIs.New supporting types:
ResolutionApi<TEventData>— target-scopedshopify.resolution.eventsignal carrying the intercepted event's data (CartValidationsEventData,PaymentValidationsEventData— the same fields the interceptor sees, without the DOMEventbase), typed per event rather than as one broad union.ResolutionComponents— all standard components exceptPage,POSBlock/PosBlock, andTile, since resolution UI renders inside a POS-owned flow step.The tester's
PosMockFactorymap is exhaustively keyed over all POS targets, so mock factories for both new targets are included, with tests covering the mutating/read-only cart split and the resolution event shape.🎩
yarn build,yarn test(64 tests incl. 6 new inpos-resolution-targets.test.ts), eslint + prettier on touched files — all greenChecklist