Repository navigation
[CI] (9da603e) tanstack-router/tanstack-router-file-based-saas - #4410
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 file-based SaaS demo app (client-only SPA). It adds
Confidence score: 5/5 🧙
File changes
App sanity check ✅
IssuesNo app sanity issues.
|
| 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, and logs config |
| capture() | Yes | Four custom events: user_logged_in, user_logged_out, invoice_created, invoice_updated |
| identify() | No | Never called — login handler calls auth.login(username) and posthog.capture('user_logged_in') but never posthog.identify() |
| Error tracking | Yes | PostHogErrorBoundary wraps children, capture_exceptions: true in init options |
| Reverse proxy | No | No reverse proxy configured for this client-only app |
Issues
- Missing
posthog.identify()on login: The login handler atlogin.tsx:26callsauth.login(username)— the username is available — then capturesuser_logged_in, but never callsposthog.identify(username). All events remain anonymous, breaking user-level analytics, session replay attribution, and person profiles. Addposthog.identify(username, { name: username })after the login call. [CRITICAL] - Missing
posthog.reset()on logout: The logout handler atlogin.tsx:63-68capturesuser_logged_outbut never callsposthog.reset(). Without this, the next user on the same browser inherits the previous user's identity. Addposthog.reset()after the logout event capture. [MEDIUM] - No reverse proxy: Client-side events from posthog-js can be blocked by ad blockers. Consider configuring Vite rewrites or a managed reverse proxy. [MEDIUM]
Other completed criteria
- API key loaded from environment variable (
VITE_PUBLIC_POSTHOG_PROJECT_TOKEN) - API host loaded from environment variable (
VITE_PUBLIC_POSTHOG_HOST) - Dev-mode guard in
PostHogRootthrows a helpful error if env vars are missing PostHogErrorBoundarywraps the entire app treecapture_exceptions: trueenables automatic exception capture- Logger integration (
posthog.logger.info()) provides structured log entries
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
__root.tsx |
captureException (via ErrorBoundary) |
Captures uncaught React errors via PostHogErrorBoundary |
login.tsx |
user_logged_in, user_logged_out |
Tracks login and logout actions; lacks identify/reset calls |
dashboard.invoices..tsx |
invoice_updated |
Fires on successful invoice mutation; no properties attached |
dashboard.invoices.index.tsx |
invoice_created |
Fires on successful invoice creation; no properties attached |
Issues
- Events lack enriching properties:
invoice_updatedandinvoice_createdare bare captures with no contextual properties.invoice_updatedshould include at minimum{ invoice_id: invoice.id }(the invoice data is available viaRoute.useLoaderData()).invoice_createdcould include the new invoice details from the mutation response. [MEDIUM]
Other completed criteria
- Events represent real user actions (login, logout, create invoice, update invoice)
- Events enable product insights — a login → create → update funnel is 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: wizard-pr
Trigger ID:
9da603eApp:
tanstack-router/tanstack-router-file-based-saasApp directory:
apps/tanstack-router/tanstack-router-file-based-saasWorkbench branch:
wizard-ci-9da603e-tanstack-router-tanstack-router-file-based-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-10-06T16:07:05.073Z
Duration: 338.3s
YARA Scanner