[CI] (b3fa00a) next-js/15-app-router-todo#983
Closed
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
Closed
[CI] (b3fa00a) next-js/15-app-router-todo#983wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
Conversation
Author
|
Now I have all the context I need. Let me produce the full evaluation report. PR Evaluation ReportSummaryThis PR integrates PostHog into a Next.js 15 App Router Todo application. It adds both client-side (
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | No syntax errors, valid TypeScript, correct dependencies added |
| Preserves existing env vars & configs | Yes | Existing next.config.ts structure preserved; only PostHog additions made |
| No syntax or type errors | Yes | All TypeScript syntax is valid; types are correct |
| Correct imports/exports | Yes | posthog-js imported client-side, posthog-node imported server-side — correct separation |
| Minimal, focused changes | Yes | All changes relate solely to PostHog integration |
| Pre-existing issues | None | Base app appears clean |
Issues
- No
.env.examplefor required variables: The.env.localis gitignored but no.env.exampleor equivalent template documents the requiredNEXT_PUBLIC_POSTHOG_PROJECT_TOKENandNEXT_PUBLIC_POSTHOG_HOSTvariables. Other developers cloning the repo won't know what to set. [MEDIUM]
Other completed criteria
- Build configuration is valid —
package.jsonscripts unchanged, dependencies correctly added - No unrelated modifications — all changes are PostHog-specific
- Code follows existing patterns — naming conventions, file structure, indentation match the codebase
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js@^1.363.4 and posthog-node@^5.28.5 added to package.json |
| PostHog client initialized | Yes | Client initialized in instrumentation-client.ts using the recommended Next.js 15.3+ pattern; server client initialized via singleton in lib/posthog-server.ts with flushAt: 1 / flushInterval: 0 |
| capture() | Yes | Client-side: todo_created, todo_completed, todo_uncompleted, todo_deleted. Server-side: todo_created_api, todo_updated_api, todo_deleted_api |
| identify() | No | No posthog.identify() call anywhere in the codebase. The app has no authentication, but no identify is implemented even as a placeholder pattern |
| Error tracking | Yes | capture_exceptions: true in init config + explicit posthog.captureException(error) calls in catch blocks |
| Reverse proxy | Yes | Next.js rewrites configured in next.config.ts routing /ingest/* to PostHog US endpoints; api_host set to /ingest |
Issues
- No
identify()call: There is noposthog.identify()anywhere. The app lacks authentication, so there's no natural user ID source. However, the framework rules state identify should be called on login/page refresh for authenticated users. Since no auth exists, this is contextually understandable but still a gap in the integration. [MEDIUM] - Missing
await posthog.shutdown()in API routes: Server-side API routes capture events but never callawait posthog.shutdown(). The PostHog Next.js docs explicitly recommend callingawait posthog.shutdown()after sending server-side events. WhileflushAt: 1helps mitigate this (events are queued to send after each capture), the lack ofshutdown()means there's no guarantee the HTTP request completes before the serverless function terminates. [MEDIUM]
Other completed criteria
- API key loaded from
NEXT_PUBLIC_POSTHOG_PROJECT_TOKENenvironment variable — not hardcoded (the.env.localvalue is gitignored) - Host correctly configured — client uses
/ingest(reverse proxy), server usesNEXT_PUBLIC_POSTHOG_HOST(https://us.i.posthog.com) ui_hostset tohttps://us.posthog.comfor toolbar/survey access through the proxydefaults: '2026-01-30'configuration set per PostHog docs- Client/server event correlation implemented via
x-posthog-distinct-idandx-posthog-session-idcustom headers
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
components/todos/todo-list.tsx |
todo_created, todo_completed, todo_uncompleted, todo_deleted, captureException |
Client-side CRUD events with todo_id properties; exception tracking in all catch blocks |
app/api/todos/route.ts |
todo_created_api |
Server-side capture on successful todo creation with todo_id, has_description, and `` |
app/api/todos/[id]/route.ts |
todo_updated_api, todo_deleted_api |
Server-side capture on successful update/delete with todo_id, completed status, and `` |
Issues
- No critical or medium issues with event quality
Other completed criteria
- Events represent real user actions — create, complete, uncomplete, delete map to actual todo app workflows
- Events enable product insights — can build creation trends, completion funnels (
todo_created→todo_completed), deletion rates - Events include relevant properties —
todo_id,has_description,completedstatus provide useful context - No PII in event properties — only todo IDs and boolean flags
- Event names are descriptive and consistent — snake_case convention, clear action names
- Client/server event pairs enable correlated analysis
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:
b3fa00aApp:
next-js/15-app-router-todoApp directory:
apps/next-js/15-app-router-todoWorkbench branch:
wizard-ci-b3fa00a-next-js-15-app-router-todoWizard branch:
mainContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-03-24T16:51:40.928Z
Duration: 292.4s