[CI] (6fb03e7) tanstack-router/tanstack-router-code-based-saas#1492
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
[CI] (6fb03e7) tanstack-router/tanstack-router-code-based-saas#1492wizard-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 code-based SaaS app ("CloudFlow"). It adds
Confidence score: 4/5 👍
File changes
App sanity check ✅
Issues
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js@^1.373.4 and @posthog/react@^1.9.0 added to package.json |
| PostHog client initialized | Yes | posthog.init() at module level with PostHogProvider wrapping RootComponent; capture_pageview: false with manual SPA pageview via router.subscribe('onResolved') |
| capture() | Yes | 6 custom events: user_logged_in, user_logged_out, invoice_created, invoice_updated, plan_upgrade_clicked, team_member_viewed, plus manual `` |
| identify() | Yes | Called on login with username as distinct_id; posthog.reset() called on both logout paths |
| Error tracking | Yes | capture_exceptions: true in init config enables exception autocapture |
| Reverse proxy | Yes | Vite dev proxy routes /ingest/static and /ingest/array to us-assets.i.posthog.com, /ingest to us.i.posthog.com |
Issues
- Reverse proxy is dev-only: The Vite
server.proxyonly works during development. A production deployment would need its own reverse proxy (e.g., Vercel rewrites, Cloudflare, nginx). Not a code error but worth noting. [LOW]
Other completed criteria
- API key loaded from
import.meta.env.VITE_PUBLIC_POSTHOG_PROJECT_TOKENenvironment variable ui_hostcorrectly set tous.posthog.com(UI host, not API host) with env var fallbackposthog.reset()correctly called on both logout paths (profile page and login page)capture_pageview: falsecorrectly disables automatic pageview to avoid duplicates with manual SPA pageview trackingdefaults: '2026-01-30'config snapshot includeddebug: import.meta.env.DEVenables debug logging only in development
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
src/main.tsx |
user_logged_in |
Fired on login form submission with username property; identify() called with username |
src/main.tsx |
user_logged_out |
Fired on sign-out from both profile and login pages; reset() called after |
src/main.tsx |
invoice_created |
Fired on successful invoice creation with invoice_id and title properties |
src/main.tsx |
invoice_updated |
Fired on successful invoice update with invoice_id and title properties |
src/main.tsx |
plan_upgrade_clicked |
Fired when user clicks the Upgrade button on account settings |
src/main.tsx |
team_member_viewed |
Fired when a user clicks on a team member with user_id and user_name properties |
src/main.tsx |
`` | Captured on every route resolution via router.subscribe('onResolved') |
src/main.tsx |
captureException (auto) |
Enabled via capture_exceptions: true in init config |
Issues
- PII in event properties (
user_logged_in):usernameis included as an event property inposthog.capture('user_logged_in', { username }). Sinceusernameis already used as thedistinct_idin theidentify()call on the line above, it is redundant and places identifying information in event properties. Remove{ username }from the capture call. [MEDIUM] - PII in event properties (
team_member_viewed):user_name(a person's name) is included in event properties. Person names should be set via person properties, not incapture(). Consider replacing with justuser_idor moving name to `` on the viewed person's profile. [MEDIUM]
Other completed criteria
- Events represent real user actions mapped to actual product flows (login, invoice CRUD, plan upgrade, team browsing)
- Events enable product insights — can build login-to-invoice funnels, upgrade intent trends, team engagement analysis, and retention charts
- Events include relevant contextual properties (invoice IDs, titles, user IDs)
- Event names are descriptive and follow consistent
snake_caseconvention
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: scheduled
Trigger ID:
6fb03e7App:
tanstack-router/tanstack-router-code-based-saasApp directory:
apps/tanstack-router/tanstack-router-code-based-saasWorkbench branch:
wizard-ci-6fb03e7-tanstack-router-tanstack-router-code-based-saasWizard branch:
mainContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-05-13T17:52:40.640Z
Duration: 454.3s