[CI] (f475df7) tanstack-router/tanstack-router-code-based-saas#2028
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
[CI] (f475df7) tanstack-router/tanstack-router-code-based-saas#2028wizard-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) React SPA ("CloudFlow") by adding
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | Syntax is valid, types should resolve with vite/client types added |
| Preserves existing env vars & configs | Yes | No existing env vars or configs were modified destructively |
| No syntax or type errors | Yes | All changes use valid TypeScript/JSX syntax |
| Correct imports/exports | Yes | PostHogProvider, usePostHog correctly imported from @posthog/react |
| Minimal, focused changes | Yes | All changes are PostHog-related, no scope creep |
| Pre-existing issues | None | — |
Issues
- No
.env.examplecommitted: The required environment variables (VITE_PUBLIC_POSTHOG_PROJECT_TOKEN,VITE_PUBLIC_POSTHOG_HOST,VITE_PUBLIC_POSTHOG_ASSET_HOST) are documented only in the setup report. A.env.examplefile should be committed so collaborators know what to set. [MEDIUM]
Other completed criteria
.gitignoreupdated to exclude.envtsconfig.jsoncorrectly updated withvite/clienttypespackage.jsonhas correct dependency entries- Build script (
vite build && tsc --noEmit) should still work
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js@^1.392.0 and @posthog/react@^1.10.3 added to dependencies |
| PostHog client initialized | Yes | PostHogProvider wraps root component with apiKey, api_host, defaults, capture_exceptions, and debug options |
| capture() | Yes | 12 meaningful capture calls across all major user flows |
| identify() | Yes | posthog.identify(username, { username }) on login, posthog.reset() on both logout paths |
| Error tracking | Yes | capture_exceptions: true enabled in PostHogProvider options |
| Reverse proxy | Yes | Vite dev-server proxy configured with correct /ingest/static, /ingest/array, /ingest routing pattern |
Issues
- Reverse proxy is dev-only: The
server.proxyinvite.config.jsonly runs duringvite dev. Production builds serve static files with no proxy, soapi_host: '/ingest'will fail in production unless hosting-layer proxy (nginx, Cloudflare, Vercel rewrites) is separately configured. This is not documented in the report. [MEDIUM]
Other completed criteria
- API key loaded from
import.meta.env.VITE_PUBLIC_POSTHOG_PROJECT_TOKEN(not hardcoded) - Host configured via
/ingestreverse proxy withui_hostfallback - Proxy correctly routes
/ingest/staticand/ingest/arrayto asset host,/ingestto ingest host posthog.reset()called on both logout paths (profile page and login page)defaults: '2026-01-30'set per current SDK best practices
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
src/main.tsx |
user_signed_in, user_signed_out |
Authentication flow tracking with identify/reset |
src/main.tsx |
invoice_created, invoice_creation_failed |
Invoice creation success/failure funnel |
src/main.tsx |
invoice_updated, invoice_update_failed |
Invoice update success/failure tracking |
src/main.tsx |
invoice_viewed, invoice_notes_toggled |
Invoice detail engagement tracking |
src/main.tsx |
plan_upgrade_clicked |
Revenue signal — upgrade button click |
src/main.tsx |
team_member_viewed, team_members_filtered, team_members_sorted |
Team browsing behavior tracking |
src/main.tsx |
captureException (via capture_exceptions: true) |
Automatic exception autocapture |
Issues
- PII in
team_member_viewedevent: The event sendsuser_name(a person's name) as an event property. Per PostHog best practices, names are PII and should be set via person properties (identify()or ``), not incapture()event properties. Remove `user_name` from the capture call or move it to person properties. [MEDIUM]
Other completed criteria
- Events represent real user actions (login, invoice CRUD, team browsing, plan upgrade)
- Events enable product insights — can build invoice creation funnel, auth trends, upgrade conversion
- Events include relevant properties (invoice_id, invoice_title, sort_by, filter_by, action)
- Event names are descriptive, consistent snake_case naming convention
- Success/failure event pairs enable error rate monitoring
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:
f475df7App:
tanstack-router/tanstack-router-code-based-saasApp directory:
apps/tanstack-router/tanstack-router-code-based-saasWorkbench branch:
wizard-ci-f475df7-tanstack-router-tanstack-router-code-based-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-06-22T18:55:21.192Z
Duration: 2559.5s