Skip to content

remove legacy-bridge#190

Open
kiftio wants to merge 1 commit into
mainfrom
05-22-remove_legacy-bridge
Open

remove legacy-bridge#190
kiftio wants to merge 1 commit into
mainfrom
05-22-remove_legacy-bridge

Conversation

@kiftio
Copy link
Copy Markdown
Contributor

@kiftio kiftio commented May 22, 2026

What changes are you making?

Removes the legacy CheckoutBridge JS interface (registered under the "android" name) and replaces it entirely with EmbeddedCheckoutProtocol as the sole JavaScript interface attached to CheckoutWebView. As part of this:

  • CheckoutBridge.kt and its associated WebToSdkEvent model are deleted.
  • The errorevents subpackage (CheckoutErrorDecoder, CheckoutErrorGroup, CheckoutErrorPayload) is removed, along with the error-group-based exception mapping it performed.
  • The lifecycleevents subpackage models (Address, CartInfo, CartLine, CartLineImage, CheckoutCompletedEvent, CheckoutCompletedEventDecoder, CompletedEvent, DeliveryDetails, DeliveryInfo, Discount, MoneyV2, OrderDetails, PaymentMethod, Price) are removed from the public API surface, as they are now generated from the protocol definition.
  • ConfigurationException and ClientException are removed from the documented exception hierarchy and error table. CheckoutExpiredException error codes cart_completed and invalid_cart are also removed.
  • CheckoutWebViewListener no longer holds a toggleHeader callback, and CheckoutDialog no longer wires up header visibility toggling in response to modal events.
  • CheckoutWebView now holds the listener directly rather than delegating through CheckoutBridge.
  • All tests covering CheckoutBridge, CheckoutCompletedEventDecoder, CheckoutErrorDecoder, and the corresponding Java interop cases are removed.
  • AGENTS.md is updated to reflect the new architecture, replacing references to CheckoutBridge and its SCHEMA_VERSION contract with EmbeddedCheckoutProtocol.

How to test

  1. Build the library and confirm it compiles cleanly with no references to CheckoutBridge or the removed errorevents/lifecycleevents classes.
  2. Run the existing test suite (./gradlew :lib:test) and confirm all remaining tests pass.
  3. Run CheckoutWebViewTest and verify the JavaScript interface assertions now reference EmbeddedCheckoutProtocol.INTERFACE_NAME.
  4. Open a checkout flow in the MobileBuyIntegration sample app and verify that checkout loads, completes, and surfaces errors correctly through EmbeddedCheckoutProtocol.
  5. Verify the Java interop test (InteropTest.java) compiles and passes without the removed decoder tests.

Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated platforms/swift/CHANGELOG.md
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Android version?
  • I have bumped the versionName in platforms/android/lib/build.gradle
  • I have updated platforms/android/CHANGELOG.md
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

Copy link
Copy Markdown
Contributor Author

kiftio commented May 22, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 98%
96.76% (239/247) 91.02% (142/156) 100% (64/64)

@kiftio kiftio force-pushed the 05-22-remove_legacy-bridge branch from e28dd67 to a1f4480 Compare May 22, 2026 14:57
@kiftio kiftio force-pushed the 05-22-remove_legacy-bridge branch from a1f4480 to 151974b Compare May 22, 2026 15:28
@kiftio kiftio marked this pull request as ready for review May 22, 2026 15:34
@kiftio kiftio requested a review from a team as a code owner May 22, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant