[CI] (362fa9c) next-js/15-app-router-todo#311
Closed
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
Closed
[CI] (362fa9c) next-js/15-app-router-todo#311wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
Conversation
Author
|
Now I have a comprehensive view of the PR. Let me generate the evaluation report: PR Evaluation ReportSummaryThis PR adds PostHog analytics integration to a Next.js 15 App Router todo application. It implements client-side tracking via
Confidence score: 3/5 🤔
File changes
App sanity check: 4/5 ✅
Issues
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js@^1.345.5 and posthog-node@^5.24.15 added to dependencies |
| PostHog client initialized | Yes | Client-side via instrumentation-client.ts, server-side via singleton in lib/posthog-server.ts |
| capture() | Yes | Multiple capture calls for todo CRUD operations on both client and server |
| identify() | No | No posthog.identify() calls anywhere in the codebase |
| Error tracking | Partial | capture_exceptions: true enabled on client; manual error event captures but no captureException() |
| Reverse proxy | Yes | Properly configured rewrites to /ingest endpoint |
Issues
- No user identification: Server-side events all use
distinctId: 'server'which prevents user-level analytics. Client-side events will use anonymous IDs but are never linked to authenticated users. This makes funnel analysis and user behavior tracking impossible. [CRITICAL] - Server-side events may be lost: In serverless environments, the PostHog client's async capture calls need to be flushed before the response is sent. The
flushAt: 1andflushInterval: 0settings suggest immediate flush, but withoutawait posthog.flush()orawait posthog.shutdown(), events may be dropped. [CRITICAL] - Using NEXT_PUBLIC key for server: The server client uses
NEXT_PUBLIC_POSTHOG_KEYwhich is the same as the client key. While this works, best practice is to use a separate server-side API key. [LOW] - Page view tracking not explicitly configured: The
instrumentation-client.tsdoesn't setcapture_pageview: true(though this may be default behavior). [LOW]
Other completed criteria
- API key loaded from environment variable
- Correct API host configuration for reverse proxy
ui_hostproperly set for US region- Debug mode enabled only in development
defaults: '2025-05-24'for latest SDK defaultsskipTrailingSlashRedirectenabled for PostHog compatibility
PostHog insights and events: 4/5 ✅
| Filename | PostHog events | Description |
|---|---|---|
components/todos/todo-list.tsx |
todo_created, todo_completed, todo_uncompleted, todo_deleted, todo_create_failed |
Client-side tracking for all user-facing todo interactions with relevant properties (todo_id, has_description) |
app/api/todos/route.ts |
api_todo_created, api_todo_create_error |
Server-side tracking for todo creation with validation and server error differentiation |
app/api/todos/[id]/route.ts |
api_todo_updated, api_todo_deleted, api_todo_not_found |
Server-side tracking for todo modifications with operation context |
instrumentation-client.ts |
capturedException (automatic) |
Automatic exception capture enabled via capture_exceptions: true |
Issues
- Duplicate events for same action: Both client and server capture events for the same user actions (e.g.,
todo_createdandapi_todo_created). While this provides redundancy, it may inflate metrics and complicate analysis if not properly filtered. Consider choosing one source of truth. [MEDIUM] - Missing error tracking for toggle/delete failures: Client-side
handleToggleTodoandhandleDeleteTodocatch errors but don't capture PostHog events for failures. [LOW]
Other completed criteria
- Events represent real user actions (create, complete, delete todos)
- Events enriched with relevant properties (todo_id, has_description, updated_fields)
- Error events capture error types and details
- Events can be used for funnel analysis (created → completed)
- API activity monitoring for backend observability
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: manual
Trigger ID:
362fa9cApp:
next-js/15-app-router-todoApp directory:
apps/next-js/15-app-router-todoWorkbench branch:
wizard-ci-362fa9c-next-js-15-app-router-todoWizard branch:
mainContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-02-11T17:35:01.276Z
Duration: 441.9s