Skip to content

Add Universal Checkout Web event consumer - #840

Draft
tiagocandido wants to merge 1 commit into
uc-web-foundationfrom
uc-web-events
Draft

tiagocandido wants to merge 1 commit into
uc-web-foundationfrom
uc-web-events

Conversation

@tiagocandido

@tiagocandido tiagocandido commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

What changes are you making?

Add the experimental @shopify/checkout-kit/universal entry point and <shopify-universal-checkout> element. It handles per-shop ready requests and batched start/update/complete/error messages while exposing protocol-neutral lifecycle events, immutable per-shop snapshots and an aggregate committed before listeners run.

Malformed members are isolated from valid siblings, with safe field-path diagnostics and decode telemetry. Revision/session ordering, partial completion, explicit terminal events and presentation close are tracked separately. Error events stay on the element instead of reaching global error handlers. The standard entry point does not register the Universal element.

Reuse the standard checkout error mapper so errors retain their code and message when severity is omitted. Duplicate resource errors advance revision ordering without redispatching events or recounting telemetry. Preserve native and custom DOM listener overloads alongside typed lifecycle listeners; close events expose null detail. Regression coverage exercises each behavior.

This remains a draft: real producer error behavior, startup gaps and resource retry/replacement/ejection semantics still need agreement or live validation. The API is explicitly experimental.

How to test

Run dev web check, dev protocol test typescript, dev telemetry test typescript, and dev web snapshot compare. The full stack passes 440 Web, 88 protocol and 14 telemetry tests, with lint/typechecks, builds, package verification and the package snapshot check. Synthetic fixtures cover ready batches, changed-shop updates, partial/full completion, malformed siblings, terminal boundaries, scoped errors and immutability.

tophat results

An earlier integrated browser run received start and update events for two shops, reached a ready-for-complete state for one shop, and verified close/reopen with fresh events. No payment was submitted; live completion and producer errors remain unverified. The public-base revision is separately covered by the local checks above.

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Sep 28, 2026
@tiagocandido
tiagocandido added this pull request to stack #845 September 28, 2026 15:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant