Repository navigation
[CI] (a5131dd) react-router/saas-template - #2490
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 to produce the evaluation. PR Evaluation ReportSummaryThis PR integrates PostHog into a React Router v7 framework-mode SaaS template with both client-side (
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | No syntax errors, correct imports, proper TypeScript |
| Preserves existing env vars & configs | Yes | Existing configs preserved, new vars added alongside existing ones |
| No syntax or type errors | Yes | All code is syntactically valid TypeScript/TSX |
| Correct imports/exports | Yes | All imports reference correct packages and paths |
| Minimal, focused changes | No | pastes.tsx has extensive reformatting (prop reordering, whitespace) mixed with PostHog changes |
| Pre-existing issues | None |
Issues
- Unnecessary reformatting in pastes.tsx: Alphabetical reordering of JSX props and object keys, whitespace changes, and code style modifications account for ~80 lines of the diff that are unrelated to PostHog integration. [LOW]
Other completed criteria
- Environment variables validated in
env.server.tsschema .envadded to.gitignore(good practice)ssr.noExternalcorrectly configured invite.config.tsper docs- All PostHog imports use correct package names
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js, @posthog/react, and posthog-node added to package.json |
| PostHog client initialized | Yes | Client: posthog.init() in entry.client.tsx with PostHogProvider. Server: middleware creates per-request PostHog Node client with withContext |
| capture() | Yes | 14 custom events across server actions and routes |
| identify() | Yes | posthog.identify(currentUser.id, { email, name }) in authenticated layout with real database user ID |
| Error tracking | Yes | posthog.captureException(error) in root ErrorBoundary |
| Reverse proxy | No | No reverse proxy configured; client-side requests go directly to us.i.posthog.com |
Issues
- No reverse proxy: Client-side PostHog requests will be blocked by ad blockers. Should configure Next.js-style rewrites or Vercel proxy. [MEDIUM]
- Stripe handlers use non-user distinct IDs: In
stripe-event-handlers.server.ts,subscription_startedusesevent.data.object.metadata.organizationIdasdistinctIdandsubscription_cancelleduses the Stripe customer ID. These create orphaned person profiles that don't correlate with actual users. The middleware'swithContextisn't available in webhook handlers, so these standalone PostHog instances also lack session correlation. [MEDIUM] - No .env.example updated: The
posthog-setup-report.mdacknowledges this as a TODO but the PR doesn't include an.env.exampleupdate. [MEDIUM]
Other completed criteria
- API key loaded from
import.meta.env.VITE_POSTHOG_PROJECT_TOKEN(client) andprocess.env.VITE_POSTHOG_PROJECT_TOKEN(server) - Host configured via
import.meta.env.VITE_POSTHOG_HOST/process.env.VITE_POSTHOG_HOST posthog.reset()called on logout in nav-user.tsxtracing_headersconfigured for server-side session correlation- Server middleware uses
posthog.withContext()andposthog.shutdown()correctly flushAt: 1andflushInterval: 0set for server-side instances per docs
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
register-action.server.ts |
user_registered |
Tracks email registration initiation |
auth.callback.ts |
user_logged_in, user_signed_up |
Tracks OAuth/magic-link login and new account creation |
logout.ts |
user_logged_out |
Tracks explicit sign-out |
onboarding-user-account-action.server.ts |
onboarding_profile_completed |
Tracks onboarding profile setup |
onboarding-organization-action.server.ts |
organization_created |
Tracks org creation during onboarding |
create-organization-action.server.ts |
organization_created |
Tracks org creation from app |
general-organization-settings-action.server.ts |
organization_deleted |
Tracks org deletion |
billing-action.server.ts |
subscription_checkout_started |
Tracks Stripe checkout initiation |
stripe-event-handlers.server.ts |
subscription_started, subscription_cancelled |
Tracks subscription lifecycle via webhooks |
pastes.tsx |
paste_created, paste_deleted |
Tracks core product CRUD actions |
account-settings-action.server.ts |
user_account_deleted |
Tracks account deletion |
_sidebar-layout.tsx |
identify() |
User identification on authenticated layout mount |
root.tsx |
captureException |
Error tracking in root error boundary |
nav-user.tsx |
reset() |
Session reset on logout |
Issues
- No critical or medium issues with event quality.
Other completed criteria
- Events represent real user actions mapping to actual product flows (registration → onboarding → subscription → product usage → deletion)
- Events enable product insights: signup funnel, subscription conversion, paste activity, churn analysis
- Events include relevant properties (organization_id, user_id, source, method, language, is_public, paste_id)
- No PII in capture properties — email/name only in identify() person properties
- Event names use consistent snake_case convention with descriptive action names
organization_createdevent distinguishes source viasourceproperty ("onboarding" vs "app")
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:
a5131ddApp:
react-router/saas-templateApp directory:
apps/react-router/saas-templateWorkbench branch:
wizard-ci-a5131dd-react-router-saas-templateWizard branch:
fix/warlock-smoke-test-remove-killswitchContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-07-07T22:10:57.248Z
Duration: 985.4s
YARA Scanner