Repository navigation
[CI] (c212e50) next-js/15-pages-router-todo - #4322
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
|
Now I have everything I need to produce the evaluation. PR Evaluation ReportSummaryThis PR integrates PostHog into a Next.js 15 Pages Router todo app. It adds client-side initialization via
Confidence score: 5/5 🧙
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | Packages install correctly; syntax is valid |
| Preserves existing env vars & configs | Yes | Existing code structure preserved; only additions |
| No syntax or type errors | Yes | TypeScript types are correct across all files |
| Correct imports/exports | Yes | All imports resolve; @/instrumentation path alias works |
| Minimal, focused changes | Yes | Changes are PostHog-focused, though OTel logging adds scope |
| Pre-existing issues | None | Base app appears clean |
Issues
- Outdated
defaultsconfig:defaults: '2026-01-30'ininstrumentation-client.tsshould be'2026-05-30'per current PostHog docs. [LOW]
Other completed criteria
- Environment variables documented in
.env.examplewith placeholder values .gitignoreupdated to exclude.envfile- Build configuration includes all necessary dependencies
- Handlers correctly converted from sync to async for
await flushPostHogLogs()
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js@^1.435.6 added to package.json |
| PostHog client initialized | Yes | posthog.init() in instrumentation-client.ts with env var validation |
| capture() | Yes | Three meaningful captures: todo_created, todo_completion_updated, todo_deleted |
| identify() | No | No posthog.identify() call anywhere; all events are anonymous |
| Error tracking | Yes | Custom ErrorBoundary with captureException + capture_exceptions: true in init config |
| Reverse proxy | No | next.config.ts has no rewrites; no proxy configured |
Issues
- No user identification: There is no
posthog.identify()call in the app. For a full-stack Next.js app,identify()should be called after login or when user context is available to link events, session replays, and errors to known users. Add identify in a login handler or_app.tsxwhen user data is available. [MEDIUM] - No reverse proxy: The
next.config.tshas no rewrites configured. Next.js rewrites are the standard way to proxy PostHog requests and avoid ad blocker interference. Add rewrites for/ingest/*pointing to the PostHog host. [MEDIUM] - No posthog-node for server-side: The server-side uses OpenTelemetry logging rather than
posthog-nodefor event capture. This means server-side operations only produce logs, not proper PostHog events withdistinct_idthat appear in the activity feed and can be used in funnels. Consider installingposthog-nodefor server-side event capture. [MEDIUM]
Other completed criteria
- API key loaded from
NEXT_PUBLIC_POSTHOG_PROJECT_TOKENenvironment variable (not hardcoded) - API host loaded from
NEXT_PUBLIC_POSTHOG_HOSTenvironment variable - Initialization correctly placed in
instrumentation-client.tsper Next.js docs - Error boundary wraps entire app in
_app.tsx capture_exceptions: trueenables automatic exception autocapture
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
components/todos/todo-list.tsx |
todo_created, todo_completion_updated, todo_deleted |
Client-side captures for todo CRUD operations with properties |
components/ErrorBoundary.tsx |
captureException |
Captures React rendering errors |
instrumentation-client.ts |
capture_exceptions: true |
Enables automatic exception autocapture |
pages/api/todos/index.ts |
OTel log: "Todo created through API" | Server-side log for create operation |
pages/api/todos/[id].ts |
OTel logs: "Todo updated/deleted through API" | Server-side logs for update/delete operations |
Issues
- Server-side logs are not PostHog events: The OTel logs sent via
logTodoApiOperationgo to PostHog's/i/v1/logsendpoint, which populates the logs view but not the events/activity feed. These cannot be used in funnels, trends, or retention analysis. If server-side event capture is desired, useposthog-nodecapture(). [MEDIUM]
Other completed criteria
- Events represent real user actions (creating, completing, deleting todos)
- Events enable product insights (todo creation funnel, completion rates, deletion patterns)
- Events include relevant properties (
has_description,completedstatus) - No PII in event properties
- Event names use consistent
snake_caseconvention 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:
c212e50App:
next-js/15-pages-router-todoApp directory:
apps/next-js/15-pages-router-todoWorkbench branch:
wizard-ci-c212e50-next-js-15-pages-router-todoWizard branch:
posthog/functional-r9-19-bring-docs-readmes-and-skills-in-line-wiContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-10-01T19:33:57.379Z
Duration: 320.9s
YARA Scanner