[CI] (6fb03e7) react-native/expo-react-native-hacker-news#1479
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
[CI] (6fb03e7) react-native/expo-react-native-hacker-news#1479wizard-ci-bot[bot] wants to merge 1 commit into
wizard-ci-bot[bot] wants to merge 1 commit into
Conversation
Author
PR Evaluation ReportSummaryThis PR integrates PostHog analytics into an Expo React Native Hacker News client app. It adds the
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | Dependencies and imports are correct for Expo/React Native |
| Preserves existing env vars & configs | Yes | Existing app.json is extended via app.config.js, no configs deleted |
| No syntax or type errors | Yes | Code is syntactically valid; TypeScript types handled correctly |
| Correct imports/exports | Yes | All imports from posthog-react-native and expo-constants are correct |
| Minimal, focused changes | Yes | All changes are PostHog-related; peer deps (expo-application, expo-device, expo-file-system, expo-localization) are required by posthog-react-native |
| Pre-existing issues | None |
Issues
- Unsafe
new URL()parsing: InPost.tsxand[itemId].tsx,new URL(url).hostis called without a try/catch. Ifurlis malformed (e.g., a relative path or atext:scheme), this will throw and crash the press handler. Wrap in try/catch or use optional chaining with a fallback. [MEDIUM] - No
.env.example: The app requiresPOSTHOG_PROJECT_TOKENandPOSTHOG_HOSTenv vars, but no.env.examplefile was created. Developers cloning the repo won't know what env vars to set. [MEDIUM]
Other completed criteria
- All changes are relevant to PostHog integration
- Correct files modified for Expo React Native architecture
- Code follows existing codebase patterns (press handlers, component structure)
.envadded to.gitignoreto prevent secret leakage
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-react-native@^4.45.5 added with required peer deps |
| PostHog client initialized | Yes | Singleton in lib/posthog.ts using new PostHog(apiKey, { host, ... }) with PostHogProvider in _layout.tsx |
| capture() | Yes | 7 distinct events across 4 files with enriched properties |
| identify() | N/A | App is a read-only Hacker News reader with no authentication |
| Error tracking | No | No captureException(), no error boundary, no exception autocapture configured |
| Reverse proxy | N/A | React Native mobile app — reverse proxy not applicable |
Issues
- No error tracking: The integration does not set up any form of error tracking. For a React Native app,
captureExceptioncould be called in error boundaries or a global error handler. ThePostHogProviderautocapture config does not enable exception capture. [MEDIUM]
Other completed criteria
- API key loaded from environment variable via
expo-constants— not hardcoded - Host correctly configured from environment variable
- Manual screen tracking via
posthog.screen()on route changes usingusePathname captureAppLifecycleEvents: trueenabled for app lifecycle tracking- Touch autocapture enabled (
captureTouches: true) - Graceful no-op when PostHog is not configured (disabled mode with dev warning)
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
components/posts/Post.tsx |
post_clicked, external_link_opened, comments_opened |
Tracks post interactions: title taps (internal vs external), comment button taps, and link button taps |
components/Select.tsx |
story_type_changed |
Tracks story filter changes with from/to values |
app/[itemId].tsx |
user_profile_viewed, item_external_link_opened, comment_thread_navigated |
Tracks detail page interactions: profile views, external links, and parent navigation |
components/comments/comment.tsx |
user_profile_viewed |
Tracks username taps from comment context |
app/_layout.tsx |
screen (via posthog.screen()) |
Manual screen tracking on every route change with previous screen context |
Issues
None — events are well-structured and actionable.
Other completed criteria
- Events represent real user actions (post clicks, link opens, filter changes, navigation)
- Events enable product insights (content engagement funnel, external link rate, story preferences)
- All events include enriched properties (item_id, url, host, source, title, comment_count)
- No PII in event properties — only public Hacker News usernames and URLs
- Event names are descriptive and use consistent snake_case naming
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/expo-react-native-hacker-newsApp directory:
apps/react-native/expo-react-native-hacker-newsWorkbench branch:
wizard-ci-6fb03e7-react-native-expo-react-native-hacker-newsWizard branch:
mainContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-05-13T17:36:16.601Z
Duration: 449.5s