Skip to content

[CI] (137243f) react-native/expo-react-native-hacker-news - #1967

Closed
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-137243f-react-native-expo-react-native-hacker-news
Closed

wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-137243f-react-native-expo-react-native-hacker-news

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: wizard-pr
Trigger ID: 137243f
App: react-native/expo-react-native-hacker-news
App directory: apps/react-native/expo-react-native-hacker-news
Workbench branch: wizard-ci-137243f-react-native-expo-react-native-hacker-news
Wizard branch: release-please--branches--main--components--wizard
Context Mill branch: main
PostHog (MCP) branch: master
Timestamp: 2026-06-18T16:26:14.903Z
Duration: 376.5s

@wizard-ci-bot

wizard-ci-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown
Author

Now I have everything I need. Let me produce the evaluation.


PR Evaluation Report

Summary

This PR integrates PostHog into an Expo React Native Hacker News app. It adds a PostHog config file, wraps the app with PostHogProvider, adds manual screen tracking and 12 custom event captures across feed, story detail, comment, and user profile screens. However, the posthog-react-native SDK is never added to package.json, meaning the app will not build.

Files changed Lines added Lines removed
10 +295 -31

Confidence score: 2/5 ❌

  • posthog-react-native not added to package.json: The PR imports from posthog-react-native and PostHog from posthog-react-native across 6 files, but the dependency was never added to package.json. The app will fail to install/build. [CRITICAL]
  • No .env.example or documentation for env vars: POSTHOG_PROJECT_TOKEN and POSTHOG_HOST are required but there is no .env.example file and no README update. Developers cloning this repo won't know what env vars to set. [MEDIUM]
  • No user identification: There is no posthog.identify() call anywhere in the codebase. While this is a Hacker News reader (no auth), identification should at minimum be noted as absent. [MEDIUM]
  • No error tracking: No captureException() or error boundary is set up. [MEDIUM]
  • app.config.js duplicates app.json: Both app.json and app.config.js exist. Expo will use app.config.js when present, but the duplicate app.json could cause confusion. The original app.json should have been removed or noted. [LOW]

File changes

Filename Score Description
src/config/posthog.ts 3/5 New PostHog client initialization with env-based config via Expo Constants; good dev warning, but uses 'placeholder_key' fallback
app/_layout.tsx 4/5 Wraps app with PostHogProvider, adds manual screen tracking with previous screen reference
app/[itemId].tsx 3/5 Adds 5 capture events for story detail interactions; uses useEffect for story_viewed which is acceptable for page-view-like tracking
app/index.tsx 4/5 Clean event handler wrapping for feed filter changes
components/posts/Post.tsx 4/5 Adds capture events for story open, external link, and upvote actions in event handlers
components/comments/comment.tsx 4/5 Adds capture events for comment author tap and replies opened
app/users/[userId].tsx 3/5 Adds user_profile_viewed event via useEffect
app.config.js 3/5 Expo config with PostHog env vars in extra; duplicates existing app.json
.gitignore 5/5 Correctly adds .env to gitignore
.posthog-events.json 5/5 Good documentation of all tracked events

App sanity check ❌

Criteria Result Description
App builds and runs No posthog-react-native is not in package.json — all imports will fail
Preserves existing env vars & configs Yes Existing code structure preserved; app.json still exists alongside new app.config.js
No syntax or type errors Yes Code syntax is valid TypeScript/JSX
Correct imports/exports No Imports from posthog-react-native which is not a declared dependency
Minimal, focused changes Yes All changes relate to PostHog integration
Pre-existing issues None Base app appears functional

Issues

  • Missing posthog-react-native dependency: The package is imported in 6 files but never added to package.json. Run npx expo install posthog-react-native to fix. [CRITICAL]
  • No .env.example file: POSTHOG_PROJECT_TOKEN and POSTHOG_HOST env vars are required but undocumented. Create an .env.example with placeholder values. [MEDIUM]

Other completed criteria

  • .env correctly added to .gitignore
  • PostHog config properly reads from Expo Constants
  • Layout restructuring is clean and preserves existing UI

PostHog implementation ⚠️

Criteria Result Description
PostHog SDKs installed No posthog-react-native is not in package.json dependencies
PostHog client initialized Yes new PostHog(apiKey, { host, ... }) in src/config/posthog.ts, passed to PostHogProvider in layout
capture() Yes 12 meaningful capture calls across feed, detail, comment, and profile screens
identify() N/A App is a read-only Hacker News reader with no authentication
Error tracking No No captureException() calls or error boundaries configured
Reverse proxy N/A React Native app — reverse proxy not applicable

Issues

  • SDK not in package.json: posthog-react-native must be added as a dependency for the integration to work. [CRITICAL]
  • No error tracking: No error boundary or captureException() is set up. The PostHogProvider does not automatically capture exceptions in React Native — a custom error boundary with posthog.captureException() should be added. [MEDIUM]

Other completed criteria

  • API key loaded from environment variable via Expo Constants (process.env.POSTHOG_PROJECT_TOKEN → app.config.js extra → Constants.expoConfig.extra)
  • Host correctly configured to https://us.i.posthog.com
  • Good dev-mode warning when PostHog is not configured
  • captureAppLifecycleEvents: true enabled
  • Manual screen tracking implemented with previous screen tracking

PostHog insights and events ✅

Filename PostHog events Description
app/index.tsx story_feed_filtered Tracks filter type changes with previous/new type — enables filter usage analysis
components/posts/Post.tsx story_opened, story_external_link_opened, story_upvote_tapped Core feed interaction events with story context properties
app/[itemId].tsx story_viewed, story_detail_external_link_opened, story_detail_upvote_tapped, story_author_profile_tapped, parent_story_navigated Detail page engagement events — enables funnel from feed to detail
components/comments/comment.tsx comment_replies_opened, comment_author_profile_tapped Comment interaction tracking with reply counts
app/users/[userId].tsx user_profile_viewed Profile page view tracking
app/_layout.tsx screen (via posthog.screen()) Automatic screen view tracking with previous screen context

Issues

  • No issues with event quality.

Other completed criteria

  • Events represent real user actions (browsing stories, opening links, upvoting, viewing profiles)
  • Events enable product insights: feed→detail funnel, external link click-through, upvote engagement, comment thread depth
  • Events include relevant properties (story_id, story_title, score, comment_count, url, source)
  • No PII in event properties (only HN usernames which are public handles)
  • 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