Simplify Premium A/B test integration - #152
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (6)app/**/*.{vue,ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{vue,ts,tsx,js,jsx,json,css,scss}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx,vue}📄 CodeRabbit inference engine (AGENTS.md)
Files:
app/components/**/*.vue📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (AGENTS.md)
Files:
app/**/*.vue📄 CodeRabbit inference engine (AGENTS.md)
Files:
🔇 Additional comments (2)
📝 WalkthroughWalkthroughThe premium page now lazy-loads dedicated landing components. The original landing component contains localized content, pricing, payment selection, FAQs, SEO metadata, and structured data. Matomo loading and page-view experiment ordering are updated, with source-based tests covering rendering and tracking behavior. ChangesPremium landing experience
Sequence Diagram(s)sequenceDiagram
participant Visitor
participant PremiumPage
participant LandingComponent
participant Matomo
participant PaymentDialog
Visitor->>PremiumPage: Open premium page
PremiumPage->>LandingComponent: Render selected lazy landing variant
LandingComponent->>Matomo: Track plan selection
LandingComponent->>PaymentDialog: Open selected payment interval
PaymentDialog-->>Visitor: Display payment links
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/components/pages/premium/PremiumLandingOriginal.vue`:
- Around line 400-409: Remove the commented-out dead template blocks in the
premium landing markup, including the unused anchor with QuestionMarkCircleIcon
and the duplicate CTA NuxtLink. Leave the active template and any intentional
TODOs unchanged.
- Around line 199-201: Update the useSeoMeta configuration in
PremiumLandingOriginal.vue to include a page-specific description alongside the
existing computed title, using the appropriate localized translation key from
the premium landing-page SEO translations.
- Around line 267-269: Define a single computed value or constant named
trustpilotUrl in the Premium landing component using the existing Trustpilot URL
expression, then replace the duplicated inline template literals in all three
NuxtLink instances with trustpilotUrl.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 1ed8f49f-d4a9-4bff-9bb7-49b880c1ce80
📒 Files selected for processing (4)
app/components/pages/premium/PremiumLandingOriginal.vueapp/pages/premium/index.vueapp/plugins/040.matomo.client.tstest/assets/monetization-measurement.test.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (9)
test/**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
test/**/*.{test,spec}.{ts,tsx}: Use Vitest with@nuxt/test-utilsand Playwright browser mode for testing
Use@nuxt/test-utilswith Playwright inside describe blocks calling await setup({ browser: true })
Mock server-side API calls via test-only Nitro plugin at test/server-mocks/plugin.ts injected through nuxt.config.ts $test.nitro.plugins
Use debugBrowserOptions from test/helper.ts for headful Playwright playback with slowMo in tests
Keep repository/pure modules importable through relative paths in plain Vitest suites that do not get Nuxt's runtime alias resolution
Use fetch from@nuxt/test-utilswith { redirect: 'manual' } to access redirect status and Location headers;@nuxt/test-utils$fetch has no .raw method
Import localeCodes, prefixedLocaleCodes, and removedLocaleCodes from config/i18n in tests instead of hardcoding locale lists
Files:
test/assets/monetization-measurement.test.ts
**/*.{vue,ts,tsx,js,jsx,json,css,scss}
📄 CodeRabbit inference engine (AGENTS.md)
Use Prettier for formatting with 120-char print width, no semicolons, single quotes, trailing commas removed, and single attribute per line in Vue templates
Files:
test/assets/monetization-measurement.test.tsapp/pages/premium/index.vueapp/components/pages/premium/PremiumLandingOriginal.vueapp/plugins/040.matomo.client.ts
**/*.{ts,tsx,js,jsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
Use Nuxt flat ESLint via
@nuxt/eslintfor linting
Files:
test/assets/monetization-measurement.test.tsapp/pages/premium/index.vueapp/components/pages/premium/PremiumLandingOriginal.vueapp/plugins/040.matomo.client.ts
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,vue}: Define locales in config/i18n.ts as the single source of truth; do not hardcode locale lists in application code
Use PocketBase batch writes for multi-record replacement/reorder operations instead of one HTTP write per changed row
Files:
test/assets/monetization-measurement.test.tsapp/pages/premium/index.vueapp/components/pages/premium/PremiumLandingOriginal.vueapp/plugins/040.matomo.client.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx}: For URL validation/parsing, prefer URL.canParse() or URL.parse() over constructor try/catch
Use URL.parse() when the parsed URL object is needed, with URL.canParse() fallback in browser code if compatibility matters
Files:
test/assets/monetization-measurement.test.tsapp/plugins/040.matomo.client.ts
app/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
app/**/*.{vue,ts,tsx}: Use Nuxt 4 with Vue 3 and TypeScript for the frontend application
Use useLazyToast() to lazy-load vue-sonner; wait for ClientToaster to mount before calling toast.* using a proper async wait instead of plain nextTick()
Build reordered array synchronously instead of reading VueUse moveArrayElement() result before nextTick for state immediately persisted
Files:
app/pages/premium/index.vueapp/components/pages/premium/PremiumLandingOriginal.vueapp/plugins/040.matomo.client.ts
app/**/*.vue
📄 CodeRabbit inference engine (AGENTS.md)
app/**/*.vue: Use project.urls.production for canonical URLs to point to production (https://r34.app/...) even when served from clone domains
Keep breadcrumb Schema.org source item URLs local/locale-relative; do not convert to project.urls.production since nuxt-schema-org resolves against site.url
When triggering a premium prompt from a nested dialog/bottom sheet, let the sheet owner close local UI, open the prompt, and restore UI after prompt closes
Premium auth transitions are reload-backed in dashboard/sign-in flow; rely on page reload to clear memory state instead of tracking PocketBase user ids in useState
Files:
app/pages/premium/index.vueapp/components/pages/premium/PremiumLandingOriginal.vue
app/pages/**/*.vue
📄 CodeRabbit inference engine (AGENTS.md)
app/pages/**/*.vue: Use useSeoMeta in page components for page-specific tags (title, description)
Use flat bracket keys (filter[sort], filter[rating], etc.) with Vue Router's default query handling; do not re-add qs for nested route.query.filter objects unless URL contract changes
Keep@formkit/auto-animateroute-scoped unless used broadly; use local vAutoAnimate imports on specific pages instead of global directive
Keep TanStack infinite-query data raw and apply blocklist hiding in page-level computed rows; do not mutate query pages in select with selectedBlockList
Query filters use flat bracket keys (filter[sort], filter[rating]) with Vue Router default query handling
Files:
app/pages/premium/index.vue
app/components/**/*.vue
📄 CodeRabbit inference engine (AGENTS.md)
app/components/**/*.vue: Register Vue components without path prefix using pathPrefix: false in nuxt.config.ts; import them as not <Input/DomainSelector>
Auto-import components from app/components/ flat structure without folder prefix
Use custom imgproxy provider for images; generate images at 1x density only in webp format to reduce bandwidth
Use@nuxt/imagev2 preload API (preload: { fetchPriority: 'high' }) for image preload priority instead of patching rendered HTML in Nitro
Use Nuxt Lazy* components, dynamic imports, or similarly deferred boundaries for components and composables only needed after user interaction (menu, sheet, dialog)
Files:
app/components/pages/premium/PremiumLandingOriginal.vue
🧠 Learnings (1)
📚 Learning: 2026-06-22T07:50:54.935Z
Learnt from: AlejandroAkbal
Repo: Rule-34/App PR: 144
File: test/server/fix-canonical-queries.test.ts:174-178
Timestamp: 2026-06-22T07:50:54.935Z
Learning: In this Nuxt 3/4 project using `nuxt-schema-org` (v6.2.1), breadcrumb `source`/`itemListElement` URL values may be provided via `localePath()` (locale-relative in source code), but `nuxt-schema-org` renders JSON-LD with production-absolute URLs using `site.url` during schema rendering. When asserting JSON-LD breadcrumb `itemListElement` URLs in tests, expect production-absolute URLs (e.g., prefix with `project.urls.production.origin`), not the locale-relative `localePath()` forms. Do not flag production-absolute URL strings in JSON-LD breadcrumb tests as incorrect.
Applied to files:
test/assets/monetization-measurement.test.ts
🔇 Additional comments (6)
app/components/pages/premium/PremiumLandingOriginal.vue (3)
1-219: LGTM!
49-144: 🎯 Functional Correctness | ⚡ Quick winDead code path:
link.instructionsis never populated.The template checks
'instructions' in link && link.instructions(lines 684-693) to render extra steps for a payment link, but none of the link objects defined inpaymentIntervals(lines 49-144) ever set aninstructionsfield. This branch can never render. If this dropped a feature during the move from the old page (e.g. bank-transfer/manual-payment steps), it should be restored with the missing data; otherwise this dead branch should be removed.Also applies to: 679-694
220-577: LGTM!Also applies to: 578-714
app/pages/premium/index.vue (1)
1-11: LGTM!test/assets/monetization-measurement.test.ts (1)
11-11: LGTM!Also applies to: 22-27, 37-39
app/plugins/040.matomo.client.ts (1)
24-50: Ordering fix matches Matomo's official SPA integration pattern.Calling
loadAbTesting(which pushesAbTesting::create) before_paq.push(['trackPageView'])on every route change matches Matomo's documented SPA guidance, which shows the experiment-create call alongsidesetCustomUrl/trackPageViewon every virtual pageview, placed before thetrackPageViewpush. Removal of the eager premium-route Matomo load is consistent with the PR objective that Matomo stays interaction-gated.I verified this against Matomo's official documentation via web search, since the pattern initially looked like it could cause redundant re-registration of the same experiment on every navigation.
Also applies to: 84-93
|
Validated all CodeRabbit findings against the current branch:
Revalidated with focused Vitest, Nuxt typecheck, production build (247 routes), and |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
What changed
defineNuxtPluginlifecycleloadAbTestinghook forPremiumLandingV1/premium/index.vueto an 11-line lazy component selectorPremiumLandingOriginal.vueOfferFirstandYearlyFocustogether because they differ only by ordering and emphasisIntentional tradeoff
Matomo remains interaction-gated exactly as before. This avoids special tracker lifecycle behavior on Premium routes, but assignment can occur after the first interaction.
Validation
git diff --checkpassedSummary by CodeRabbit
New Features
Performance
Bug Fixes / Tracking
Tests