[CI] (cef44b4) react-native/react-native-saas#1403
Closed
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
Closed
[CI] (cef44b4) react-native/react-native-saas#1403wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
Conversation
Author
PR Evaluation ReportSummaryThis PR integrates PostHog analytics 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; dependencies are valid React Native packages |
| Preserves existing env vars & configs | Yes | No existing configs modified destructively |
| No syntax or type errors | Yes | All JS syntax is valid |
| Correct imports/exports | Yes | posthog-react-native exports PostHog default and PostHogProvider named export correctly |
| Minimal, focused changes | Yes | All changes are PostHog-related; extra packages are peer deps of posthog-react-native |
| Pre-existing issues | None |
Issues
- No
.env.examplefile: The required env vars (POSTHOG_PROJECT_TOKEN,POSTHOG_HOST) are not documented anywhere discoverable. A.env.exampleshould be added. [MEDIUM]
Other completed criteria
- Build configuration is valid — package.json additions are well-formed
- Existing app code and navigation structure preserved
.envcorrectly added to.gitignore
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-react-native@^4.44.0 added to package.json with peer deps |
| PostHog client initialized | Yes | new PostHog(apiKey, { host, ... }) with env vars in src/config/posthog.js, PostHogProvider wraps routes |
| capture() | Yes | 12 meaningful events across auth, teams, projects, members sagas |
| identify() | No | Uses raw email as distinct_id; `` misplaced in second arg instead of third arg |
| Error tracking | Yes | posthog.captureException(err, { level }) on all failure paths |
| Reverse proxy | N/A | Mobile app — reverse proxy is not applicable |
Issues
- Email as
distinct_id:posthog.identify(email, ...)uses the user's email address as the distinct ID. This is fragile (email changes break identity) and leaks PII into the distinct_id field. Use a stable backend user ID instead. [CRITICAL] - **
API misuse**: The code passes `{ email, : { initial_login_method: 'demo' } }` as the second argument to `identify()`. In the React Native SDK, the second parameter isproperties and the third is. This creates a literalperson property. Correct usage:posthog.identify(userId, { email }, { initial_login_method: 'demo' }). [CRITICAL] - No re-identify on app load: When the app restores a token from AsyncStorage in
init(), it doesn't callposthog.identify(), so returning users are treated as anonymous until they explicitly sign in again. [MEDIUM]
Other completed criteria
- API key loaded from environment variable via
react-native-config - API host correctly configured from env var (defaults to
https://us.i.posthog.com) posthog.reset()called on sign out- Screen tracking implemented via
NavigationContainer.onStateChange PostHogProviderwraps navigation tree with touch autocapture enabled- PostHog disabled gracefully when API key is missing
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
auth/sagas.js |
sign_in, sign_in_failed, sign_out, captureException |
Auth flow tracking with method property; error tracking on failure |
projects/sagas.js |
project_created, project_create_failed, captureException |
Project creation with title and project_id properties |
teams/sagas.js |
team_created, team_create_failed, team_switched, captureException |
Team lifecycle events with team name/id |
members/sagas.js |
member_invited, member_invite_failed, member_role_updated, member_role_update_failed, captureException |
Member management events |
routes.js |
screen (via posthog.screen()) |
Automatic screen tracking on navigation state change |
Issues
- PII in event properties:
invite_email: emailinmember_invitedandmember_invite_failedevents sends email addresses as event properties. Email is PII and should only be stored as person properties (viaidentify()orsetPersonProperties()), not incapture()calls. [MEDIUM]
Other completed criteria
- Events represent real user actions (sign in, create project, invite member, switch team)
- Events enable product insights — funnels (sign_in → project_created → member_invited), trends, retention
- Most events include relevant enrichment properties (method, team_name, team_id, project_id, role_count)
- Event names are descriptive and use consistent snake_case convention
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: context-mill-pr
Trigger ID:
cef44b4App:
react-native/react-native-saasApp directory:
apps/react-native/react-native-saasWorkbench branch:
wizard-ci-cef44b4-react-native-react-native-saasWizard branch:
mainContext Mill branch:
basic-skills-v2PostHog (MCP) branch:
masterTimestamp: 2026-05-01T21:07:18.228Z
Duration: 331.3s