[CI] (6b2dc8b) tanstack-router/tanstack-router-code-based-saas - #3740
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
[CI] (6b2dc8b) tanstack-router/tanstack-router-code-based-saas#3740wizard-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-js ^1.424.0 and @posthog/react ^1.10.5 added to package.json |
| PostHog client initialized | Yes | PostHogProvider wraps the root component with apiKey and api_host from env vars; capture_exceptions and debug mode configured |
| capture() | Yes | 5 custom events: invoice_created, invoice_updated, subscription_upgrade_started, user_logged_in, user_logged_out |
| identify() | No | App has auth system with auth.login(username) but never calls posthog.identify() or posthog.reset() |
| Error tracking | Yes | PostHogErrorBoundary wraps app content + capture_exceptions with capture_unhandled_errors and capture_unhandled_rejections enabled |
| Reverse proxy | No | No proxy configured; browser requests go directly to PostHog host |
Issues
- Missing user identification: The app has a login flow (
auth.login(username)) and exposesusernamein route context, but never callsposthog.identify(). All events remain anonymous, making it impossible to build user-level funnels or retention charts. Callposthog.identify(username, { username })immediately after login, andposthog.reset()before logout. [CRITICAL] - No reverse proxy: Client-side PostHog requests will be blocked by ad blockers. Configure a reverse proxy (e.g., via Vite dev server proxy + hosting rewrites) to route through a first-party domain. Both
/static/*and/array/*must route to the assets origin. [MEDIUM] - Outdated
defaultsvalue: Thedefaultsoption is set to'2026-01-30'but the latest documented value is'2026-05-30'. This means the SDK uses older default settings. [LOW]
Other completed criteria
- API key loaded from
VITE_PUBLIC_POSTHOG_PROJECT_TOKENenv var (not hardcoded) - API host loaded from
VITE_PUBLIC_POSTHOG_HOSTenv var - Graceful fallback: if env vars are missing,
PostHogRootrenders children without PostHog (no crash in production) - Dev-mode throws helpful errors when env vars are missing
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
src/main.tsx |
invoice_created |
Captured on successful invoice creation with invoice_id property |
src/main.tsx |
invoice_updated |
Captured on successful invoice update with invoice_id property |
src/main.tsx |
subscription_upgrade_started |
Captured on upgrade button click — no properties |
src/main.tsx |
user_logged_in |
Captured after login — no properties |
src/main.tsx |
user_logged_out |
Captured before logout (2 locations) — no properties |
src/main.tsx |
captureException |
Via PostHogErrorBoundary and capture_exceptions config for unhandled errors/rejections |
Issues
- Bare event captures:
user_logged_in,user_logged_out, andsubscription_upgrade_startedhave no properties. Adding context (e.g.,{ username }for login/logout,{ current_plan: 'free' }for upgrade) would significantly improve analytical value. [MEDIUM]
Other completed criteria
- Events represent real user actions (login, logout, invoice CRUD, upgrade intent)
- Events enable product insights — can build login → create invoice → upgrade funnel
- No PII in event properties (only
invoice_id) - Event naming is descriptive and consistently uses
snake_case
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:
6b2dc8bApp:
tanstack-router/tanstack-router-code-based-saasApp directory:
apps/tanstack-router/tanstack-router-code-based-saasWorkbench branch:
wizard-ci-6b2dc8b-tanstack-router-tanstack-router-code-based-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-09-01T16:02:52.553Z
Duration: 361.3s
YARA Scanner