[CI] (6fb03e7) react-native/react-native-saas#1480
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
Conversation
Author
|
Now I have all the context needed for a thorough evaluation. 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 | Dependencies added correctly, no syntax errors, valid JSX |
| Preserves existing env vars & configs | Yes | Existing app code preserved; only PostHog additions and minor reformatting |
| No syntax or type errors | Yes | All JS syntax is valid |
| Correct imports/exports | Yes | posthog-react-native imports are correct (PostHog, PostHogProvider) |
| Minimal, focused changes | No | Gratuitous reformatting throughout (arrow function parens, multiline wrapping of existing code) |
| Pre-existing issues | None | Base app appears functional |
Issues
- Gratuitous reformatting: Arrow function parameters and multi-line wrapping changed in several sagas (e.g.,
state => state.auth.token→(state) => state.auth.token, multilinegetPermissionsSuccesscalls). These are style-only changes unrelated to PostHog. [LOW] - No
.env.examplecommitted: A.envfile exists locally but is gitignored. No.env.exampleis committed, making it hard for other developers to discover required env vars (POSTHOG_PROJECT_TOKEN,POSTHOG_HOST). [MEDIUM]
Other completed criteria
- App builds without errors — dependencies and syntax are valid
- Existing navigation structure, screens, and saga flows preserved
- Import statements all resolve to correct packages
package.jsondependencies are valid and parseable
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-react-native ^4.45.5 added with peer deps (react-native-device-info, react-native-localize, react-native-svg) |
| PostHog client initialized | Yes | new PostHog(apiKey, { host, disabled, captureAppLifecycleEvents, debug }) — correct pattern for bare React Native |
| capture() | Yes | 8 meaningful events across auth, teams, projects, and members sagas |
| identify() | No | Uses raw email as distinct_id — should use a stable user ID from the API response |
| Error tracking | No | No captureException() calls, no exception autocapture setup |
| Reverse proxy | N/A | React Native mobile app — reverse proxy is not applicable |
Issues
- Email as
distinct_id:posthog.identify(email, { email })on lines 61 and 73 of auth/sagas.js uses the user's email as the distinct ID. Per best practices, distinct IDs should be stable, unique identifiers (database user ID, UUID). Emails can change and are PII, leading to fragmented user profiles. For the real (non-demo) login path,response.datalikely contains a user ID or the JWT token could be decoded. [CRITICAL] - No error tracking: No
captureException()usage anywhere in the codebase. The catch blocks in sagas only show toasts. Addingposthog.captureException(err)in catch blocks would enable error tracking. [MEDIUM] - No re-identification on app resume: The
init()saga in auth/sagas.js restores the session token from AsyncStorage but does not callposthog.identify(). Users returning to the app after a cold start will send events anonymously until they sign in again. [MEDIUM]
Other completed criteria
- PostHog SDK correctly added to package.json with appropriate peer dependencies
- API key and host loaded from environment variables via
react-native-config - Host correctly configured (pointing to
https://us.i.posthog.comvia env) PostHogProvidercorrectly wraps navigator insideNavigationContainer- Manual screen tracking via
onStateChangeavoids duplicate events (captureScreens: false) posthog.reset()correctly called on sign-out- Graceful degradation when PostHog env vars are missing (
disabled: !isPostHogConfigured)
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
src/routes.js |
screen (via posthog.screen()) |
Tracks screen navigation changes with previous_screen property |
src/store/modules/auth/sagas.js |
user_signed_in, sign_in_failed, user_signed_out |
Core auth lifecycle: sign-in success (with demo flag), failure, and sign-out with session reset |
src/store/modules/teams/sagas.js |
team_created, team_switched |
Team management: creation with name, switching with team ID and name |
src/store/modules/projects/sagas.js |
project_created |
Project creation with title property |
src/store/modules/members/sagas.js |
member_invited, member_role_updated |
Member management: invitation and role changes |
Issues
member_invitedmissing invite email property: The non-demo path formember_invitedhas no properties at all. Adding the count or role of invited members would enrich analytics. [LOW]sign_in_failedhas no properties: No error type or reason is captured, limiting debugging value. [LOW]
Other completed criteria
- Events represent real user actions mapping to actual product flows (auth, team management, project management, member management)
- Events enable product insights — can build sign-in funnel, team activation funnel, retention by team/project creation
- Most events include relevant properties (is_demo, team_name, team_id, project_title, member_id)
- No PII in event properties — email is only in
identify()person properties, not incapture()calls - Event names are descriptive, 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: scheduled
Trigger ID:
6fb03e7App:
react-native/react-native-saasApp directory:
apps/react-native/react-native-saasWorkbench branch:
wizard-ci-6fb03e7-react-native-react-native-saasWizard branch:
mainContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-05-13T17:36:23.121Z
Duration: 352.3s