Skip to content

[E2E] Log ready Swift preload cache hits - #627

Draft
kyle-schellen wants to merge 1 commit into
ks-e2e-preload-sample-markersfrom
ks-e2e-preload-cache-hit-signal
Draft

[E2E] Log ready Swift preload cache hits#627
kyle-schellen wants to merge 1 commit into
ks-e2e-preload-sample-markersfrom
ks-e2e-preload-cache-hit-signal

Conversation

@kyle-schellen

@kyle-schellen kyle-schellen commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Emit a debug-only diagnostic through Swift's configured Logger when presentation selects a matching cached WebView that reached .ready.
  • Preserve the existing OSLog cache-hit message for dashboard compatibility.
  • Reuse the Swift sample's existing FileLogger and Settings → Logs screen.
  • Add SDK tests covering ready cache hits, matching entries that are still loading, non-debug logging, fresh presentation, and URL mismatch.

Why

preload-state-ready proves background preload completed, but not that presentation used that cached WebView. This diagnostic proves presentation selected the matching ready cache entry.

The two platforms differ only in transport. Android's equivalent cache-hit line is already available in BrowserStack's passing-test device logs; iOS passing logs are not, so the flow reads the diagnostic from the Swift sample's existing Logs screen instead.

Testing

  • dev swift test CheckoutWebViewTests
  • dev swift test sample
  • dev swift lint
  • dev swift api check — public API baseline unchanged
  • Asserted end to end by [E2E] Prepare native preload ready-flow validation #631 on a physical iPhone: preload ready → present → real checkout content → close → Settings → Logs → cache-hit diagnostic.

Stack

  1. [E2E] Expose native preload state markers #626 — preload state markers in the samples
  2. [E2E] Log ready Swift preload cache hits #627 — this PR: Swift ready cache-hit diagnostic
  3. [E2E] Prepare native preload ready-flow validation #631 — the E2E test, matrix wiring, and BrowserStack validation

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 the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Embedded Checkout Protocol version?
  • I have bumped embeddedCheckoutProtocolAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api if the public API changed
Releasing a new Android version?
  • I have bumped checkoutKitAndroid in platforms/android/gradle/libs.versions.toml
  • 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.

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Aug 11, 2026

kyle-schellen commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

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

@kyle-schellen
kyle-schellen force-pushed the ks-e2e-preload-cache-hit-signal branch from 9055f4f to bd7199e Compare August 11, 2026 15:16
@kyle-schellen kyle-schellen changed the title test(e2e): standardize native preload cache-hit signals [E2E] Swift preload cache-hit signal Aug 11, 2026
@kyle-schellen
kyle-schellen force-pushed the ks-e2e-preload-cache-hit-signal branch 2 times, most recently from 7a4eef0 to c408a61 Compare August 11, 2026 19:11
@kyle-schellen
kyle-schellen force-pushed the ks-e2e-preload-sample-markers branch from 558cb61 to 76447c5 Compare August 11, 2026 19:11
@kyle-schellen
kyle-schellen force-pushed the ks-e2e-preload-cache-hit-signal branch 2 times, most recently from e26b2d8 to 67a0382 Compare August 11, 2026 21:48
@kyle-schellen kyle-schellen self-assigned this Aug 11, 2026
@kyle-schellen
kyle-schellen marked this pull request as ready for review August 11, 2026 22:39
@kyle-schellen
kyle-schellen requested a review from a team as a code owner August 11, 2026 22:39
@bitrise

bitrise Bot commented Aug 11, 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
Swift Install with Tophat

Checkout Kit E2E results

Status Suite Target Platform OS version tag Device
tests/shared/launch-smoke.yaml swift ios latest iPhone 15
iOS 27 Beta

@kyle-schellen
kyle-schellen force-pushed the ks-e2e-preload-cache-hit-signal branch from 67a0382 to 4a1fa10 Compare August 11, 2026 22:57

Copy link
Copy Markdown
Contributor

Dropping it here based on our slack convo
We're going to explore an approach using the log screen as this avoids us having to add conditional logs entries to the SDK
image.png

@kyle-schellen
kyle-schellen marked this pull request as draft August 12, 2026 12:31
@kyle-schellen
kyle-schellen force-pushed the ks-e2e-preload-cache-hit-signal branch from 4a1fa10 to acd0a6a Compare August 12, 2026 13:45
@kyle-schellen kyle-schellen changed the title [E2E] Swift preload cache-hit signal [E2E] Log ready Swift preload cache hits Aug 12, 2026
@kyle-schellen
kyle-schellen force-pushed the ks-e2e-preload-sample-markers branch from 76447c5 to 770e7de Compare August 12, 2026 17:58
@kyle-schellen
kyle-schellen force-pushed the ks-e2e-preload-cache-hit-signal branch from acd0a6a to 1842281 Compare August 12, 2026 17:58
@kyle-schellen
kyle-schellen force-pushed the ks-e2e-preload-sample-markers branch from 770e7de to 56cc7f5 Compare August 14, 2026 20:36
@kyle-schellen
kyle-schellen force-pushed the ks-e2e-preload-cache-hit-signal branch from 1842281 to f0af482 Compare August 14, 2026 20:36
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