Skip to content

[CI] (cc5471b) react-native/react-native-saas - #4788

Closed
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-cc5471b-react-native-react-native-saas
Closed

wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-cc5471b-react-native-react-native-saas

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: scheduled
Trigger ID: cc5471b
App: react-native/react-native-saas
App directory: apps/react-native/react-native-saas
Workbench branch: wizard-ci-cc5471b-react-native-react-native-saas
Wizard branch: main
Context Mill branch: main
PostHog (MCP) branch: master
Timestamp: 2026-10-28T16:57:17.405Z
Duration: 380.8s

YARA Scanner

✓ 193 tool calls scanned, 0 violations detected

No violations: ✓ 193 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown
Author

Now I have enough context to produce the full evaluation.


PR Evaluation Report

Summary

This PR integrates PostHog into a React Native SaaS app using posthog-react-native. It adds SDK initialization with environment variable configuration, wraps the navigation with PostHogProvider, captures meaningful business events across auth/members/projects/teams sagas, sets up error tracking and logging, and calls posthog.reset() on sign-out. However, it is missing user identification (identify()) and automatic screen view tracking.

Files changed Lines added Lines removed
9 +129 -7

Confidence score: 5/5 🧙

  • Missing posthog.identify() call: The sign-in saga has access to the user's email (from the sign-in payload) but never calls posthog.identify(). All events are anonymous, making it impossible to associate events with specific users across sessions. [CRITICAL]
  • Missing screen view tracking: React Native does not autocapture screen views. The PostHogProvider should be configured with autocapture.captureScreens: true or a navigation observer must be registered. Without this, no screen view events are sent. [CRITICAL]
  • posthog.logger API may not exist on React Native SDK: The config file references posthog.logger.info() and posthog.logger.warn() — these are not documented methods on the posthog-react-native SDK. The correct method is posthog.captureLog() from posthog-js, but the React Native SDK may not expose a .logger property. This could cause runtime errors. [MEDIUM]

File changes

Filename Score Description
.env.example 4/5 Adds PostHog env vars with placeholder values
.gitignore 5/5 Adds .env to gitignore
package.json 4/5 Adds posthog-react-native and peer dependencies; extra deps like react-native-svg may be unnecessary
src/config/posthog.js 3/5 Initializes PostHog with error tracking and logging; logger API is questionable
src/routes.js 2/5 Wraps navigator with PostHogProvider but missing screen tracking configuration
src/store/modules/auth/sagas.js 2/5 Captures sign-in/sign-out events with reset() but no identify() call
src/store/modules/members/sagas.js 4/5 Captures member_roles_updated and member_invited events with properties
src/store/modules/projects/sagas.js 4/5 Captures project_created events with creation_mode
src/store/modules/teams/sagas.js 4/5 Captures team_created and team_selected events

App sanity check ⚠️

Criteria Result Description
App builds and runs Yes Dependencies are valid, syntax is correct
Preserves existing env vars & configs Yes No existing config modified, only additions
No syntax or type errors Yes All JS syntax is valid; however posthog.logger may cause runtime error
Correct imports/exports Yes All imports from posthog-react-native are correct
Minimal, focused changes Yes All changes relate to PostHog integration
Pre-existing issues None —

Issues

  • Questionable posthog.logger API: The posthogLogger wrapper in config/posthog.js references posthog.logger.info() and posthog.logger.warn(). The posthog-react-native SDK documents captureLog() but may not expose a .logger property with .info() and .warn() methods. This could cause a runtime crash when logging is attempted. [MEDIUM]

Other completed criteria

  • Environment variables documented in .env.example
  • .env added to .gitignore
  • Build configuration is valid (package.json is well-formed)
  • react-native-config properly used for env variable access

PostHog implementation ⚠️

Criteria Result Description
PostHog SDKs installed Yes posthog-react-native v4.84.3 added to package.json
PostHog client initialized Yes new PostHog(token, { host, ... }) in config/posthog.js with error tracking config
capture() Yes Multiple meaningful capture() calls across auth, members, projects, and teams sagas
identify() No No posthog.identify() call anywhere — all events remain anonymous
Error tracking Yes errorTracking.autocapture configured with uncaughtExceptions and unhandledRejections
Reverse proxy N/A Server-only concern; React Native SDK sends from the device, not a browser subject to ad blockers
Screen views No No screen tracking configured — React Native does not autocapture screen views
All targets initialized N/A No web/ directory; single React Native target only

Issues

  • No posthog.identify() call: The sign-in saga captures sign_in_succeeded but never identifies the user. The email is available in payload (passed to the saga), yet it's never used. This means all captured events are anonymous and cannot be linked to real users. At minimum, after successful sign-in: posthog.identify(userId, { email }). Since the API only returns a token and not a user ID, the email could serve as a fallback distinct_id, though a stable user ID from the backend would be better. [CRITICAL]
  • No screen view tracking: React Native requires explicit screen view registration. The PostHogProvider should include autocapture={{ captureScreens: true }} or a PostHogNavigationContainer should replace NavigationContainer to enable automatic screen tracking. Without this, zero screen view events are captured. [CRITICAL]

Other completed criteria

  • API key loaded from environment variable via react-native-config
  • Host correctly configured from environment variable
  • posthog.reset() correctly called on sign-out
  • Error tracking properly configured with uncaught exceptions and unhandled rejections

PostHog insights and events ⚠️

Filename PostHog events Description
src/config/posthog.js capturedExceptions Error tracking autocapture for uncaught exceptions and unhandled rejections
src/store/modules/auth/sagas.js sign_in_succeeded, signed_out Tracks sign-in (with method: demo/credentials) and sign-out with reset()
src/store/modules/members/sagas.js member_roles_updated, member_invited Tracks member management with mode and role_count properties
src/store/modules/projects/sagas.js project_created Tracks project creation with creation_mode property
src/store/modules/teams/sagas.js team_created, team_selected Tracks team creation and selection

Issues

  • Events lack user context: Without identify(), all these well-designed events are anonymous. Funnel analysis (sign_in → project_created → member_invited) would only work within a single anonymous session and cannot be tied to specific users. [CRITICAL]
  • No screen view events: Missing screen tracking means no page/screen-based analytics are possible. Cannot build funnels that include navigation patterns. [MEDIUM]

Other completed criteria

  • Events represent real user actions (sign-in, project creation, team creation, member invitation)
  • Events enable product insights (can build funnels like sign_in → project_created → team_created)
  • Events include relevant properties (sign_in_method, creation_mode, role_count, invitation_mode)
  • No PII in event properties — only modes and counts
  • Event names are descriptive and use consistent snake_case naming

Reviewed by wizard workbench PR evaluator

@wizard-ci-bot wizard-ci-bot Bot added the CI/CD label Oct 28, 2026
@wizard-ci-bot wizard-ci-bot Bot closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants