Skip to content

[CI] (cef44b4) react-native/expo-react-native-hacker-news#1406

Closed
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
wizard-ci-cef44b4-react-native-expo-react-native-hacker-news
Closed

[CI] (cef44b4) react-native/expo-react-native-hacker-news#1406
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
wizard-ci-cef44b4-react-native-expo-react-native-hacker-news

Conversation

@wizard-ci-bot
Copy link
Copy Markdown

@wizard-ci-bot wizard-ci-bot Bot commented May 1, 2026

Automated wizard CI run

Source: context-mill-pr
Trigger ID: cef44b4
App: react-native/expo-react-native-hacker-news
App directory: apps/react-native/expo-react-native-hacker-news
Workbench branch: wizard-ci-cef44b4-react-native-expo-react-native-hacker-news
Wizard branch: main
Context Mill branch: basic-skills-v2
PostHog (MCP) branch: master
Timestamp: 2026-05-01T21:08:52.237Z
Duration: 412.0s

@wizard-ci-bot
Copy link
Copy Markdown
Author

wizard-ci-bot Bot commented May 1, 2026

PR Evaluation Report

Summary

This PR integrates PostHog into an Expo React Native Hacker News reader app using the posthog-react-native SDK. It adds a PostHog config module, wraps the app in PostHogProvider, implements manual screen tracking, and instruments 8 custom events across multiple components covering key user interactions like opening posts, upvoting, and navigating to external links.

Files changed Lines added Lines removed
9 +235 -27

Confidence score: 4/5 👍

  • No user identification implemented: There is no posthog.identify() call anywhere in the app. Even if the app lacks authentication, the wizard should have noted this gap or provided a placeholder for future auth integration. [MEDIUM]
  • No error tracking: There is no captureException() usage, no error boundary wrapping, and exception autocapture is not enabled in the PostHog config. [MEDIUM]
  • No .env.example committed: The .env file is correctly gitignored, but no .env.example or equivalent is committed to document required environment variables for other developers. [MEDIUM]

File changes

Filename Score Description
src/config/posthog.ts 4/5 New PostHog config using Expo Constants; graceful fallback when unconfigured
app/_layout.tsx 4/5 Wraps app in PostHogProvider with ScreenTracker for manual route tracking
app/[itemId].tsx 4/5 Adds 4 capture events to item detail interactions
components/posts/Post.tsx 4/5 Adds capture events for post interactions (open, upvote, external link)
components/Select.tsx 5/5 Clean story_type_changed event with transition properties
app.config.js 4/5 Replaces app.json with JS config to inject env vars via Expo Constants
package.json 5/5 Adds posthog-react-native dependency
.gitignore 5/5 Adds .env to gitignore
posthog-setup-report.md 3/5 Wizard artifact — not harmful but unnecessary in committed code

App sanity check ⚠️

Criteria Result Description
App builds and runs Yes All imports resolve correctly, no syntax issues
Preserves existing env vars & configs Yes Original app structure preserved; app.json replaced with equivalent app.config.js
No syntax or type errors Yes TypeScript types correct, proper optional chaining used
Correct imports/exports Yes posthog-react-native imports are correct for React Native
Minimal, focused changes Yes All changes relate to PostHog integration
Pre-existing issues None

Issues

  • No .env.example file: Environment variables (POSTHOG_PROJECT_TOKEN, POSTHOG_HOST) are not documented in a committed file. While app.config.js and the warning in posthog.ts hint at them, a .env.example should be included for discoverability. [MEDIUM]

Other completed criteria

  • Build configuration valid — package.json properly includes new dependency
  • posthog-setup-report.md is a wizard artifact but does not affect build
  • .gitignore correctly updated to exclude .env

PostHog implementation ⚠️

Criteria Result Description
PostHog SDKs installed Yes posthog-react-native ^4.44.0 added to package.json
PostHog client initialized Yes new PostHog(apiKey, { host, disabled, captureAppLifecycleEvents, debug }) in src/config/posthog.ts, wrapped in PostHogProvider in _layout.tsx
capture() Yes 8 meaningful events across 4 files
identify() No No posthog.identify() call exists anywhere. No posthog.reset() on logout either.
Error tracking No No captureException(), no error boundary, capture_exceptions not enabled in config
Reverse proxy N/A React Native app — ad blockers don't apply to native mobile apps

Issues

  • Missing identify(): No user identification is implemented. Even though this is a Hacker News reader without built-in auth, the wizard should have either added identification scaffolding or documented the gap. Without identify, all events are anonymous and cannot be linked across devices or sessions. [MEDIUM]
  • Missing error tracking: No error boundary wrapping the app, no captureException() calls in try/catch blocks, and exception autocapture is not enabled. The PostHogProvider could be wrapped with error handling, or capture_exceptions: true could be passed to the PostHog config. [MEDIUM]

Other completed criteria

  • API key loaded from environment variable via Expo Constants extras
  • Host correctly configured from environment variable
  • Graceful fallback when PostHog is not configured (disabled mode with warning)
  • captureAppLifecycleEvents: true enabled for lifecycle tracking
  • Debug mode enabled in development via __DEV__
  • Manual screen tracking via ScreenTracker component using posthog.screen()
  • PostHogProvider wraps the entire app with touch autocapture enabled

PostHog insights and events ✅

Filename PostHog events Description
app/_layout.tsx screen (via posthog.screen()) Tracks every screen navigation with previous screen context and route params
components/posts/Post.tsx post_opened, external_link_opened, post_upvoted Captures post list interactions — opening posts, clicking external links, upvoting
app/[itemId].tsx author_profile_viewed, item_upvoted, item_link_opened, parent_item_viewed Captures item detail interactions — viewing author, upvoting, opening links, navigating to parent
components/Select.tsx story_type_changed Tracks feed type switching with from/to transition properties

Issues

None — events are well-structured and actionable.

Other completed criteria

  • Events represent real user actions (upvote, open post, navigate, switch feed)
  • Events enable product insights — can build engagement funnels (post_opened → item_link_opened), retention analysis, feed preference breakdowns
  • All events include relevant properties (item_id, item_title, url, score, from_type/to_type)
  • No PII in event properties — only item metadata and navigation context
  • Consistent snake_case naming convention throughout

Reviewed by wizard workbench PR evaluator

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