Skip to content

[CI] (ac3676a) react-router/rrv7-starter - #2504

Closed
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-ac3676a-react-router-rrv7-starter
Closed

wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-ac3676a-react-router-rrv7-starter

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: wizard-pr
Trigger ID: ac3676a
App: react-router/rrv7-starter
App directory: apps/react-router/rrv7-starter
Workbench branch: wizard-ci-ac3676a-react-router-rrv7-starter
Wizard branch: fix/warlock-smoke-test-remove-killswitch
Context Mill branch: main
PostHog (MCP) branch: master
Timestamp: 2026-07-08T13:06:46.014Z
Duration: 619.5s

YARA Scanner

✓ 58 tool calls scanned, 0 violations detected

No violations: ✓ 58 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown
Author

PR Evaluation Report

Summary

This PR integrates PostHog into a React Router v7 framework mode app ("CloutHub" - a satirical fake influencer social network). It adds posthog-js and @posthog/react as dependencies, initializes PostHog in entry.client.tsx with PostHogProvider, adds 8 custom events across purchase funnel and social engagement flows, implements error tracking via ErrorBoundary, and configures a Vite dev server reverse proxy.

Files changed Lines added Lines removed
17 +196 -142

Confidence score: 4/5 👍

  • Reverse proxy is dev-only: The Vite server.proxy config only works during development (vite dev). In production, there is no reverse proxy configured — requests will go directly to us.i.posthog.com, defeating the purpose. A proper production proxy (e.g., Vercel rewrites, Nginx config, or a server middleware) is needed. [CRITICAL]
  • __add_tracing_headers is not a documented public API option: The init config uses __add_tracing_headers instead of the documented tracing_headers option. The double-underscore prefix suggests an internal/private API that may break. [MEDIUM]
  • No identify() call: There is no posthog.identify() call anywhere in the app. While this is a demo app without real auth, the docs state "Identifying users is required." No identification means events cannot be linked to known users. [MEDIUM]
  • No .env.example file updated: The PR adds VITE_PUBLIC_POSTHOG_PROJECT_TOKEN and VITE_PUBLIC_POSTHOG_HOST env vars but does not create or update a .env.example file. The setup report even calls this out as a TODO. [MEDIUM]

File changes

Filename Score Description
app/entry.client.tsx 3/5 New file initializing PostHog with PostHogProvider. Uses undocumented __add_tracing_headers instead of tracing_headers.
app/root.tsx 4/5 Adds error tracking via captureException in ErrorBoundary — correct pattern for framework mode.
app/components/PostCard.tsx 4/5 Adds post_liked/post_unliked events with post_id property in click handler.
app/components/header.tsx 4/5 Adds buy_followers_nav_clicked event on navigation link click.
app/routes/home.tsx 4/5 Adds CTA click events with location property.
app/routes/buy-followers.tsx 5/5 Well-instrumented purchase funnel with package selection and purchase events with rich properties.
app/routes/profile.tsx 4/5 Adds user_followed event in click handler.
vite.config.ts 2/5 Reverse proxy only works in dev mode. SSR noExternal config is correct.
package.json 5/5 Correctly adds posthog-js and @posthog/react dependencies.
env.d.ts 5/5 Properly declares PostHog env var types for Vite.
posthog-setup-report.md 4/5 Good documentation of events and next steps.

App sanity check ⚠️

Criteria Result Description
App builds and runs Yes No syntax errors; dependencies added correctly; SSR noExternal configured properly
Preserves existing env vars & configs Yes Existing configs preserved; PostHog additions are additive
No syntax or type errors Yes All JSX/TSX is valid; types declared in env.d.ts
Correct imports/exports Yes @posthog/react and posthog-js imports are correct
Minimal, focused changes No Gratuitous reformatting across many files (collapsing multiline JSX, removing trailing newlines, whitespace changes)
Pre-existing issues None —

