Skip to content

[CI] (22322bc) next-js/15-pages-router-todo - #3645

Closed
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-22322bc-next-js-15-pages-router-todo
Closed

wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-22322bc-next-js-15-pages-router-todo

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: wizard-pr
Trigger ID: 22322bc
App: next-js/15-pages-router-todo
App directory: apps/next-js/15-pages-router-todo
Workbench branch: wizard-ci-22322bc-next-js-15-pages-router-todo
Wizard branch: release-please--branches--main--components--wizard
Context Mill branch: main
PostHog (MCP) branch: master
Timestamp: 2026-08-28T19:21:28.265Z
Duration: 236.9s

YARA Scanner

✓ 112 tool calls scanned, 0 violations detected

No violations: ✓ 112 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Author

PR Evaluation Report

Summary

This PR adds a client-side PostHog integration to a Next.js 15 pages router todo app. It installs posthog-js, initializes it via instrumentation-client.ts, adds custom event captures for todo CRUD operations, and documents environment variables. No user identification, reverse proxy, or server-side integration is included.

Files changed Lines added Lines removed
4 +41 -0

Confidence score: 5/5 🧙

  • No user identification implemented: There is no posthog.identify() call anywhere in the app. Users cannot be linked across sessions or devices, limiting the value of all captured events. [CRITICAL]
  • No reverse proxy configured: No Next.js rewrites or middleware proxy is set up, making client-side events susceptible to ad blockers. [MEDIUM]
  • Outdated defaults date: Uses defaults: '2026-01-30' instead of the current recommended defaults: '2026-05-30'. While functional, this misses newer default configuration improvements. [LOW]

File changes

Filename Score Description
instrumentation-client.ts 4/5 Initializes PostHog with env vars, error tracking, and dev-mode validation. Uses slightly outdated defaults date.
components/todos/todo-list.tsx 4/5 Adds three well-structured capture() calls in event handlers for todo CRUD actions.
package.json 5/5 Adds posthog-js dependency correctly.
.env.example 5/5 Documents both required PostHog environment variables.

App sanity check ✅

Criteria Result Description
App builds and runs Yes No syntax or structural errors; posthog-js is added as a dependency
Preserves existing env vars & configs Yes Only additive changes to existing files
No syntax or type errors Yes All TypeScript/JSX is valid
Correct imports/exports Yes posthog imported from posthog-js correctly in client-side files
Minimal, focused changes Yes Only PostHog-related additions, no unrelated modifications
Pre-existing issues None Base app appears functional

Issues

No issues.

Other completed criteria

  • Environment variables documented in .env.example
  • Build configuration valid — posthog-js added correctly to package.json
  • All changes are relevant to PostHog integration
  • Correct files modified for Next.js (instrumentation-client.ts)
  • Code follows existing codebase patterns (event captures in handlers, consistent style)

PostHog implementation ⚠️

Criteria Result Description
PostHog SDKs installed Yes posthog-js@^1.422.5 added to package.json
PostHog client initialized Yes Initialized in instrumentation-client.ts with env-based token/host and capture_exceptions: true
capture() Yes Three meaningful capture calls: todo_created, todo_completion_changed, todo_deleted
identify() No No posthog.identify() call anywhere — users remain anonymous
Error tracking Yes capture_exceptions: true enabled in init config
Reverse proxy No No Next.js rewrites or middleware proxy configured

Issues

  • Missing user identification: No posthog.identify() is called anywhere in the app. All events are attributed to anonymous users, making it impossible to build user-level funnels or retention analysis. Add an identify call when user context is available (e.g., after login or on app load if authenticated). [CRITICAL]
  • No reverse proxy: No Next.js rewrites are configured to proxy PostHog requests. Events sent directly to us.i.posthog.com may be blocked by ad blockers. Configure next.config.js rewrites or use PostHog's managed reverse proxy. [MEDIUM]

Other completed criteria

  • API key loaded from NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN environment variable
  • Host correctly configured from NEXT_PUBLIC_POSTHOG_HOST environment variable
  • Validation throws in development when env vars are missing
  • Error tracking enabled via capture_exceptions: true

PostHog insights and events ✅

Filename PostHog events Description
instrumentation-client.ts capture_exceptions Automatic exception capture for error tracking
components/todos/todo-list.tsx todo_created, todo_completion_changed, todo_deleted Tracks full todo lifecycle — creation, completion toggle, and deletion with contextual properties

Issues

  • Outdated defaults date: defaults: '2026-01-30' is used instead of the current '2026-05-30'. Update to benefit from the latest default configuration improvements. [LOW]

Other completed criteria

  • Events represent real user actions (creating, completing, deleting todos)
  • Events enable product insights — can build a todo completion funnel or track engagement
  • Events include relevant properties (todo_id, completed, has_description)
  • No PII in event properties — only IDs and booleans
  • Event names are descriptive and use consistent snake_case convention

Reviewed by wizard workbench PR evaluator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants