[CI] (0ae2102) react-native/react-native-saas#1234
Conversation
|
Now I have all the information I need. Let me note the key findings:
Now let me compile the full evaluation report. PR Evaluation ReportSummaryThis PR integrates PostHog analytics into a React Native SaaS application using the
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | All imports resolve to valid packages, syntax is correct, no type errors |
| Preserves existing env vars & configs | Yes | Existing code and configs are preserved; PostHog additions are additive |
| No syntax or type errors | Yes | All JavaScript syntax is valid; API usage matches SDK signatures |
| Correct imports/exports | Yes | PostHog, PostHogProvider, usePostHog correctly imported from posthog-react-native; Config from react-native-config |
| Minimal, focused changes | Yes | All changes relate to PostHog integration |
| Pre-existing issues | None | No pre-existing issues found |
Issues
- No
.env.examplefile: While the.gitignorecorrectly excludes.env, there is no committed.env.exampleor equivalent template to document required variables (POSTHOG_PROJECT_TOKEN,POSTHOG_HOST). The setup report describes them, but a.env.exampleis the standard approach. [MEDIUM]
Other completed criteria
- Build configuration is valid —
posthog-react-nativeand peer dependencies (react-native-device-info,react-native-localize,react-native-svg) correctly added topackage.json - Existing navigation structure, Redux sagas, and component structure preserved
- Code follows existing codebase patterns (saga imports, dispatch patterns, component hooks)
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-react-native@^4.41.2 added to package.json along with required peer dependencies |
| PostHog client initialized | Yes | Singleton PostHog instance created in src/config/posthog.js with host, lifecycle events, debug mode; wrapped in PostHogProvider in routes |
| capture() | Yes | 10 meaningful capture calls across auth, team, project, and member flows |
| identify() | Yes (with issues) | posthog.identify() called on sign-in, posthog.reset() on sign-out — but uses email as distinct_id instead of a database user ID |
| Error tracking | No | Uses manual posthog.capture('', {...}) instead of the SDK's posthog.captureException(error) method, which properly normalizes error data |
| Reverse proxy | N/A | React Native mobile app — reverse proxy is not applicable |
Issues
- Email used as
distinct_id:posthog.identify(email, ...)uses the raw email address as the distinct ID. Per PostHog best practices, a stable database user ID should be used asdistinct_id, with email set only as a person property. Using email leads to fragmented data if the user changes their email. [MEDIUM] - Manual `` capture instead of
captureException(): All saga catch blocks use `posthog.capture('', { : err.name, : err.message })` rather than `posthog.captureException(err)`. The SDK method properly handles stack traces, error normalization, and metadata extraction. Additionally, the `sign_in_failed` event also embeds exception properties in a custom event name. [MEDIUM] - API key loaded from env: API key is correctly loaded from
Config.POSTHOG_PROJECT_TOKENviareact-native-config, not hardcoded. Thedisabledflag gracefully handles missing config. [OK]
Other completed criteria
- PostHog host correctly configured to
Config.POSTHOG_HOST PostHogProvidercorrectly wraps the navigator withclientprop- Manual screen tracking correctly implemented via
onReady/onStateChangeonNavigationContainer captureScreens: falseon provider avoids duplicate screen events since manual tracking is usedposthog.reset()correctly called on sign-out- Lifecycle events enabled via
captureAppLifecycleEvents: true
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
src/pages/SignIn/index.js |
sign_in_viewed |
Top-of-funnel event fired when sign-in screen is displayed |
src/store/modules/auth/sagas.js |
user_signed_in, sign_in_failed, user_signed_out |
Auth lifecycle events with identify/reset; sign_in_failed includes error info |
src/components/TeamSwitcher/index.js |
new_team_modal_opened |
UI interaction event when user taps "+" to create a team |
src/store/modules/teams/sagas.js |
team_created, team_selected, `` |
Team CRUD events with team name/id properties; exception on error |
src/store/modules/projects/sagas.js |
project_created, `` |
Project creation with title/id properties; exception on error |
src/store/modules/members/sagas.js |
member_invited, member_role_updated, `` |
Member management events; exception on error |
src/routes.js |
`` (via posthog.screen()) |
Automatic screen view tracking on navigation state changes |
Issues
- PII in event properties:
posthog.capture('user_signed_in', { email, demo_mode: true })includes the user's email directly in event properties. Per PostHog guidelines, PII (emails, names) should only be set via person properties (e.g.,identify()or ``), not incapture()event properties. [CRITICAL] - **
sign_in_failedmixes custom event withproperties**: The `sign_in_failed` capture usesandas properties on a custom event name, which is non-standard. These prefixed properties are reserved for theevent type. Useposthog.captureException(err)for error tracking and a separatesign_in_failedevent for the business metric. [MEDIUM]
Other completed criteria
- Events represent real user actions aligned with actual product flows (sign-in, team management, project creation, member management)
- Events enable useful product insights — sign-in funnel, team/project creation trends, collaboration metrics
- Events include relevant contextual properties (team_id, project_title, role_count, demo_mode)
- Event names are descriptive and follow consistent snake_case convention
Reviewed by wizard workbench PR evaluator
Automated wizard CI run
Source: wizard-pr
Trigger ID:
0ae2102App:
react-native/react-native-saasApp directory:
apps/react-native/react-native-saasWorkbench branch:
wizard-ci-0ae2102-react-native-react-native-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-04-15T19:31:35.176Z
Duration: 406.4s