Issues

  • Unnecessary reformatting: Many files contain cosmetic changes (collapsing multiline JSX attributes, removing trailing newlines, whitespace normalization) unrelated to PostHog. This adds noise to the diff and makes code review harder. [LOW]
  • No .env.example updated: New environment variables VITE_PUBLIC_POSTHOG_PROJECT_TOKEN and VITE_PUBLIC_POSTHOG_HOST are not documented in any .env.example file. [MEDIUM]

Other completed criteria

  • Build configuration updated correctly (SSR noExternal includes posthog-js and @posthog/react)
  • TypeScript env declarations added for new env vars
  • Package dependencies properly versioned

PostHog implementation ⚠️

Criteria Result Description
PostHog SDKs installed Yes posthog-js ^1.398.3 and @posthog/react ^1.10.3 added to package.json
PostHog client initialized Yes Initialized in entry.client.tsx with PostHogProvider wrapping the app — correct pattern for React Router v7 framework mode
capture() Yes 8 meaningful capture calls across multiple components and routes
identify() No No posthog.identify() call anywhere. While no real auth exists, the app has a fake user concept that could be used for identification
Error tracking Yes posthog?.captureException(error) in root ErrorBoundary — correct pattern per docs
Reverse proxy No Vite server.proxy only applies during development. No production proxy configured (e.g., Vercel rewrites). The api_host in init is set via env var, but no production proxy endpoint is referenced

Issues

  • Dev-only reverse proxy: The Vite server.proxy configuration in vite.config.ts only works during vite dev. In production builds, there is no proxy — PostHog requests go directly to us.i.posthog.com. A production reverse proxy (Vercel rewrites, server middleware, or CDN rewrites) is required. [CRITICAL]
  • Undocumented init option: __add_tracing_headers is used instead of the documented tracing_headers option. This appears to be an internal API (double-underscore prefix convention). Should use tracing_headers: [window.location.hostname, 'localhost'] per the docs. [MEDIUM]
  • Missing identify(): No user identification is implemented. The docs state this is required to link events to known users. Even for a demo app, calling posthog.identify() with the fake user's ID would demonstrate the pattern correctly. [MEDIUM]
  • Outdated defaults date: Uses defaults: '2026-01-30' instead of the more recent '2026-05-30' shown in current documentation. [LOW]

Other completed criteria

  • API key loaded from environment variable (import.meta.env.VITE_PUBLIC_POSTHOG_PROJECT_TOKEN)
  • Host configured from environment variable (import.meta.env.VITE_PUBLIC_POSTHOG_HOST)
  • SSR noExternal correctly includes posthog-js and @posthog/react to avoid SSR errors
  • Proxy routes /ingest/static and /ingest/array correctly target us-assets.i.posthog.com

PostHog insights and events ✅

Filename PostHog events Description
app/routes/home.tsx view_feed_cta_clicked, buy_followers_cta_clicked Hero section CTA clicks with location: 'hero' property
app/components/header.tsx buy_followers_nav_clicked Navigation header CTA click
app/routes/buy-followers.tsx follower_package_selected, followers_purchased Purchase funnel events with rich properties (package_index, follower_amount, bonus_amount, total_followers, price)
app/components/PostCard.tsx post_liked, post_unliked Social engagement events with post_id property
app/routes/profile.tsx user_followed Social follow action
app/root.tsx captureException Error tracking in ErrorBoundary

Issues

  • user_followed lacks properties: The user_followed event has no properties (e.g., username of the followed user). This limits analytical usefulness. [LOW]

Other completed criteria

  • Events represent real user actions mapping to product flows (purchase funnel, social engagement, navigation)
  • Events enable product insights — can build funnel from CTA click → package selection → purchase
  • Purchase events include rich properties (price, amounts, package details)
  • No PII in event properties
  • Event names are descriptive and use consistent snake_case convention

Reviewed by wizard workbench PR evaluator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants