[CI] (e2f7ab0) tanstack-router/tanstack-router-code-based-saas#2435
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
[CI] (e2f7ab0) tanstack-router/tanstack-router-code-based-saas#2435wizard-ci-bot[bot] wants to merge 1 commit into
wizard-ci-bot[bot] wants to merge 1 commit into
Conversation
Author
|
Now I have all the context I need. The auth is a simple in-memory object — no persistent sessions, so on page refresh the user starts as PR Evaluation ReportSummaryThis PR integrates PostHog into a TanStack Router code-based SaaS demo app. It adds
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | Valid TypeScript/JSX, vite-env.d.ts added for import.meta.env types |
| Preserves existing env vars & configs | Yes | Existing code preserved, PostHogProvider wraps without modifying children |
| No syntax or type errors | Yes | All code is syntactically valid; types align with SDK APIs |
| Correct imports/exports | Yes | PostHogProvider, usePostHog from @posthog/react are correct |
| Minimal, focused changes | Yes | Only PostHog-related additions; useMutation.tsx change supports error tracking |
| Pre-existing issues | None | — |
Issues
- API key committed in
.env: The.envfile contains a real project token committed to source control. Should use a.env.examplewith placeholder values and keep.envin.gitignore. [MEDIUM]
Other completed criteria
- Build configuration is valid — Vite config correctly uses
defineConfigwith function form andloadEnv - The
useMutationhook extension foronErroris clean and backward-compatible
PostHog implementation ✅
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js@^1.398.0 and @posthog/react@^1.10.3 in package.json |
| PostHog client initialized | Yes | PostHogProvider in RootComponent with apiKey from env, api_host: '/ingest', ui_host from env, defaults: '2026-01-30', capture_exceptions: true |
| capture() | Yes | 10 meaningful capture calls across multiple user flows |
| identify() | Yes | posthog.identify(normalizedUsername, { username, current_plan }) on login; posthog.reset() on logout. Auth is in-memory only (no persistence), so returning-user identify on page refresh is N/A |
| Error tracking | Yes | capture_exceptions: true in init + manual posthog.captureException() in invoice creation and update error handlers |
| Reverse proxy | Yes | Vite dev server proxy: /ingest/static and /ingest/array → us-assets.i.posthog.com, /ingest → PostHog host (dev-only) |
Issues
- Reverse proxy is dev-server only: The Vite
server.proxyconfiguration only applies to the development server. In production,/ingestpaths will return 404 unless a separate reverse proxy (nginx, Cloudflare, Vercel rewrites, etc.) is configured. The PR should document this or provide production proxy guidance. [MEDIUM]
Other completed criteria
- API key loaded from
import.meta.env.VITE_PUBLIC_POSTHOG_PROJECT_TOKEN(environment variable) - Host correctly configured through reverse proxy pattern with
ui_hostfor PostHog UI features - Both
/ingest/staticand/ingest/arraycorrectly route tous-assets.i.posthog.comper framework rules posthog.reset()correctly called beforeauth.logout()on both logout pathsdebug: import.meta.env.DEVenables debug mode only in development
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
src/main.tsx |
cta_clicked |
Landing page CTA clicks with destination property (dashboard/login/invoice) |
src/main.tsx |
invoice_creation_submitted |
Invoice creation with id, title length, has_description |
src/main.tsx |
invoice_updated |
Invoice edits with id, title length, has_notes |
src/main.tsx |
invoice_notes_toggled |
Toggle notes visibility with invoice_id and next_state |
src/main.tsx |
team_filter_applied |
Team member search filter on blur with filter_length |
src/main.tsx |
team_sort_changed |
Sort mode changes with sort_by value |
src/main.tsx |
team_member_opened |
Team member profile clicks with team_member_id and role |
src/main.tsx |
user_logged_in |
Login with auth_method and redirect_present |
src/main.tsx |
user_logged_out |
Logout from two locations with source property |
src/main.tsx |
subscription_upgrade_clicked |
Upgrade button click with plan_name and source |
src/main.tsx |
captureException |
Invoice creation and update mutation errors with source context |
Issues
No issues found.
Other completed criteria
- Events represent real user actions across the full product flow (landing → auth → invoicing → team management → account)
- Events enable product insights: invoice workflow funnel (create → update), auth lifecycle, upgrade intent tracking
- All events include enriched contextual properties (source, destination, ids, lengths, states)
- No PII in event properties — username only in person properties via
identify() - Consistent snake_case naming convention with descriptive action-oriented names
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:
e2f7ab0App:
tanstack-router/tanstack-router-code-based-saasApp directory:
apps/tanstack-router/tanstack-router-code-based-saasWorkbench branch:
wizard-ci-e2f7ab0-tanstack-router-tanstack-router-code-based-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-07-06T22:17:45.991Z
Duration: 297.8s
YARA Scanner