Repository navigation
[CI] (8dccaac) tanstack-router/tanstack-router-file-based-saas - #2372
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
PR Evaluation ReportSummaryThis PR integrates PostHog into a TanStack Router file-based SaaS app (React client-only). It adds
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | No syntax or structural errors introduced |
| Preserves existing env vars & configs | Yes | Existing code preserved; only PostHog additions made |
| No syntax or type errors | Yes | Valid TypeScript/JSX throughout |
| Correct imports/exports | Yes | @posthog/react and posthog-js imports are correct |
| Minimal, focused changes | Yes | All changes are PostHog-related |
| Pre-existing issues | None | — |
Issues
- Missing .env.example:
VITE_PUBLIC_POSTHOG_PROJECT_TOKENandVITE_PUBLIC_POSTHOG_HOSTare not documented in any example env file. New contributors won't know which variables to set. [MEDIUM]
Other completed criteria
- .gitignore correctly updated to exclude .env
- tsconfig.json updated with vite/client types for proper import.meta.env typing
- Build configuration remains valid with proxy additions
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js@^1.396.5 and @posthog/react@^1.10.3 added to dependencies |
| PostHog client initialized | Yes | PostHogProvider in __root.tsx with apiKey from env, capture_exceptions enabled |
| capture() | Yes | 8 meaningful events across 5 route files |
| identify() | Yes | Called on login with username; reset() on logout |
| Error tracking | Yes | capture_exceptions: true in PostHogProvider options enables exception autocapture |
| Reverse proxy | Yes | Vite dev-server proxy at /ingest with correct /static and /array routes to us-assets.i.posthog.com |
Issues
- Returning users not re-identified:
identify()is only called on login form submit. Users who return with an active session browse anonymously until they explicitly log out and back in. Add an identify call in the root route (or an auth-aware wrapper) whenauth.status === 'loggedIn'. [MEDIUM] - Dev-only reverse proxy: The Vite
server.proxyonly applies during development. Production deployments need a separate proxy configuration (e.g., Nginx, Cloudflare, Vercel rewrites). This is noted but not addressed. [LOW]
Other completed criteria
- API key loaded from
import.meta.env.VITE_PUBLIC_POSTHOG_PROJECT_TOKEN(not hardcoded) - Host correctly configured via reverse proxy with
ui_hostfallback - Reverse proxy routes both
/ingest/staticand/ingest/arrayto assets origin posthog.reset()correctly called beforeauth.logout()
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
login.tsx |
user_signed_in, user_signed_out |
Tracks auth lifecycle; identify on login, reset on logout |
dashboard.invoices..tsx |
invoice_viewed, invoice_updated, invoice_notes_toggled |
Invoice detail page interactions; viewed on mount, updated on save |
dashboard.invoices.index.tsx |
invoice_created |
Tracks new invoice creation in onSuccess callback |
_auth.profile.tsx |
upgrade_clicked |
Conversion intent signal with current plan context |
dashboard.users.route.tsx |
team_member_sorted |
Tracks sort preference changes |
Issues
- PII in event properties (
username):user_signed_inanduser_signed_outevents include{ username }as an event property. Sinceposthog.identify(username, { username })already sets this as a person property, the username should be removed from capture() properties. PII belongs in person properties only. [CRITICAL] - User-generated content in event properties (
title):invoice_created,invoice_updated, andinvoice_viewedevents include the invoicetitleas an event property. This is user-generated content that should not be in event properties per PostHog best practices. Useinvoice_idalone for correlation. [MEDIUM]
Other completed criteria
- Events represent real user actions mapped to actual product flows (auth, invoicing, upgrade, team management)
- Events enable product insights: sign-in → invoice view → invoice create funnel is possible
- Events include relevant contextual properties (invoice_id, sort_by, current_plan, notes_visible)
- Event names are descriptive and consistently use 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:
8dccaacApp:
tanstack-router/tanstack-router-file-based-saasApp directory:
apps/tanstack-router/tanstack-router-file-based-saasWorkbench branch:
wizard-ci-8dccaac-tanstack-router-tanstack-router-file-based-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-07-03T01:00:01.008Z
Duration: 407.9s
YARA Scanner