-
Notifications
You must be signed in to change notification settings - Fork 0
[CI] (a283762) next-js/15-pages-router-todo #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The build succeeded. Now I have all the information needed to write a comprehensive PR evaluation report. PR Evaluation ReportSummaryThis PR integrates PostHog analytics into a Next.js 15 Pages Router todo application. It adds client-side initialization via
Confidence score: 3/5 🤔
File changes
App sanity check: 4/5 ✅
Issues
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js@^1.324.1 and posthog-node@^5.21.0 added |
| PostHog client initialized | Partial | Client initialization uses wrong pattern for Pages Router; server client is correct |
| capture() | Yes | Events captured for todo_created, todo_completed, todo_uncompleted, todo_deleted, and failure events |
| identify() | No | No user identification implemented; all server events use hardcoded 'anonymous' distinctId |
| Error tracking | Yes | capture_exceptions: true enabled client-side; captureException() called on errors; server failures tracked |
| Reverse proxy | Yes | Properly configured in next.config.ts with /ingest rewrites to us.i.posthog.com |
Issues
- Wrong initialization pattern for Pages Router:
instrumentation-client.tsis an App Router feature. Pages Router should initialize PostHog in_app.tsxusinguseEffector wrap with a provider component. Without this, client-side PostHog may not initialize. [CRITICAL] - No pageview tracking: No explicit pageview tracking is configured. For Pages Router, you typically need to set up
capture_pageview: trueor manually track page changes via router events. [MEDIUM] - No user identification: All server-side events use
distinctId: 'anonymous'. Should correlate with client-side distinct ID or implement proper user identification. [MEDIUM]
Other completed criteria
- Correct API host configuration using reverse proxy
/ingest - UI host correctly set to
https://us.posthog.com - Debug mode enabled in development
- Server-side client uses singleton pattern
- Immediate flush configuration for serverless environment
- No PII in event properties
PostHog insights and events: 4/5 ✅
| Filename | PostHog events | Description |
|---|---|---|
todo-list.tsx |
todo_created, todo_completed, todo_uncompleted, todo_deleted |
Client-side tracking of core user actions with relevant properties (todo_id, has_description) |
todo-list.tsx |
captureException |
Automatic exception capture on fetch failures |
pages/api/todos/index.ts |
todo_create_failed |
Server-side tracking of creation failures with error type and details |
pages/api/todos/[id].ts |
todo_update_failed, todo_delete_failed |
Server-side tracking of update/delete failures with error type and details |
Issues
- No success events on server-side: Server only tracks failures, not successful operations. This limits visibility into successful API calls. [LOW]
- Missing properties on some events:
todo_completedandtodo_deletedcould include more context like todo title length or time since creation. [LOW]
Other completed criteria
- Events capture real user actions (create, complete, delete todos)
- Events can build useful funnels (todo_created → todo_completed)
- Error events include error type and details for debugging
- Events include
todo_idfor correlation has_descriptionproperty on creation enables content analysis
Reviewed by wizard workbench PR evaluator
Automated wizard CI run
Source: manual
Trigger ID:
a283762App:
next-js/15-pages-router-todoApp directory:
apps/next-js/15-pages-router-todoWorkbench branch:
wizard-ci-a283762-next-js-15-pages-router-todoWizard branch:
mainExamples branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-01-15T22:35:47.519Z
Duration: 233.5s