[CI] (e2f7ab0) react-native/expo-react-native-hacker-news#2428
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
[CI] (e2f7ab0) react-native/expo-react-native-hacker-news#2428wizard-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 into an Expo React Native Hacker News reader app by adding the
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | Syntax is valid, imports resolve, peer deps added |
| Preserves existing env vars & configs | Yes | Existing app logic preserved; only additions |
| No syntax or type errors | Yes | All code syntactically valid |
| Correct imports/exports | Yes | posthog-react-native imports are correct (usePostHog, PostHogProvider, default PostHog) |
| Minimal, focused changes | No | posthog-setup-report.md is an unnecessary artifact |
| Pre-existing issues | None | N/A |
Issues
- No .env.example committed: The
.envfile exists locally but isn't listed in changed files, and no.env.exampleis committed. Collaborators won't know which environment variables (EXPO_PUBLIC_POSTHOG_KEY,EXPO_PUBLIC_POSTHOG_HOST) are required. [MEDIUM] - Unnecessary report file:
posthog-setup-report.mdis a wizard artifact that doesn't belong in the committed codebase. [LOW]
Other completed criteria
- App builds without syntax errors — all TypeScript/JSX is valid
- Existing app functionality preserved — no existing behavior broken
- Correctly adds
expo-application,expo-device,expo-file-system,expo-localizationas peer dependencies ofposthog-react-native - Removed unused
isFetchingNextPagedestructuring (confirmed no remaining usage in codebase)
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-react-native@^4.54.4 added to package.json with required peer deps |
| PostHog client initialized | Yes | lib/posthog.ts creates instance with env vars, passed to PostHogProvider in _layout.tsx |
| capture() | Yes | 14 custom events captured across stories, comments, and user profiles |
| identify() | N/A | App is a read-only Hacker News reader with no authentication system |
| Error tracking | No | No captureException, error boundary, or exception autocapture configured |
| Reverse proxy | N/A | React Native app — reverse proxy is not applicable |
Issues
- No error tracking: No error boundary, no
captureExceptioncalls, and nocapture_exceptionsconfig option. For a React Native app, PostHog supports exception autocapture and manualcaptureException(). Neither is implemented. [CRITICAL]
Other completed criteria
- API key correctly loaded from
EXPO_PUBLIC_POSTHOG_KEYenvironment variable - Host correctly loaded from
EXPO_PUBLIC_POSTHOG_HOSTenvironment variable - PostHogProvider correctly wraps the app with
client={posthog} - Manual screen tracking implemented with pathname deduplication via
useRef - Touch autocapture enabled with
captureTouches: true - App lifecycle events enabled with
captureAppLifecycleEvents: true - Graceful degradation when env vars are missing (
disabled: !isPostHogConfigured)
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
app/_layout.tsx |
screen (via posthog.screen()) |
Manual screen tracking on route changes with previous screen context |
components/posts/Posts.tsx |
story_list_loaded, story_feed_paginated |
Tracks story feed loads and infinite scroll pagination |
components/Select.tsx |
story_type_selected |
Tracks category filter changes (top, new, best, etc.) |
components/posts/Post.tsx |
story_opened, story_link_opened |
Tracks story detail navigation and external link opens |
app/[itemId].tsx |
story_details_loaded, story_author_opened, story_link_opened, comment_replied_context_opened |
Tracks detail view loads, author profile opens, and parent comment navigation |
components/comments/comment.tsx |
comment_opened |
Tracks opening nested comments |
components/comments/comments.tsx |
comment_thread_loaded, comment_thread_paginated |
Tracks comment thread loads and pagination |
app/users/[userId].tsx |
user_profile_loaded |
Tracks user profile screen loads |
components/posts/user-activities/UserActivities.tsx |
user_activities_loaded, user_activities_paginated |
Tracks user activity feed loads and pagination |
Issues
- useEffect-based analytics produce duplicate events: Events like
story_list_loaded,comment_thread_loaded, anduser_profile_loadedare captured insideuseEffectwith dependency arrays that include mutable references (posts,comments,posthog). These fire on every data reference change, not just on initial load. For example,story_list_loadedfires again wheneverpostsuseMemo recalculates (on every new infinite query page), making it indistinguishable from a pagination event. [MEDIUM] story_link_openedduplicated: The same event name is used in bothPost.tsxand[itemId].tsxwith slightly different property shapes, which can cause confusion in analytics. [LOW]
Other completed criteria
- Events use consistent snake_case naming convention
- Events include rich contextual properties (item_id, score, comment_count, etc.)
- No PII in event properties — only HN public identifiers like author IDs
- Event names are descriptive and map to real product flows (story browsing, commenting, user profiles)
- Pagination tracking uses
useRefto avoid re-firing for already-tracked pages - Events enable product insights — can build funnels from story_list → story_opened → story_link_opened
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: wizard-pr
Trigger ID:
e2f7ab0App:
react-native/expo-react-native-hacker-newsApp directory:
apps/react-native/expo-react-native-hacker-newsWorkbench branch:
wizard-ci-e2f7ab0-react-native-expo-react-native-hacker-newsWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-07-06T22:10:27.916Z
Duration: 303.7s
YARA Scanner