Skip to content

[CI] (e2f7ab0) nuxt/movies-nuxt-3-6#2426

Closed
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-e2f7ab0-nuxt-movies-nuxt-3-6
Closed

[CI] (e2f7ab0) nuxt/movies-nuxt-3-6#2426
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-e2f7ab0-nuxt-movies-nuxt-3-6

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: wizard-pr
Trigger ID: e2f7ab0
App: nuxt/movies-nuxt-3-6
App directory: apps/nuxt/movies-nuxt-3-6
Workbench branch: wizard-ci-e2f7ab0-nuxt-movies-nuxt-3-6
Wizard branch: release-please--branches--main--components--wizard
Context Mill branch: main
PostHog (MCP) branch: master
Timestamp: 2026-07-06T22:09:29.911Z
Duration: 353.3s

YARA Scanner

✓ 168 tool calls scanned, 0 violations detected

No violations: ✓ 168 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Author

PR Evaluation Report

Summary

This PR integrates PostHog into a Nuxt 3.0-3.6 movies app with both client-side (posthog-js plugin) and server-side (posthog-node) instrumentation. It adds event captures across authentication flows, media browsing, search, and error handling, along with user identification and exception tracking.

Files changed Lines added Lines removed
15 +264 -38

Confidence score: 4/5 👍

  • Duplicate user_logged_out event: The event is captured both client-side (useAuth.ts) and server-side (logout.post.ts), which will produce duplicate events for every logout. [MEDIUM]
  • media_tab_selected fires on mount with immediate: true: The watcher in Details.vue fires immediately with the default tab value 'overview', producing a misleading event on every page load rather than only on user-initiated tab switches. Same issue in person/Details.vue. [MEDIUM]
  • No .env.example updated: Environment variables NUXT_PUBLIC_POSTHOG_PROJECT_TOKEN and NUXT_PUBLIC_POSTHOG_HOST are not documented in any .env.example file. [MEDIUM]

File changes

Filename Score Description
plugins/posthog.client.ts 4/5 New client plugin initializing posthog-js with runtime config, error hook, and debug mode
nuxt.config.ts 4/5 Adds PostHog runtime config under runtimeConfig.public.posthog
package.json 5/5 Adds posthog-js and posthog-node dependencies
composables/useAuth.ts 4/5 Adds identify on login/returning user, reset on logout, capture events
pages/login.vue 4/5 Captures login success/failure events
pages/search.vue 5/5 Captures search submissions with query length
pages/[type]/[id].vue 5/5 Captures media detail page views on mount
components/media/Card.vue 4/5 Captures media card clicks; adds props. prefix throughout (unnecessary churn)
components/media/Details.vue 3/5 Tab watcher with immediate: true fires misleading initial event
components/person/Details.vue 3/5 Same immediate: true issue as media Details
error.vue 5/5 Captures errors and exceptions via captureException
server/api/auth/login.post.ts 4/5 Server-side login event with session context and exception capture
server/api/auth/logout.post.ts 3/5 Server-side logout event (duplicates client-side event)
types/nuxt-app.d.ts 5/5 Type augmentation for on NuxtApp
posthog-setup-report.md 5/5 Setup documentation

App sanity check ⚠️

Criteria Result Description
App builds and runs Yes No syntax errors; dependencies added correctly
Preserves existing env vars & configs Yes Existing runtimeConfig and functionality preserved
No syntax or type errors Yes Valid TypeScript/Vue throughout
Correct imports/exports Yes All imports resolve correctly — posthog-js client-side, posthog-node server-side, h3 helpers
Minimal, focused changes No Card.vue has gratuitous props. prefix changes on all template references beyond what's needed for PostHog
Pre-existing issues None

Issues

  • Unnecessary props. prefix refactoring in Card.vue: The change from item. to props.item. throughout the template is functionally equivalent in Vue 3 <script setup> and adds unnecessary diff noise unrelated to PostHog. [LOW]
  • No .env.example updated: The new env vars (NUXT_PUBLIC_POSTHOG_PROJECT_TOKEN, NUXT_PUBLIC_POSTHOG_HOST) are not documented in an .env.example file for collaborator onboarding. [MEDIUM]

Other completed criteria

  • Build configuration is valid — package.json has correct dependency entries
  • Existing app functionality (auth, routing, search) fully preserved

PostHog implementation ✅

Criteria Result Description
PostHog SDKs installed Yes posthog-js ^1.398.0 and posthog-node ^5.39.4 in package.json
PostHog client initialized Yes Plugin posthog.client.ts correctly initializes via posthog.init() using runtime config values, following Nuxt 3.0-3.6 docs pattern
capture() Yes Multiple meaningful capture calls across login, search, media browsing, error pages
identify() Yes posthog.identify(user) called on login success and on returning authenticated users in useAuth.ts; posthog.reset() on logout
Error tracking Yes captureException in vue:error hook (plugin), error.vue, and server routes
Reverse proxy No No reverse proxy configured; __add_tracing_headers is set but that's for server correlation, not a proxy

Issues

  • No reverse proxy configured: Client-side posthog-js is susceptible to ad blockers without a reverse proxy. The api_host points directly to PostHog. [MEDIUM]

Other completed criteria

  • API key loaded from environment variables via runtime config (not hardcoded)
  • Host correctly configured via NUXT_PUBLIC_POSTHOG_HOST env var
  • Server-side uses posthog-node correctly with withContext for session/distinct ID correlation and proper shutdown() calls
  • defaults config option correctly set to '2026-05-30'

PostHog insights and events ⚠️

Filename PostHog events Description
pages/login.vue user_logged_in, user_login_failed Tracks login outcomes with authentication method
composables/useAuth.ts user_logged_out, identify, reset User lifecycle management — identify on login/return, reset on logout
pages/search.vue search_submitted Captures search with query_length property
pages/[type]/[id].vue media_detail_viewed Captures detail page views with media metadata
components/media/Card.vue media_card_selected Captures card clicks with media ID, type, title
components/media/Details.vue media_tab_selected Tab switches on media details (fires on mount too)
components/person/Details.vue person_tab_selected Tab switches on person details (fires on mount too)
error.vue app_error_captured, captureException Error tracking with status code and exception capture
server/api/auth/login.post.ts server_login_succeeded, captureException Server-side login tracking and error capture
server/api/auth/logout.post.ts user_logged_out Server-side logout (duplicates client event)

Issues

  • Duplicate user_logged_out event: Both useAuth.ts (client) and logout.post.ts (server) capture user_logged_out for the same action, resulting in double-counted logout events. Remove one. [MEDIUM]
  • immediate: true on tab watchers fires misleading initial event: media_tab_selected and person_tab_selected fire immediately with the default tab value on component mount, not from actual user interaction. Remove { immediate: true } to only capture real tab switches. [MEDIUM]
  • media_title in Card.vue event properties: Including media_title (which contains the movie/show name) as an event property is acceptable here as it's product content metadata, not PII. [LOW]

Other completed criteria

  • Events represent real user actions (login, search, browse, view detail, tab switch)
  • Events enable product insights — can build login funnel, search → view → select funnel, error tracking
  • Events include relevant contextual properties (media_id, media_type, query_length, status_code)
  • No PII in event properties — emails/names not captured in events
  • 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