[CI] (6b2dc8b) react-router/react-router-v7-project - #3738
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
[CI] (6b2dc8b) react-router/react-router-v7-project#3738wizard-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. Let me produce the evaluation. PR Evaluation ReportSummaryThis PR integrates PostHog into a React Router v7 framework-mode app by adding
Confidence score: 5/5 🧙
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | No syntax/type errors; posthog-js only imported client-side or via dynamic import |
| Preserves existing env vars & configs | Yes | No existing config modified; only additions |
| No syntax or type errors | Yes | All TypeScript is valid |
| Correct imports/exports | Yes | posthog-js imported correctly in client-only file and via dynamic import() elsewhere |
| Minimal, focused changes | Yes | All changes directly related to PostHog integration |
| Pre-existing issues | vite.config.ts missing ssr.noExternal for posthog-js |
The React Router v7 framework mode docs recommend ssr: { noExternal: ['posthog-js'] } in vite.config.ts. However, since posthog-js is only imported in entry.client.tsx (a client-only file) and via dynamic imports, this may not cause issues in practice. |
Issues
- Missing
ssr.noExternalconfig: The React Router v7 framework mode docs recommend addingssr: { noExternal: ['posthog-js'] }tovite.config.ts. Sinceposthog-jsis only used in client-only contexts here, this likely won't cause build failures, but it's a deviation from the recommended pattern. [LOW]
Other completed criteria
- Environment variables documented in
.env.example package.jsonhas valid dependency entry forposthog-js- Existing app code and structure preserved
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js: ^1.424.0 added to package.json |
| PostHog client initialized | Yes | posthog.init() in entry.client.tsx with api_host, defaults: "2026-05-30", and capture_exceptions config |
| capture() | Yes | 6 distinct capture calls: login_completed, signup_completed, logout_completed, country_claimed, country_liked, country_visited |
| identify() | Yes | posthog.identify(user.id, { email, name }) on login, signup, and page load; posthog.reset() on logout and account switch |
| Error tracking | Yes | capture_exceptions configured in init with capture_unhandled_errors: true and capture_unhandled_rejections: true |
| Reverse proxy | No | No reverse proxy configured |
Issues
- ErrorBoundary not capturing exceptions: The existing
ErrorBoundaryinroot.tsxcatches React rendering errors but does not callposthog.captureException(error). Thecapture_exceptionsconfig in init only handles window-level unhandled errors/rejections — errors caught by React's error boundary never reach window.onerror and are silently lost. Addposthog.captureException(error)in the ErrorBoundary component. [MEDIUM] - No reverse proxy: No reverse proxy is configured (via Vite rewrites, Vercel rewrites, or managed proxy). Client-side PostHog events are directly sent to
us.i.posthog.comand will be blocked by common ad blockers. [MEDIUM] - Missing
@posthog/reactpackage: The React Router v7 framework mode docs recommend installing@posthog/reactalongsideposthog-jsand usingPostHogProvider. The PR uses direct imports instead, which works but misses out onusePostHog,PostHogErrorBoundary, and feature flag hooks. [LOW]
Other completed criteria
- API key loaded from
VITE_PUBLIC_POSTHOG_PROJECT_TOKENenv variable (not hardcoded) - API host loaded from
VITE_PUBLIC_POSTHOG_HOSTenv variable - Dev-only validation errors thrown when env vars are missing
- Account-switching handled correctly:
reset()called beforeidentify()when switching users posthog.reset()called on logout- Identify called on page load for returning users
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
AuthContext.tsx |
login_completed, signup_completed, logout_completed |
Full auth lifecycle tracking with identify/reset; enables auth funnel analysis |
AuthContext.tsx |
posthog.identify(), posthog.reset() |
User identification with user.id as distinct_id, email and name as person properties |
countries.tsx |
country_claimed, country_liked, country_visited |
Core product interaction events with enriched properties (country_name, region, count) |
entry.client.tsx |
captureException (auto) |
Unhandled errors and promise rejections auto-captured via capture_exceptions config |
Issues
- No issues with event quality.
Other completed criteria
- Events represent real user actions (auth flow + country interactions)
- Events enable product insights (auth funnel, country engagement trends, retention by region)
- Events include enriched properties (country_name, region, running counts)
- No PII in capture properties — email/name correctly placed in identify person properties
- Event names are descriptive, 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:
6b2dc8bApp:
react-router/react-router-v7-projectApp directory:
apps/react-router/react-router-v7-projectWorkbench branch:
wizard-ci-6b2dc8b-react-router-react-router-v7-projectWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-09-01T15:58:16.029Z
Duration: 465.9s
YARA Scanner