Skip to content

Integrate @probie-dev/react-native passive session signals (env-gated) - #28

Open
grasskin wants to merge 1 commit into
arjunpkulkarni:mainfrom
grasskin:probie-widget
Open

Integrate @probie-dev/react-native passive session signals (env-gated)#28
grasskin wants to merge 1 commit into
arjunpkulkarni:mainfrom
grasskin:probie-widget

Conversation

@grasskin

Copy link
Copy Markdown
Collaborator

Adds Probie passive issue capture to the Expo app via the published @probie-dev/react-native SDK (v0.1.0). Capture only — renders no UI.

Auto-capture from the SDK: JS errors, unhandled rejections, failing requests (XHR interceptor, which covers RN fetch), app-lifecycle flushing. PII-safe: hashed labels, query strings dropped.

What changed

  • apps/mobile/package.json + lockfile — add @probie-dev/react-native@^0.1.0 (its expo-* / async-storage deps were already in the app)
  • apps/mobile/src/lib/probie.tsx — conditional wrapper: the SDK throws on a missing token, so FitfoProbieProvider only mounts ProbieProvider when EXPO_PUBLIC_PROBIE_TOKEN is set; otherwise it renders children unchanged (same opt-in-by-environment contract as PostHog)
  • apps/mobile/App.tsx — wrapper mounted inside PostHogProvider; probieIdentify next to posthog.identify on login, probieReset next to posthog.reset on logout (both are safe no-ops when the provider never mounted)
  • apps/mobile/.env.example — documents EXPO_PUBLIC_PROBIE_TOKEN / EXPO_PUBLIC_PROBIE_HOST

Not wired: screen tracking (the app uses hand-rolled navigation, not expo-router/react-navigation — trackScreen() can be added at nav sites later) and ProbiePressable/useProbieForm opt-in instrumentation.

Enabling it

Set EXPO_PUBLIC_PROBIE_TOKEN (the project's public widget token, pb_...) in the build environment. No token in this PR; without it nothing mounts.

Verified

  • tsc --noEmit: 126 errors on clean main, 126 on this branch — no new errors
  • vitest: identical to clean main (8 files / 1 test pre-existing failures, unrelated)
  • Prod ingest protocol reachable and parsing widget-token bodies (401 invalid widget token on a placeholder POST)

🤖 Generated with Claude Code

Mounts ProbieProvider around the app (inside PostHogProvider) via a
conditional wrapper: the SDK throws on a missing token, so without
EXPO_PUBLIC_PROBIE_TOKEN the provider never mounts and the app is
unchanged — the same opt-in-by-environment contract as PostHog.
identify()/reset() are wired next to their posthog counterparts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

@grasskin is attempting to deploy a commit to the arjunpkulkarni's projects Team on Vercel.

A member of the Team first needs to authorize it.

@grasskin
grasskin requested a review from arjunpkulkarni July 17, 2026 20:18
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