Repository navigation
[CI] (f51b3be) react-native/react-native-saas - #2644
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
wizard-ci-bot[bot] wants to merge 1 commit into
Conversation
Author
|
Now I have all the context needed. Here's my evaluation: PR Evaluation ReportSummaryThis PR integrates PostHog into a React Native SaaS app using the
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | No syntax errors; correct peer dependencies added |
| Preserves existing env vars & configs | Yes | Existing code untouched except for PostHog additions |
| No syntax or type errors | Yes | All JS syntax is valid |
| Correct imports/exports | Yes | posthog-react-native and react-native-config imports are correct |
| Minimal, focused changes | Yes | All changes relate to PostHog integration |
| Pre-existing issues | None | — |
Issues
- No
.env.exampledocumentation: The required environment variablesPOSTHOG_PROJECT_TOKENandPOSTHOG_HOSTare not documented in any example file or README. Collaborators won't know what env vars to set. [MEDIUM]
Other completed criteria
- Build configuration is valid — peer dependencies for
posthog-react-nativecorrectly added .envproperly gitignored to prevent secret leakage- Existing navigation, saga, and store patterns preserved
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-react-native v4.55.0 added with peer deps (react-native-device-info, react-native-localize, react-native-config, react-native-svg) |
| PostHog client initialized | Yes | Singleton via new PostHog(token, { host, ... }) in src/config/posthog.js with disabled guard |
| capture() | Yes | 12 meaningful capture calls across auth, team, project, and member sagas |
| identify() | No | Uses raw email as distinct_id and double-nests `` properties |
| Error tracking | No | No captureException or error tracking setup; errors only tracked as custom events |
| Reverse proxy | N/A | React Native mobile app — reverse proxy is not applicable |
Issues
- Email used as
distinct_id:posthog.identify(email, ...)uses the user's email as the distinct ID. This is fragile — if a user changes their email, they become a new person in PostHog. The sign-in API response likely contains a user ID or the token could be decoded to extract one. Use a stable user ID instead. [CRITICAL] - **Double-nested
in identify**: The React Native SDK's `identify(distinctId, userProperties)` method internally wraps the second argument as. Passing{ : { email } }results in the properties being sent as: { : { email } }, meaning the email will not be set correctly on the person profile. Fix:posthog.identify(userId, { email }). [MEDIUM] - No error tracking: No
captureExceptioncalls anywhere. Saga catch blocks capture custom failure events but don't leverage PostHog's error tracking for stack traces and exception grouping. [MEDIUM] - No returning-user identify: The
initsaga restores tokens from AsyncStorage on app restart but never callsposthog.identify, leaving returning sessions on anonymous distinct IDs. The wizard's own report flags this. [MEDIUM]
Other completed criteria
- API key correctly loaded from
react-native-configenvironment variable - Host configured with sensible default (
https://us.i.posthog.com) posthog.reset()correctly called on sign-outPostHogProvidercorrectly wraps the navigation stack insideNavigationContainer- Manual screen tracking via
onStateChangewith previous screen tracking captureAppLifecycleEvents: trueenables lifecycle event tracking- Touch autocapture enabled via
captureTouches: true
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
src/routes.js |
screen (via posthog.screen()) |
Tracks screen navigation changes with previous screen context |
src/store/modules/auth/sagas.js |
user_signed_in, user_sign_in_failed, user_signed_out |
Auth lifecycle events with demo_mode flag; identify on sign-in |
src/store/modules/teams/sagas.js |
team_selected, team_created, team_create_failed |
Team management events with name/slug properties |
src/store/modules/projects/sagas.js |
project_created, project_create_failed |
Project creation events with title property |
src/store/modules/members/sagas.js |
member_invited, member_invite_failed, member_role_updated, member_role_update_failed |
Member management events with member_id property |
Issues
- No error tracking events: Failure events like
user_sign_in_failedare custom captures, notcaptureExceptioncalls. They lose stack traces and error context. Consider usingposthog.captureException(err)in catch blocks alongside the custom events. [MEDIUM]
Other completed criteria
- Events represent real user actions (sign-in, team creation, member invites, etc.)
- Events enable product insights — funnels from sign-in → team selection → project creation are possible
- Events include contextual properties (
demo_mode,team_name,project_title,member_id) - No PII in capture event properties — email is only in identify, not in capture properties
- Event names follow consistent snake_case convention and are descriptive
Reviewed by wizard workbench PR evaluator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated wizard CI run
Source: wizard-pr
Trigger ID:
f51b3beApp:
react-native/react-native-saasApp directory:
apps/react-native/react-native-saasWorkbench branch:
wizard-ci-f51b3be-react-native-react-native-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-07-09T22:40:56.568Z
Duration: 422.7s
YARA Scanner