[CI] (6b2dc8b) react-router/shopper - #3739
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 e-commerce ("shopper") app. It adds
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | No | Missing ssr.noExternal config in vite.config.ts may cause SSR errors in framework mode |
| Preserves existing env vars & configs | Yes | No existing code removed; cart functionality intact |
| No syntax or type errors | Yes | All syntax is valid TypeScript/TSX |
| Correct imports/exports | Yes | All imports from posthog-js and @posthog/react are correct |
| Minimal, focused changes | Yes | Only PostHog-related additions |
| Pre-existing issues | None | — |
Issues
- Missing
ssr.noExternalinvite.config.ts: React Router v7 framework mode requiresssr: { noExternal: ['posthog-js', '@posthog/react'] }invite.config.tsto prevent Vite from externalizing these packages during SSR bundling. Without this, the app may fail with SSR import errors. Add the config tovite.config.ts. [MEDIUM]
Other completed criteria
- Environment variables documented in
.env.example - Graceful fallback when PostHog env vars are missing (app renders without PostHog)
- Dev-mode throws helpful errors when env vars are missing
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js ^1.424.0 and @posthog/react ^1.10.5 in package.json |
| PostHog client initialized | Yes | posthog.init() in entry.client.tsx with api_host and defaults: "2026-05-30" |
| capture() | Yes | 6 meaningful capture calls across cart context and route components |
| identify() | No | No identify call anywhere despite checkout form collecting name/email |
| Error tracking | Yes | PostHogErrorBoundary wraps the HydratedRouter in entry.client.tsx |
| Reverse proxy | No | No reverse proxy configured via rewrites or middleware |
Issues
- No user identification: The checkout form collects
firstName,lastName, andemailbut never callsposthog.identify(). All events are anonymous, making it impossible to track users across sessions or link to person profiles. Addposthog.identify(userId, { email, name })after form submission or login. [MEDIUM] - No reverse proxy: No rewrite rules or middleware proxy configured. Client-side PostHog requests go directly to
us.i.posthog.comand may be blocked by ad blockers. Configure a reverse proxy via React Router rewrites or a managed proxy. [MEDIUM]
Other completed criteria
- API key loaded from environment variables (not hardcoded)
- Host correctly configured from environment variables
- PostHogErrorBoundary provides error tracking
- Conditional initialization handles missing config gracefully
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
app/context/CartContext.tsx |
product_added_to_cart, cart_item_removed, cart_quantity_updated |
Tracks all cart mutations with product_id, category, quantity, and price properties |
app/routes/cart.tsx |
checkout_started |
Captures checkout initiation with cart_item_count and cart_value |
app/routes/checkout.tsx |
order_placed |
Captures completed orders with order_item_count and order_value (includes tax) |
app/routes/products.tsx |
product_category_filtered |
Tracks category filter selections |
app/entry.client.tsx |
capturedExceptions (via PostHogErrorBoundary) |
Automatic exception capture for unhandled React errors |
Issues
- No issues with event quality. Events form a complete e-commerce funnel (browse → filter → add to cart → modify cart → checkout → order).
Other completed criteria
- Events represent real user actions mapping to actual shopping flows
- Events enable product insights (funnel from browse → add to cart → checkout → purchase)
- Events include rich contextual properties (product_id, category, quantities, values)
- No PII in event properties
- Consistent snake_case naming convention throughout
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/shopperApp directory:
apps/react-router/shopperWorkbench branch:
wizard-ci-6b2dc8b-react-router-shopperWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-09-01T15:59:35.008Z
Duration: 342.2s
YARA Scanner