Repository navigation
[CI] (9da603e) tanstack-router/tanstack-router-code-based-saas - #4409
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 integrates PostHog into a TanStack Router code-based SPA using
Confidence score: 5/5 🧙
File changes
App sanity check ✅
IssuesNo issues in this section.
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js ^1.438.1 and @posthog/react ^1.11.3 added to package.json |
| PostHog client initialized | Yes | PostHogProvider with apiKey and options including api_host, defaults, capture_exceptions, logs, and debug |
| capture() | Yes | Four meaningful events: invoice_created, invoice_updated, user_logged_in, user_logged_out |
| identify() | No | No posthog.identify() call despite having a login flow with auth.login(username) |
| Error tracking | Yes | PostHogErrorBoundary wraps the app and capture_exceptions: true is set in init options |
| Reverse proxy | No | No reverse proxy configured; events sent directly to PostHog host |
Issues
- No user identification on login: The app captures
user_logged_inbut never callsposthog.identify(username). All events remain anonymous, defeating the purpose of tracking user behavior across sessions. Addposthog.identify(username)in theonSubmithandler afterauth.login(username). [CRITICAL] - No
posthog.reset()on logout: Both logout handlers (inProfileComponent) callauth.logout()withoutposthog.reset(). Subsequent users on the same browser inherit the previous identity. Addposthog.reset()alongsideauth.logout(). [CRITICAL] - No reverse proxy: Direct requests to PostHog are commonly blocked by ad blockers and privacy extensions. Set up a reverse proxy to improve event delivery reliability. [MEDIUM]
Other completed criteria
- API key loaded from
VITE_PUBLIC_POSTHOG_PROJECT_TOKENenv var (not hardcoded) - API host loaded from
VITE_PUBLIC_POSTHOG_HOSTenv var - Good defensive check: in DEV mode, throws an error if env vars are missing; in production, gracefully falls back to rendering children without PostHog
- Logs capture configured with
serviceNameandenvironment - Debug mode enabled only in development
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
src/main.tsx |
invoice_created |
Captured on successful invoice creation mutation — no properties attached |
src/main.tsx |
invoice_updated |
Captured on successful invoice update mutation — no properties attached |
src/main.tsx |
user_logged_in |
Captured after auth.login() — no user properties or identify call |
src/main.tsx |
user_logged_out |
Captured on logout button click (2 locations) — no reset call |
src/main.tsx |
captureException |
Via PostHogErrorBoundary wrapping + capture_exceptions: true for uncaught errors |
Issues
- Events have no contextual properties: Every
capture()call is bare — e.g.,posthog.capture('invoice_created')sends no invoice ID, amount, status, or other properties. This makes it impossible to segment, filter, or build meaningful insights beyond raw counts. Add relevant properties like{ invoice_id, total, status }. [MEDIUM]
Other completed criteria
- Events represent real user actions (login, logout, create/update invoices)
- Events enable product insights — can build a basic login → invoice creation funnel
- Event names use consistent
snake_caseconvention with descriptive action names - No PII placed in event properties
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:
9da603eApp:
tanstack-router/tanstack-router-code-based-saasApp directory:
apps/tanstack-router/tanstack-router-code-based-saasWorkbench branch:
wizard-ci-9da603e-tanstack-router-tanstack-router-code-based-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-10-06T16:05:50.403Z
Duration: 366.3s
YARA Scanner