Repository navigation
[CI] (9da603e) react-router/saas-template - #4408
Closed
wizard-ci-bot[bot] wants to merge 3 commits into
Closed
wizard-ci-bot[bot] wants to merge 3 commits into
wizard-ci-bot[bot] wants to merge 3 commits 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 SaaS template application. It adds client-side initialization in
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Missing ssr.noExternal config for posthog-js in vite.config.ts may cause SSR bundling issues |
|
| Preserves existing env vars & configs | Yes | Existing env vars and configs preserved; PostHog vars added as optional |
| No syntax or type errors | Yes | All code is syntactically correct |
| Correct imports/exports | Yes | posthog-js and posthog-js/react imports are valid |
| Minimal, focused changes | Yes | All changes relate to PostHog integration |
| Pre-existing issues | None | No pre-existing issues observed |
Issues
- Missing
ssr.noExternalfor posthog-js in vite.config.ts: Components like_authenticated-routes-layout.tsx,nav-user.tsx, and others importusePostHogfromposthog-js/reactand are server-rendered by React Router. Per the framework mode docs, addssr: { noExternal: ['posthog-js'] }tovite.config.tsto prevent SSR bundling errors. [MEDIUM]
Other completed criteria
- Environment variables documented in
.env.examplewithVITE_PUBLIC_POSTHOG_PROJECT_TOKENandVITE_PUBLIC_POSTHOG_HOST - Env schema in
env.server.tsmarks PostHog vars as optional, preventing app crashes without PostHog - CSP correctly updated with
connect-src,script-src, andworker-srcdirectives - Build configuration valid with posthog-js in package.json dependencies
.envadded to.gitignoreto prevent secret leakage
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js ^1.438.1 added to package.json |
| PostHog client initialized | Yes | posthog.init() in entry.client.tsx with defaults: "2026-05-30", wrapped in PostHogProvider |
| capture() | Yes | 10+ meaningful capture calls across subscription, org, onboarding, and team flows |
| identify() | Yes | posthog.identify(loaderData.id, { email }) in authenticated layout using stable auth user ID |
| Error tracking | Yes | PostHogErrorBoundary wraps entire app in entry.client.tsx |
| Reverse proxy | No | No reverse proxy or rewrite rules configured |
Issues
- No reverse proxy configured: PostHog requests go directly to
us.i.posthog.com(or configured host), making them susceptible to ad blockers. Configure a reverse proxy via React Router rewrites, Vercel rewrites, or PostHog's managed proxy service. [MEDIUM]
Other completed criteria
- API key loaded from environment variable (
window.ENV.VITE_PUBLIC_POSTHOG_PROJECT_TOKEN) - API host correctly configured from environment variable (
window.ENV.VITE_PUBLIC_POSTHOG_HOST) posthog.reset()called on logout innav-user.tsx- Identify uses stable
user.idfrom auth system with email as person property — correct pattern - Ref guard in identify prevents redundant calls on re-renders
- Dev-only error thrown when PostHog env vars missing — good DX
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
entry.client.tsx |
PostHogErrorBoundary (captureException) |
Captures unhandled React errors across the entire app |
_authenticated-routes-layout.tsx |
identify |
Identifies authenticated users with stable user ID and email |
nav-user.tsx |
reset() |
Resets PostHog identity on logout |
create-subscription-modal-content.tsx |
subscription_checkout_started |
Tracks billing interval and tier selection — enriched with properties |
create-organization-form-card.tsx |
organization_created |
Tracks organization creation |
general-organization-settings.tsx |
organization_settings_saved |
Tracks org settings updates |
invite-by-email-card.tsx |
team_invite_submitted |
Tracks team email invitations |
invite-link-card.tsx |
invite_link_copied, invite_link_created, invite_link_deactivated |
Tracks invite link lifecycle |
account-settings.tsx |
account_settings_saved |
Tracks account settings updates |
onboarding/organization.tsx |
onboarding_organization_submitted |
Tracks onboarding organization step |
onboarding/user-account.tsx |
onboarding_user_account_submitted |
Tracks onboarding user account step |
Issues
- Most events lack enriched properties: Only
subscription_checkout_startedincludes contextual properties (billing_interval,tier). Other events likeorganization_created,team_invite_submitted, etc. are bare captures with no properties. Adding properties likeorganization_id,invite_method, oronboarding_stepwould enable richer analysis. [LOW]
Other completed criteria
- Events represent real user actions mapping to actual product flows (subscription, onboarding, team management)
- Events enable product insights — can build onboarding funnel, subscription conversion funnel, team growth tracking
- No PII in capture properties — email only passed as person property via identify
- 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:
9da603eApp:
react-router/saas-templateApp directory:
apps/react-router/saas-templateWorkbench branch:
wizard-ci-9da603e-react-router-saas-templateWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-10-06T16:04:17.793Z
Duration: 586.5s
YARA Scanner