Repository navigation
[CI] (9da603e) next-js/15-pages-router-todo - #4398
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
|
Good — the OTel packages resolved successfully. Now let me finalize my review. PR Evaluation ReportSummaryThis PR integrates PostHog into a Next.js 15 Pages Router todo app. It adds client-side initialization via
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | All dependencies resolve; syntax is valid |
| Preserves existing env vars & configs | Yes | Existing app code unchanged except wrapping with ErrorBoundary |
| No syntax or type errors | Yes | TypeScript types correct, async handlers properly updated |
| Correct imports/exports | Yes | All imports resolve to correct packages |
| Minimal, focused changes | No | OTel log infrastructure adds 4 extra dependencies and ~50 lines when posthog-node would have been simpler and more aligned |
| Pre-existing issues | None | Base app is clean |
Issues
- Excessive OTel complexity: Instead of using
posthog-node(the standard server-side SDK for Next.js), the PR adds 4 OpenTelemetry packages and ~50 lines of OTel log exporter boilerplate. The docs recommendposthog-nodewithflushAt: 1for server-side captures in Next.js. [MEDIUM]
Other completed criteria
- Environment variables documented in
.env.example .env.localadded to.gitignore- Build config (package.json) has valid structure and all packages resolve
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js: ^1.438.1 added to dependencies |
| PostHog client initialized | Yes | instrumentation-client.ts calls posthog.init() with env vars — correct Next.js pattern |
| capture() | Yes | Three client-side posthog.capture() calls for todo CRUD |
| identify() | No | No posthog.identify() call anywhere; no posthog.reset() on logout |
| Error tracking | Yes | Custom ErrorBoundary with captureException() + capture_exceptions: true in init |
| Reverse proxy | No | No reverse proxy or Next.js rewrites configured |
Issues
- Missing user identification: No
posthog.identify()is called anywhere in the app. All events are anonymous, preventing user attribution across sessions, breaking person profiles, and making session replays unlinkable. Addposthog.identify(userId, { email, name })after login andposthog.reset()on logout. [CRITICAL] - No reverse proxy: Client-side requests go directly to
us.i.posthog.com. Configure Next.js rewrites or the managed reverse proxy to prevent ad-blocker interception. [MEDIUM] - Older defaults date:
defaults: '2026-01-30'is used instead of the latest'2026-05-30', missing newer default configuration improvements. [LOW]
Other completed criteria
- API key loaded from
NEXT_PUBLIC_POSTHOG_KEYenvironment variable (not hardcoded) - API host configured via
NEXT_PUBLIC_POSTHOG_HOSTenvironment variable capture_exceptions: trueenables automatic exception autocapture- Custom ErrorBoundary correctly calls
posthog.captureException(error)with component stack
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
components/todos/todo-list.tsx |
todo_created, todo_completion_changed, todo_deleted |
Client-side captures for todo CRUD actions in event handlers |
components/ErrorBoundary.tsx |
captureException |
Captures React component errors with component stack |
instrumentation-client.ts |
autocapture, capture_exceptions |
Enables autocapture and automatic exception tracking |
pages/api/todos/[id].ts |
OTel log: Todo completion updated, Todo deleted |
Server-side OTel log emissions (not PostHog events) |
pages/api/todos/index.ts |
OTel log: Todo created |
Server-side OTel log emission (not PostHog event) |
Issues
todo_deletedhas no properties: Thetodo_deletedevent is captured without any properties, missing useful context like completion status at time of deletion. [LOW]
Other completed criteria
- Events represent real user actions (create, complete, delete todos)
- Events enable product insights — can build create→complete→delete funnel
todo_createdincludeshas_description;todo_completion_changedincludescompletedstatus- No PII in event properties
- Event names use consistent snake_case convention and describe the action
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:
9da603eApp:
next-js/15-pages-router-todoApp directory:
apps/next-js/15-pages-router-todoWorkbench branch:
wizard-ci-9da603e-next-js-15-pages-router-todoWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-10-06T15:54:11.080Z
Duration: 378.8s
YARA Scanner