Skip to content

Add protocol-agnostic checkout events for web - #766

Merged
markmur merged 8 commits into
protocol-agnostic-events-androidfrom
protocol-agnostic-events-web
Sep 25, 2026
Merged

markmur merged 8 commits into
protocol-agnostic-events-androidfrom
protocol-agnostic-events-web

Conversation

@markmur

@markmur markmur commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Adds typed start, update, complete, error, and close events for observing the web checkout lifecycle. Consumers receive Kit-owned snapshots and error payloads through standard DOM event listeners, with protocol handling kept internal.

  • Introduces a Kit-owned Checkout snapshot that removes only top-level ucp, reuses nested domain types, and preserves optional fields and inline extensions.
  • Combines line-item, message, total, and fulfillment notifications into structurally deduplicated updates, with fresh snapshot state for each presentation.
  • Exposes stable error codes and diagnostic messages while preserving terminal protocol-error handling: the component emits error, closes the session, and emits close, regardless of message severity.
  • Documents the public lifecycle API and updates the sample, declarations, and custom-element metadata.

Window-open requests continue to use the existing internal HTTPS opening behavior.

Stack

@markmur
markmur requested a review from a team as a code owner September 14, 2026 11:59
@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Sep 14, 2026
@markmur markmur self-assigned this Sep 14, 2026
@markmur
markmur force-pushed the protocol-agnostic-events-web branch from 2e1ab2b to 123a057 Compare September 14, 2026 13:07
@markmur
markmur changed the base branch from prototype/protocol-agnostic-events to protocol-agnostic-events-android September 14, 2026 13:08
@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
Web npm tarball 80.1 KiB 80.5 KiB +404 B
Web file breakdown
File Base Head Delta
dist/index.js.map 217.7 KiB 221.2 KiB +3.5 KiB
dist/custom-elements.json 51.4 KiB 48.0 KiB -3.5 KiB
dist/index.d.ts 45.9 KiB 35.0 KiB -10.9 KiB
dist/index.js 39.5 KiB 40.3 KiB +761 B
README.md 20.0 KiB 20.1 KiB +51 B
package.json 2.9 KiB 2.9 KiB 0 B
LICENSE 1.1 KiB 1.1 KiB 0 B

Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.

@bitrise

bitrise Bot commented Sep 14, 2026

Copy link
Copy Markdown

Install this build

Open Tophat, select your target device, then click Install. Links open on the Mac running Tophat.

SDK Install
Kotlin Install with Tophat

Checkout Kit E2E results

Status Suite Target Platform OS version tag Device
✅ kotlin-android kotlin android latest Google Pixel 9
Android 17.0

@markmur
markmur force-pushed the protocol-agnostic-events-web branch from 123a057 to 65d99b4 Compare September 14, 2026 17:03
@markmur
markmur force-pushed the protocol-agnostic-events-web branch from 65d99b4 to d815626 Compare September 14, 2026 17:23
@markmur
markmur force-pushed the protocol-agnostic-events-web branch from d815626 to 8e9bf1e Compare September 15, 2026 12:19
@markmur
markmur force-pushed the protocol-agnostic-events-web branch from 8e9bf1e to 7c7ec64 Compare September 15, 2026 13:19
Comment thread platforms/web/src/checkout-events.ts Outdated
Comment thread platforms/web/src/checkout.ts Outdated
Comment thread platforms/web/src/checkout-protocol.test.ts Outdated
@markmur
markmur force-pushed the protocol-agnostic-events-web branch from 7c7ec64 to 01c52cf Compare September 16, 2026 12:11
@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Web — Coverage Report

Lines Statements Branches Functions
Coverage: 96%
95.17% (375/394) 84.32% (199/236) 97.08% (100/103)

@markmur
markmur force-pushed the protocol-agnostic-events-web branch from 424bd19 to b85eb37 Compare September 24, 2026 13:59
@markmur
markmur force-pushed the protocol-agnostic-events-web branch from b85eb37 to d01ba12 Compare September 24, 2026 15:38
@markmur
markmur added this pull request to stack #818 September 24, 2026 16:17
@markmur
markmur force-pushed the protocol-agnostic-events-web branch from d01ba12 to 1f7a523 Compare September 25, 2026 08:24
@markmur
markmur merged commit 8999ad0 into main Sep 25, 2026
42 of 48 checks passed
@markmur
markmur deleted the protocol-agnostic-events-web branch September 25, 2026 09:32
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.

2 participants