Repository navigation
[CI] (38ef7e6) next-js/15-app-router-todo - #2595
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 App Router todo application. It adds client-side initialization via
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | No syntax errors, valid TypeScript, correct imports |
| Preserves existing env vars & configs | Yes | Existing code preserved, only PostHog additions made |
| No syntax or type errors | Yes | All files have valid syntax and correct TypeScript usage |
| Correct imports/exports | Yes | posthog-js imported client-side, posthog-node server-side — correct separation |
| Minimal, focused changes | Yes | All changes relate to PostHog integration |
| Pre-existing issues | None | Base app appears functional |
Issues
- No
.env.examplefile: The PR creates.env.local(correctly gitignored) but does not create an.env.exampleto document required environment variables (NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN,NEXT_PUBLIC_POSTHOG_HOST). Collaborators won't know what to set. [MEDIUM]
Other completed criteria
- Build configuration (
package.json,next.config.ts) is valid with correct dependency versions - No unrelated modifications or reformatting
- Correct framework-specific file conventions followed (
instrumentation-client.tsat project root)
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js ^1.399.1 and posthog-node ^5.40.0 added to package.json |
| PostHog client initialized | Yes | Client initialized in instrumentation-client.ts (recommended for Next.js 15.3+); server singleton in lib/posthog-server.ts |
| capture() | Yes | 7 meaningful capture calls across client and server (todo CRUD operations) |
| identify() | No | No posthog.identify() call exists anywhere. The app has no visible auth system, but identify should still be wired in for when users are known. No posthog.reset() on logout either. |
| Error tracking | Yes | capture_exceptions: true in init config for autocapture, plus manual posthog.captureException(error) in catch blocks |
| Reverse proxy | Yes | Correctly configured via Next.js rewrites: /ingest/static/* and /ingest/array/* → us-assets.i.posthog.com, /ingest/* → us.i.posthog.com |
Issues
- Missing
identify()implementation: Noposthog.identify()call anywhere in the codebase. Even without current auth, a placeholder or documented TODO is expected. The server-side events fall back to'anonymous'asdistinctIdwhen no header is present, which is a fabricated value. [MEDIUM] - Manual header forwarding vs
tracing_headers: The PR manually addsX-PostHog-Distinct-IDandX-PostHog-Session-IDto every fetch call. Usingtracing_headersin theposthog.init()config would automate this. [LOW]
Other completed criteria
- API key loaded from
NEXT_PUBLIC_POSTHOG_PROJECT_TOKENenvironment variable (not hardcoded in source) - Host correctly configured — client uses
/ingestreverse proxy, server usesNEXT_PUBLIC_POSTHOG_HOSTenv var - Correct SDK separation:
posthog-json client,posthog-nodeon server - Server-side client uses
flushAt: 1andflushInterval: 0as recommended for Next.js
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
components/todos/todo-list.tsx |
todo_created, todo_completed, todo_uncompleted, todo_deleted, captureException |
Client-side events for all CRUD user actions plus exception tracking in catch blocks |
app/api/todos/route.ts |
server_todo_created |
Server-side event when a todo is created, includes todo_id and has_description |
app/api/todos/[id]/route.ts |
server_todo_updated, server_todo_deleted |
Server-side events for update/delete with todo_id, completed status, and `` |
Issues
todo_completedandtodo_uncompletedlack properties: These events have no enriching properties (notodo_id, no context). Compare withtodo_createdwhich includeshas_description. [MEDIUM]todo_deletedlacks properties: Notodo_idor other context included in the client-side delete event. [LOW]
Other completed criteria
- Events represent real user actions (create, complete, uncomplete, delete todos)
- Events enable product insights — can build creation-to-completion funnels, track deletion rates
- Event names are descriptive and use consistent
snake_caseconvention - No PII in event properties
- Server-side events include enriching properties like
todo_id,completed,has_description
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:
38ef7e6App:
next-js/15-app-router-todoApp directory:
apps/next-js/15-app-router-todoWorkbench branch:
wizard-ci-38ef7e6-next-js-15-app-router-todoWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-07-09T19:18:09.574Z
Duration: 404.6s
YARA Scanner