Repository navigation
[CI] (cc5471b) tanstack-router/tanstack-router-code-based-saas - #4794
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 adds PostHog integration to a TanStack Router code-based SaaS app (client-only React SPA). It installs
Confidence score: 5/5 🧙
File changes
App sanity check ✅
IssuesNo issues.
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | @posthog/react ^1.11.3 added to dependencies |
| PostHog client initialized | Yes | PostHogProvider with apiKey and options including api_host, defaults, capture_exceptions |
| capture() | Yes | Five meaningful capture calls across login, logout, invoice CRUD, and upgrade |
| identify() | No | Never called despite app having full auth with auth.login(username) |
| Error tracking | Yes | PostHogErrorBoundary wraps app + capture_exceptions: true in config |
| Reverse proxy | No | Not configured; client-only app would benefit from it |
Issues
- Missing
posthog.identify(): The app authenticates users viaauth.login(username)but never callsposthog.identify(). This means all events stay anonymous, preventing user-level analytics, session replay attribution, and cross-session tracking. Should callposthog.identify(username, { ... })immediately afterauth.login()in theonSubmithandler. [CRITICAL] - Missing
posthog.reset()on logout:auth.logout()is invoked in two places (ProfileComponentandLoginComponent) butposthog.reset()is never called. Without reset, the next user inherits the previous user's identity. Addposthog.reset()before or afterauth.logout(). [CRITICAL] - No reverse proxy: No proxy configuration (e.g., Vite rewrites) to route PostHog requests through the app's domain. Events are sent directly to
us.i.posthog.comand may be blocked by ad blockers. [MEDIUM] - Potentially invalid
posthog.logger.info()API: The code callsposthog?.logger.info(...)which is not documented in the PostHog JS SDK reference. The documented method isposthog.captureLog(). This may silently fail at runtime. [MEDIUM] - Older
defaultssnapshot: Usesdefaults: '2026-01-30'instead of the latest'2026-08-30'. Not a bug, but misses newer default configuration improvements. [LOW]
Other completed criteria
- API key loaded from environment variable (
VITE_PUBLIC_POSTHOG_PROJECT_TOKEN) - Host loaded from environment variable (
VITE_PUBLIC_POSTHOG_HOST) - Graceful degradation when env vars are missing (renders app without PostHog in production, throws in dev)
- Error boundary properly wraps the app layout
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
src/main.tsx |
invoice_created |
Captured on successful invoice creation mutation |
src/main.tsx |
invoice_updated |
Captured on successful invoice update mutation |
src/main.tsx |
upgrade_clicked |
Captured on upgrade button click in profile |
src/main.tsx |
user_logged_in |
Captured on login form submission |
src/main.tsx |
user_logged_out |
Captured on logout (2 locations) |
src/main.tsx |
captureException |
Via PostHogErrorBoundary wrapping the app |
Issues
- Events lack contextual properties: All
posthog.capture()calls are bare with no properties. For example,invoice_createdshould include invoice details (title, amount),upgrade_clickedshould include current plan info. Without properties, events offer limited analytical value for breakdowns and filtering. [MEDIUM] user_logged_incaptured beforeauth.login()completes: The capture fires beforeauth.login(username)executes, so if login fails, a false positive event is recorded. Should capture after successful login. [LOW]
Other completed criteria
- Events represent real user actions (login, logout, CRUD, upgrade)
- Events enable product insights (login → invoice create → invoice update funnel possible)
- No PII in event properties
- Event names use consistent snake_case convention and are descriptive
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:
cc5471bApp:
tanstack-router/tanstack-router-code-based-saasApp directory:
apps/tanstack-router/tanstack-router-code-based-saasWorkbench branch:
wizard-ci-cc5471b-tanstack-router-tanstack-router-code-based-saasWizard branch:
mainContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-10-28T17:05:33.853Z
Duration: 373.5s
YARA Scanner