Skip to content

[CI] (0e81558) vue/movies - #4265

Closed
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-0e81558-vue-movies
Closed

wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-0e81558-vue-movies

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: wizard-pr
Trigger ID: 0e81558
App: vue/movies
App directory: apps/vue/movies
Workbench branch: wizard-ci-0e81558-vue-movies
Wizard branch: release-please--branches--main--components--wizard
Context Mill branch: main
PostHog (MCP) branch: master
Timestamp: 2026-09-29T08:49:35.231Z
Duration: 389.1s

YARA Scanner

✓ 179 tool calls scanned, 0 violations detected

No violations: ✓ 179 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown
Author

PR Evaluation Report

Summary

This PR integrates PostHog into a Vue.js movies app using posthog-js. It adds SDK initialization in main.js, custom event captures for login, logout, search, and trailer playback, error tracking via app.config.errorHandler, and a logging composable. However, it is missing identify() on login, reset() on logout, a reverse proxy, and uses a non-existent posthog.logger.info() API.

Files changed Lines added Lines removed
12 +92 -5

Confidence score: 5/5 🧙

  • Missing posthog.identify() on login: The LoginView.vue captures a login_succeeded event but never calls posthog.identify() with the username or a stable user ID. All events remain anonymous, defeating the purpose of user-level analytics. [CRITICAL]
  • Missing posthog.reset() on logout: The NavBar.vue captures logout_completed but never calls posthog.reset(). If another user logs in on the same browser, their events will be attributed to the previous user. [CRITICAL]
  • Invalid posthog.logger.info() API: The posthogLogger.ts composable calls posthog.logger.info(), which is not a documented public API. The correct method is posthog.captureLog({ body, level: 'info', attributes }). This will silently fail or throw at runtime. [MEDIUM]
  • No reverse proxy configured: No Vite rewrites or other proxy setup to route PostHog requests through a first-party domain, making client-side tracking vulnerable to ad blockers. [MEDIUM]

File changes

Filename Score Description
src/main.js 4/5 PostHog initialization with env vars, error handler for exception tracking. Good guard for missing env vars in dev mode.
src/views/LoginView.vue 2/5 Captures login_succeeded but missing critical posthog.identify() call
src/components/NavBar.vue 2/5 Captures logout_completed but missing critical posthog.reset() call
src/composables/posthogLogger.ts 1/5 Uses non-existent posthog.logger.info() API — will not send logs
src/components/media/MediaHero.vue 4/5 Good event capture with properties for trailer playback; logger call is broken
src/views/SearchView.vue 4/5 Search event capture with result count; logger call is broken
src/views/MediaDetailView.vue 4/5 Trailer event capture with media properties
.env.example 5/5 Documents required env vars
package.json 5/5 Adds posthog-js dependency
.gitignore 5/5 Excludes .env from version control
src/views/HomeView.vue 5/5 Passes type prop to MediaHero for event enrichment
src/views/MediaListView.vue 5/5 Passes type prop to MediaHero for event enrichment

App sanity check ⚠️

Criteria Result Description
App builds and runs Yes No syntax errors preventing build; runtime issues exist with logger API
Preserves existing env vars & configs Yes Existing code preserved, only PostHog additions made
No syntax or type errors Yes Valid TypeScript/Vue syntax throughout
Correct imports/exports Yes posthog-js imported correctly in all files
Minimal, focused changes Yes All changes relate to PostHog integration
Pre-existing issues None No pre-existing issues detected

Issues

  • Invalid logger API: posthogLogger.ts calls posthog.logger.info() which is not a public SDK method. The documented API is posthog.captureLog({ body: 'message', level: 'info', attributes: {...} }). This means all log capture calls in MediaHero.vue, SearchView.vue, and LoginView.vue silently fail. [MEDIUM]

Other completed criteria

  • Environment variables documented in .env.example
  • .env added to .gitignore
  • posthog-js added to package.json dependencies
  • Build configuration unchanged and valid

PostHog implementation ⚠️

Criteria Result Description
PostHog SDKs installed Yes posthog-js ^1.434.17 added to package.json
PostHog client initialized Yes posthog.init() in main.js with env vars, defaults: '2026-01-30', and logs config
capture() Yes Multiple meaningful capture calls: login_succeeded, logout_completed, media_trailer_started, search_submitted
identify() No Not called anywhere — login flow captures event but never identifies the user
Error tracking Yes app.config.errorHandler calls posthog.captureException(error)
Reverse proxy No No Vite rewrites or proxy configuration for PostHog requests

Issues

  • Missing posthog.identify(): After successful login in LoginView.vue, the code captures login_succeeded but never calls posthog.identify(username, { ... }). The useAuth composable has the username available. Without identify, all events remain anonymous and cannot be tied to specific users. [CRITICAL]
  • Missing posthog.reset(): The logout handler in NavBar.vue captures logout_completed but never calls posthog.reset(). Per PostHog docs, reset() should be called on logout to unlink future events from the previous user. This causes cross-user data contamination on shared devices. [CRITICAL]
  • No reverse proxy: PostHog requests go directly to us.i.posthog.com, making them susceptible to ad blockers. A Vite proxy rewrite or similar should be configured. [MEDIUM]

Other completed criteria

  • API key loaded from VITE_POSTHOG_PROJECT_TOKEN environment variable
  • Host correctly configured from VITE_POSTHOG_HOST environment variable
  • Dev-mode guard throws if env vars are missing

PostHog insights and events ⚠️

Filename PostHog events Description
src/main.js captureException Global error handler captures unhandled exceptions
src/views/LoginView.vue login_succeeded Captured after successful login (no properties)
src/components/NavBar.vue logout_completed Captured on logout (no properties)
src/components/media/MediaHero.vue media_trailer_started Captured with media_id and media_type properties
src/views/MediaDetailView.vue media_trailer_started Same event captured in detail view with same properties
src/views/SearchView.vue search_submitted Captured with result_count property

Issues

  • login_succeeded missing user properties: The event has no properties. While PII shouldn't go in capture properties, identify() should be called alongside this event to associate the session with the user. [CRITICAL]
  • logout_completed missing reset(): The event is captured but the session is not reset, so subsequent events from another user get attributed to the wrong person. [CRITICAL]

Other completed criteria

  • Events represent real user actions (login, logout, trailer play, search)
  • Events enable product insights (login→search→trailer funnel possible)
  • media_trailer_started and search_submitted include enriched properties
  • No PII in event properties
  • Consistent snake_case naming 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