Repository navigation
[CI] (137243f) tanstack-router/tanstack-router-code-based-saas - #1970
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
|
Now I have enough context to write the full evaluation. PR Evaluation ReportSummaryThis PR integrates PostHog into a TanStack Router code-based SaaS demo app. It adds
Confidence score: 3/5 🤔
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | No | posthog-js is not an explicit dependency — @posthog/react has it as a peer dependency, so depending on package manager behavior the build may fail |
| Preserves existing env vars & configs | Yes | Existing code preserved; only PostHog additions made |
| No syntax or type errors | Yes | All syntax is valid TypeScript/JSX |
| Correct imports/exports | Yes | PostHogProvider and usePostHog correctly imported from @posthog/react |
| Minimal, focused changes | Yes | All changes relate to PostHog integration |
| Pre-existing issues | None | Base app appears functional |
Issues
- Missing
posthog-jsin dependencies:@posthog/reactwrapsposthog-jsand expects it as a peer dependency. It should be explicitly listed inpackage.json. Add"posthog-js": "^1.x"to dependencies. [CRITICAL] - No
.env.example: Three environment variables are required but undocumented in committed files. Add a.env.examplewith placeholder values. [MEDIUM]
Other completed criteria
.envis correctly gitignored- Vite config is valid and uses
loadEnvproperly - Existing app code and configs are preserved
- TypeScript declarations added for Vite env
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | No | Only @posthog/react added; posthog-js (the core SDK) is missing from package.json |
| PostHog client initialized | Yes | PostHogProvider with apiKey and options in RootComponent, including defaults, capture_exceptions, and api_host pointing to reverse proxy |
| capture() | Yes | 6 meaningful capture calls: user_logged_in, user_logged_out, invoice_created, invoice_updated, upgrade_plan_clicked, team_member_viewed |
| identify() | Yes | Called on login with posthog.identify(username, { username }), and posthog.reset() on both logout paths. However, uses raw username string as distinct_id which is fragile |
| Error tracking | Yes | capture_exceptions: true in init options enables automatic exception autocapture |
| Reverse proxy | Yes | Vite dev-server proxy configured for /ingest, /ingest/static, /ingest/array with correct targets. Dev-only limitation noted |
Issues
- Missing
posthog-jsdependency: The core SDK is not inpackage.json.@posthog/reactdepends on it. [CRITICAL] - Username as
distinct_id:posthog.identify(username, { username })uses the raw form input as the distinct ID. This demo's "enter any username" pattern means distinct IDs are arbitrary strings that could collide or fragment. In a real app, a stable database ID should be used. [MEDIUM] - Dev-only reverse proxy: The Vite
server.proxyonly works in development. In production, the/ingestpath will not resolve without additional infrastructure (e.g., Vercel rewrites, nginx). [MEDIUM]
Other completed criteria
- API key loaded from
import.meta.env.VITE_PUBLIC_POSTHOG_PROJECT_TOKEN(not hardcoded) - Host configured via environment variable through reverse proxy
posthog.reset()correctly called on both logout pathsui_hostset to allow toolbar functionality through the proxydefaults: '2026-01-30'included per docs
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
src/main.tsx |
user_logged_in |
Captured on login form submission with { username } property |
src/main.tsx |
user_logged_out |
Captured on both logout buttons (profile page and login page) |
src/main.tsx |
invoice_created |
Captured in mutation onSuccess with { invoice_id, invoice_title } |
src/main.tsx |
invoice_updated |
Captured in mutation onSuccess with { invoice_id, invoice_title } |
src/main.tsx |
upgrade_plan_clicked |
Captured on upgrade button click, no properties |
src/main.tsx |
team_member_viewed |
Captured on team member link click with { user_id, user_name } |
src/main.tsx |
captureException (auto) |
Enabled via capture_exceptions: true in init config |
Issues
- PII in
team_member_viewedevent properties:user_name(a person's name) is sent as an event property. Names are PII and should be set via person properties (``), not incapture()event properties. [MEDIUM] - PII in
user_logged_inevent properties:usernameis sent as an event property. While also set as a person property viaidentify(), it should not be duplicated in the capture call's event properties. [LOW]
Other completed criteria
- Events represent real user actions (login, logout, create, update, view, upgrade)
- Events enable product insights — can build login→invoice_created funnel, upgrade conversion, team engagement trends
- Invoice events include enriched properties (invoice_id, invoice_title)
- Event names are descriptive and use consistent 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:
137243fApp:
tanstack-router/tanstack-router-code-based-saasApp directory:
apps/tanstack-router/tanstack-router-code-based-saasWorkbench branch:
wizard-ci-137243f-tanstack-router-tanstack-router-code-based-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-06-18T16:28:07.919Z
Duration: 346.5s