Skip to content

[CI] (33127b6) next-js/15-pages-router-todo - #3669

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

wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-33127b6-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: 33127b6
App: next-js/15-pages-router-todo
App directory: apps/next-js/15-pages-router-todo
Workbench branch: wizard-ci-33127b6-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-28T22:29:27.675Z
Duration: 271.4s

YARA Scanner

✓ 116 tool calls scanned, 0 violations detected

No violations: ✓ 116 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 initializes PostHog via instrumentation-client.ts, adds custom event captures for todo CRUD operations in todo-list.tsx, installs posthog-js, and documents environment variables in .env.example.

Files changed Lines added Lines removed
4 +50 -0

Confidence score: 5/5 🧙

  • No user identification: No posthog.identify() call exists anywhere in the codebase. Events will all be anonymous, preventing linking sessions across devices or associating events with known users. [MEDIUM]
  • No reverse proxy configured: No Next.js rewrites or middleware proxy is set up. Browser events sent directly to PostHog's ingestion host are likely to be blocked by ad blockers. [MEDIUM]
  • Outdated defaults date: defaults: '2026-01-30' is used instead of the current '2026-05-30' documented in the Next.js integration guide. [LOW]

File changes

Filename Score Description
instrumentation-client.ts 4/5 PostHog initialization with env var validation, error tracking, and debug mode — uses older defaults date
components/todos/todo-list.tsx 4/5 Three well-structured custom event captures for todo CRUD actions with enriched properties
.env.example 4/5 Documents both required PostHog env vars
package.json 5/5 Adds posthog-js dependency

App sanity check ✅

Criteria Result Description
App builds and runs Yes No syntax or structural errors; all imports resolve
Preserves existing env vars & configs Yes Existing code untouched; only additive changes
No syntax or type errors Yes Valid TypeScript throughout
Correct imports/exports Yes posthog-js imported correctly in client-side files
Minimal, focused changes Yes Only PostHog-related additions
Pre-existing issues None —

Issues

  • Redundant posthogConfigured guard: The posthogConfigured check in todo-list.tsx is unnecessary — posthog.capture() is a safe no-op when the SDK hasn't been initialized. Not harmful but adds boilerplate. [LOW]

Other completed criteria

  • Environment variables documented in .env.example with descriptive comment
  • Package dependency added with appropriate version range
  • All changes are relevant to PostHog integration
  • Code follows existing codebase patterns (TypeScript, naming conventions)

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 var validation
capture() Yes Three meaningful capture calls: todo_created, todo_completion_changed, todo_deleted
identify() No No posthog.identify() call anywhere; all events remain anonymous
Error tracking Yes capture_exceptions: true in init config
Reverse proxy No No Next.js rewrites or proxy middleware configured

Issues

  • Missing user identification: No posthog.identify() is called on login or page load. All events are anonymous, which prevents linking sessions to known users and limits analytics capabilities. Should add identify after authentication. [MEDIUM]
  • No reverse proxy: Direct browser-to-PostHog requests will be blocked by ad blockers. Next.js rewrites in next.config.js should be configured to proxy /ingest/* to PostHog, and api_host updated accordingly. [MEDIUM]

Other completed criteria

  • API key loaded from NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN environment variable
  • Host configured from NEXT_PUBLIC_POSTHOG_HOST environment variable
  • Error tracking enabled via capture_exceptions: true
  • Debug mode correctly gated to development environment
  • Initialization correctly placed in instrumentation-client.ts per Next.js docs

PostHog insights and events ✅

Filename PostHog events Description
todo-list.tsx todo_created Tracks new todo creation with total_todos count and has_description flag
todo-list.tsx todo_completion_changed Tracks toggling completion with completion_state property
todo-list.tsx todo_deleted Tracks todo deletion with remaining_todos count
instrumentation-client.ts captureException (auto) Automatic exception capture via capture_exceptions: true

Issues

No critical or medium issues with event quality.

Other completed criteria

  • Events represent real user actions (create, complete, delete todos)
  • Events enable product insights — can build create→complete funnel, retention on creation
  • Events include contextual properties (counts, states, description presence)
  • No PII in event properties
  • Event names are descriptive, 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