[CI] (6b2dc8b) react-router/rrv7-starter - #3737
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
Conversation
Author
PR Evaluation ReportSummaryThis PR integrates PostHog into a React Router v7 (framework mode) starter app. It adds
Confidence score: 5/5 🧙
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | Dependencies added, imports valid, no syntax errors. Existing vite.config bundles all in production (noExternal: true) so SSR build should work |
| Preserves existing env vars & configs | Yes | Existing VITE_SITE_URL preserved; vite.config.ts untouched |
| No syntax or type errors | Yes | All TypeScript types correct, optional chaining used consistently |
| Correct imports/exports | Yes | usePostHog from @posthog/react, posthog-js default import are correct |
| Minimal, focused changes | Yes | All changes relate to PostHog; the FollowButton refactor is a minor cleanup related to the capture integration |
| Pre-existing issues | None | - |
Issues
- Dev mode SSR externalization: The vite.config.ts has
noExternal: ['gsap']in dev mode, but the PostHog docs for React Router v7 framework mode recommend adding'posthog-js'and'@posthog/react'tonoExternal. Static imports ofusePostHogin route components are processed during SSR. This likely works because@posthog/reactdoesn't access browser globals at import time, but it deviates from the docs. [LOW]
Other completed criteria
- Environment variables documented in
.env.example - TypeScript types added in
env.d.ts - Build configuration valid —
package.jsonhas correct dependency entries
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js ^1.424.0 and @posthog/react ^1.10.5 added to package.json |
| PostHog client initialized | Yes | posthog.init() called with api_host, defaults: '2026-05-30', and capture_exceptions config. Uses dynamic imports in custom provider |
| capture() | Yes | Four meaningful capture calls across three components |
| identify() | No | No posthog.identify() call anywhere in the codebase. No posthog.reset() on logout either |
| Error tracking | Yes | PostHogErrorBoundary wraps the app; capture_exceptions configured with capture_unhandled_errors: true and capture_unhandled_rejections: true |
| Reverse proxy | No | No reverse proxy, rewrites, or middleware configured |
Issues
- Missing identify(): No
posthog.identify()call exists. Even though this demo app uses fake data, the recommended pattern is to identify users when auth data is available. ThefakeUserin the profile page could serve as a placeholder for whereidentify()should be called. [MEDIUM] - Missing reverse proxy: No reverse proxy configured. For a client-only app using
posthog-js, a reverse proxy (e.g., via Vite rewrites or the managed proxy) is recommended to prevent ad blockers from intercepting events. [MEDIUM] - Non-standard lazy initialization: PostHog is loaded via dynamic
import()inside auseEffect, meaning it is not available on the first render. Early user interactions before the async load completes will be silently dropped. The React Router v7 framework mode docs recommend initializing inentry.client.tsxfor immediate availability. [MEDIUM]
Other completed criteria
- API key loaded from environment variable (
VITE_PUBLIC_POSTHOG_PROJECT_TOKEN) - API host loaded from environment variable (
VITE_PUBLIC_POSTHOG_HOST) - Helpful dev-mode error thrown when env vars are missing
- Optional chaining (
posthog?.capture) used consistently to guard against uninitialized state
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
app/components/PostCard.tsx |
post_like_toggled |
Tracks when a user likes/unlikes a post with post_id and liked state |
app/routes/buy-followers.tsx |
follower_package_selected, follower_purchase_completed |
Tracks package selection and purchase completion with amount, bonus, total, and price properties — forms a natural funnel |
app/routes/profile.tsx |
follow_back_toggled |
Tracks follow/unfollow actions with following boolean state |
app/components/posthog-provider.tsx |
captureException (via ErrorBoundary) |
Captures unhandled errors and rejections via PostHogErrorBoundary and capture_exceptions config |
Issues
No event quality issues.
Other completed criteria
- Events represent real user actions (like, select, purchase, follow)
- Events enable product insights —
follower_package_selected→follower_purchase_completedis a clear funnel - Events include relevant properties (post_id, package_amount, price, totals, states)
- No PII in event properties
- Event names are descriptive and follow consistent
snake_caseconvention
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:
6b2dc8bApp:
react-router/rrv7-starterApp directory:
apps/react-router/rrv7-starterWorkbench branch:
wizard-ci-6b2dc8b-react-router-rrv7-starterWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-09-01T15:57:33.718Z
Duration: 409.4s
YARA Scanner