Skip to content

feat: add sample app dashboard, dev URL overrides, and run tooling#127

Closed
ethanpschoen wants to merge 17 commits into
mainfrom
ethanpschoen/feat/sample-app
Closed

feat: add sample app dashboard, dev URL overrides, and run tooling#127
ethanpschoen wants to merge 17 commits into
mainfrom
ethanpschoen/feat/sample-app

Conversation

@ethanpschoen

@ethanpschoen ethanpschoen commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description of this change

Merges ATT stack (#124#125) with headless API (#126), adds example dashboard for manual QA, opt-in webResourceUrlOverrides, and Cursor run-sample scripts.

Sample app wiring for ATT + headless + WebView dev URL overrides; no SDK runtime deps beyond merged slices.

Why is this change being made?

  • Chore (non-functional changes)
  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How was this tested? How can the reviewer verify your testing?

  • cd package && npm run typecheck && npm test
  • bash .cursor/skills/ketch-react-native-run-sample/scripts/run-sample-app.sh ios local (optional manual QA)
  • Set DEV_URL_OVERRIDES_ENABLED = true in example/devUrlOverrides.ts to test local tag redirect

Related issues

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have evaluated the security impact of this change, and OWASP Secure Coding Practices have been observed.
  • I have informed stakeholders of my changes.

Note

Medium Risk
Touches consent/ATT WebView initialization and new headless consent HTTP APIs on the public SDK surface; example and tooling changes are lower risk but the library behavior changes warrant careful regression on iOS ATT and consent flows.

Overview
Adds an SDK Health Dashboard to the example app: DashboardContext plus panels in Main.tsx for connection state, WebView/experience, privacy protocols, headless CDN calls, and a timestamped event log. App.tsx wires KetchServiceProvider callbacks into that state, switches defaults to UAT org/property, sets autoLoad={false}, and optionally passes webResourceUrlOverrides via devUrlOverrides.ts.

The example also gains iOS ATT manual QA (request + reload WebView, ketch_att rows) and headless smoke buttons (location, bootstrap, cold-start consent). iOS picks up tracking usage text, CocoaPods 1.16, and a DEBUG Metro fallback to port 8082.

Cursor/dev workflow: new development-workflow.mdc, the ketch-react-native-run-sample skill, and run-sample-app.sh / configure-sample-package.py to flip the example between npm and file:../package, install deps, start Metro, build, launch, and stream logs.

This PR’s diff also lands substantial package changes used by the sample: headless web/v3 client exposed on useKetchService(), iOS ATT native module and WebView ketch_att / ketch_att_prev resolution, webResourceUrlOverrides injection in WebView HTML, onNativeStoragePut, Jest/unit and opt-in CDN integration tests, and an iOS podspec.

Reviewed by Cursor Bugbot for commit 584720a. Configure here.

Handle ketch-tag nativeStoragePut events via crossPlatformSave and
expose crossPlatformRead for downstream native storage consumers.
Introduce KetchAtt native module, auto-resolve ketch_att/ketch_att_prev
for WebView init, and harden nativeStoragePut save-before-callback handling.
Expose pre-WebView headless endpoints via KetchHeadless, wire them through
KetchServiceProvider, and harden JSON/network error handling in the client.
Merge headless API with ATT stack; wire example dashboard for manual QA,
opt-in webResourceUrlOverrides, and Cursor run-sample scripts.
@ethanpschoen ethanpschoen requested review from a team as code owners June 18, 2026 23:26
@socket-security

socket-security Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgem/​nkf@​0.2.0 ⏵ 0.3.09910010010070
Updatedgem/​cocoapods@​1.14.3 ⏵ 1.16.285 +1100100100100
Updatedgem/​activesupport@​7.0.8.1 ⏵ 7.2.3.188100 +4100100100

View full report

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 584720a. Configure here.

Comment thread package/src/KetchServiceProvider/KetchServiceProvider.tsx
Comment thread example/devUrlOverrides.ts Outdated
Invoke onNativeStoragePut only after crossPlatformSave resolves; log and
route save failures to onError instead of swallowing rejected writes.
Remove void operator for no-void and collapse message assignment for prettier.
Adds `nativeStorage` (read/write/remove/removeValues) as the canonical
storage façade, matching the iOS and Flutter SDK surfaces. The
`nativeStoragePut` bridge handler and the `storePreference` fallback in
KetchServiceProvider now route through `nativeStorage.write`.
Introduce KetchAtt native module, auto-resolve ketch_att/ketch_att_prev
for WebView init, and harden nativeStoragePut save-before-callback handling.
Stop re-running ATT resolution when webViewReloadNonce changes so load()
remounts do not hide the WebView. On resolveAtt rejection, fall back to
notDetermined and set isAttReady so iOS is not blocked indefinitely.
@ethanpschoen ethanpschoen changed the base branch from main to ethanpschoen/feat/att June 19, 2026 19:24
Base automatically changed from ethanpschoen/feat/att to main June 22, 2026 17:39
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