Repository navigation
[CI] (f51b3be) react-native/expo-react-native-hacker-news - #2642
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
wizard-ci-bot[bot] wants to merge 1 commit into
Conversation
Author
|
Now I have enough context. This is a React Native (Expo) app — not a web React app. The framework detection says "javascript_web, react" but it's actually React Native. Let me evaluate accordingly. PR Evaluation ReportSummaryThis PR integrates PostHog into an Expo React Native Hacker News app using the
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | All imports resolve, correct SDK used for React Native |
| Preserves existing env vars & configs | Yes | Existing config preserved, PostHog additions are additive |
| No syntax or type errors | Yes | Code is syntactically valid TypeScript/TSX |
| Correct imports/exports | Yes | posthog-react-native correctly used throughout (not posthog-js) |
| Minimal, focused changes | Yes | All changes relate to PostHog integration |
| Pre-existing issues | None | Base app appears functional |
Issues
- app.json string interpolation: The
""syntax inapp.jsonis not standard JSON interpolation — this only works withapp.config.js/app.config.ts. However, the code inlib/posthog.tshas a fallback toprocess.env.EXPO_PUBLIC_POSTHOG_KEY, so the app will still work. [LOW]
Other completed criteria
- Environment variables documented in setup report (though no
.env.examplefile created) - Build configuration is valid with correct peer dependencies added
- Code follows existing codebase patterns and naming conventions
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-react-native@^4.55.0 added with peer deps (expo-application, expo-device, expo-file-system, expo-localization) |
| PostHog client initialized | Yes | Correct React Native initialization pattern in lib/posthog.ts using new PostHog() with host, lifecycle events, and debug mode |
| capture() | Yes | Multiple meaningful capture calls across components |
| identify() | N/A | App has no authentication — it's a read-only Hacker News browser |
| Error tracking | Yes | captureException() used for failed item loads and story feed errors |
| Reverse proxy | N/A | React Native app — reverse proxy is not applicable for mobile SDKs |
Issues
- No .env.example: The
.envfile exists with a real API key but no.env.exampletemplate was created for documentation purposes. The setup report acknowledges this as a TODO. [MEDIUM]
Other completed criteria
- API key loaded from environment variable via Expo Constants and process.env fallback
- API host correctly configured pointing to
https://us.i.posthog.com - PostHogProvider correctly wraps the app with autocapture configuration
- Manual screen tracking implemented with previous screen reference
- Graceful degradation when env vars are missing (disabled mode)
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
app/_layout.tsx |
`` (via posthog.screen()) |
Manual screen tracking with previous screen context and route params |
app/index.tsx |
story_type_selected |
Fires when story type changes (but also on mount — see issues) |
app/[itemId].tsx |
item_detail_viewed, comment_author_opened, story_external_link_opened, parent_item_opened, captureException |
Item detail view tracking with metadata, interaction tracking in handlers, error capture for missing items |
app/users/[userId].tsx |
user_profile_viewed |
Profile view with karma and about metadata |
components/posts/Post.tsx |
story_opened, story_comments_opened, story_external_link_opened |
Navigation and external link tracking in press handlers |
components/posts/Posts.tsx |
story_feed_loaded, captureException |
Feed load tracking and error capture for failed queries |
components/comments/comment.tsx |
comment_author_opened, comment_thread_opened |
Comment interaction tracking in press handlers |
components/comments/comments.tsx |
comment_thread_loaded |
Comment thread load tracking |
components/posts/user-activities/UserActivities.tsx |
user_activities_loaded |
User activity list load tracking |
Issues
- useEffect for story_type_selected: In
app/index.tsx, thestory_type_selectedevent fires inside auseEffectwatchingstoryType. This fires on initial component mount with the default value"topstories", creating a misleading event that looks like the user actively selected a story type. The event should be captured in theonChangehandler ofStoriesSelect. [MEDIUM] - Noisy data-loaded events: Events like
story_feed_loaded,comment_thread_loaded, anduser_activities_loadedfire inuseEffecthooks watching data arrays. These can re-fire when data references change (e.g., React Query background refetches). They represent system behavior, not user actions, and will create noise. [MEDIUM]
Other completed criteria
- Events represent real user actions (navigation, link clicks, profile views) when placed in handlers
- Events enable product insights — can build funnel from feed → story → comments → external link
- Events include relevant properties (item_id, item_type, source, url_host, comment counts)
- No PII in event properties — only item IDs, types, and counts
- Event names are descriptive and follow consistent snake_case convention
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:
f51b3beApp:
react-native/expo-react-native-hacker-newsApp directory:
apps/react-native/expo-react-native-hacker-newsWorkbench branch:
wizard-ci-f51b3be-react-native-expo-react-native-hacker-newsWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-07-09T22:37:43.396Z
Duration: 258.5s
YARA Scanner