Skip to content

feat(source-maps): flesh out React Native upload guidance - #263

Merged
ablaszkiewicz merged 10 commits into
mainfrom
ab/feat/react-native-source-maps
Jul 29, 2026
Merged

feat(source-maps): flesh out React Native upload guidance#263
ablaszkiewicz merged 10 commits into
mainfrom
ab/feat/react-native-source-maps

Conversation

@ablaszkiewicz

@ablaszkiewicz ablaszkiewicz commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Related PRs

Part of the React Native source-map upload rollout:


What

Companion to PostHog/wizard#941, which flips react-native to automatable in the error-tracking-upload-source-maps program. The skill variant already publishes; this fleshes out the template's RN guidance so the agent lands the right flow first try:

  • Splits the shared "React Native / Flutter" build-config example into a dedicated RN entry covering the two flows: Expo config plugin (posthog-react-native/expo + getPostHogExpoConfig metro config) vs bare RN (SDK's tooling/posthog.gradle in the app module + posthog-xcode.sh in the "Bundle React Native code and images" phase), plus the Release-only upload, the global posthog-cli (v0.7.8+, wizard-installed) rule, and the manual OTA upload (posthog-cli hermes upload --directory dist).
  • Adds an RN credentials tip (POSTHOG_CLI_* for both native hooks, same API-host rule as iOS).
  • Replaces the run-only RN build/run example with per-flavour Release commands.
  • Extends the RN test affordance with the Release-build test flow, mirroring the Android/iOS entries.

npm test (137) and npm run build green; error-tracking-upload-source-maps-react-native.zip present in dist/skills/.

🤖 Generated with Claude Code

@ablaszkiewicz
ablaszkiewicz requested a review from a team as a code owner July 22, 2026 09:26
@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

@ablaszkiewicz
ablaszkiewicz marked this pull request as draft July 22, 2026 10:30
@ablaszkiewicz
ablaszkiewicz removed request for a team, cat-ph and hpouillot July 22, 2026 10:30
@ablaszkiewicz

Copy link
Copy Markdown
Contributor Author

Added native crash symbolication to the RN section (Expo uploadNativeSymbols, bare RN via the standalone iOS/Android examples, runtime nativeCrashes pairing gotcha).

ablaszkiewicz and others added 9 commits July 28, 2026 20:04
The wizard is flipping react-native to automatable in the
error-tracking-upload-source-maps program. Split the shared React
Native / Flutter line into a dedicated RN entry covering the two flows
(Expo config plugin vs bare RN Gradle script + Xcode build phase), the
global posthog-cli requirement, Release-only uploads, and the manual
OTA upload; add RN credential and Release build/run command notes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Extends the RN build-config example with the native symbol flows — Expo
via the plugin's uploadNativeSymbols option, bare RN via the standalone
iOS/Android examples — plus the runtime nativeCrashes pairing gotcha.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The wizard agent added the bare Expo plugin string and dropped
symbolication, leaning on the reference doc's 'optional' badge. State that
the badge does not apply — enable uploadNativeSymbols with source
inclusion per the reference — without duplicating the reference's exact
config here.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ol upload

Symbol upload without errorTracking.autocapture.nativeCrashes (and the
@posthog/react-native-plugin package it depends on) means native crashes
are silently never reported. Make the agent enable the runtime half too.

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

The bare RN template only defines NODE_BINARY inside with-environment.sh,
so the posthog-xcode.sh resolution token expanded to nothing and the phase
failed with ': command not found' — the phase must source .xcode.env(.local)
first. Credentials tip now points bare RN iOS at a POSTHOG_CLI_DOTENV_FILE
user-defined build setting (covers bundle + dSYM phases, posthog-cli >= 0.8.4)
and calls out the $(SRCROOT)/../.env anchor, since .env lives at the app
root, not in ios/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Source-map upload for React Native is Expo-only: chunk-ID injection relies
on Expo's serialization pipeline, so a bare RN app uploads symbol sets that
can never resolve runtime frames. The skill now tells the agent to abort
with `bare react native not supported` (matched by the wizard's abort case)
instead of wiring the Gradle script and Xcode phases by hand, and the
credentials + build-command guidance is rewritten for the Expo CLI flow.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… the wizard uses

The wizard blocks bare React Native at detection, so the skill never sees
one — drop the bare-RN unsupported note and its abort instruction. Also
drop the OTA-bundle gotcha (the wizard never publishes OTA updates) and the
direct-xcodebuild/gradlew credentials caveat (the wizard only builds
through the Expo CLI).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…le prop for credentials

posthog-react-native 4.60.0 shipped the `dotenvFile` option on the Expo
config plugin: at prebuild it wires the path into every upload hook as
POSTHOG_CLI_DOTENV_FILE (Xcode build setting on iOS, posthog.dotenvFile
gradle property on Android). The credentials tip now tells the agent to set
`"dotenvFile": ".env"` on the plugin entry instead of relying on the Expo
CLI's .env auto-load, which only covers builds the Expo CLI itself spawns.

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

Keep only agent-actionable instructions and guardrails; drop mechanism
explanations, duplicated Release-only notes, and consequence prose.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
posthog.com's "migrate Logs docs to the new IA" (#18964) moved
/docs/logs/debug-logs-mcp to /docs/logs/surfaces/mcp. A Vercel redirect
covers the HTML path, but the .md variant is only emitted for slugs with
a built page — generateRawMarkdownPages skips anything without
public/<slug>/index.html — so debug-logs-mcp.md now 404s and the build
hard-fails while generating the logs skills.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ablaszkiewicz
ablaszkiewicz requested a review from a team as a code owner July 29, 2026 07:24
@ablaszkiewicz
ablaszkiewicz merged commit 13139a8 into main Jul 29, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants