feat: add Kadam popunder trial - #153
Conversation
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughChangesPopunder provider loading
Sequence Diagram(s)sequenceDiagram
participant DebugPage
participant NuxtHead
participant KadamScript
DebugPage->>DebugPage: Resolve armed provider
DebugPage->>NuxtHead: Configure deferred script
NuxtHead->>KadamScript: Inject script without crossorigin
KadamScript-->>DebugPage: Report load or error
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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: 2
🤖 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 `@test/assets/popunder-provider-weights.test.ts`:
- Around line 9-16: Add a direct assertion in the regression test alongside the
Kadam check that locates the provider with key “profiton” and verifies its
weight is exactly 0.15, while preserving the existing Kadam and aggregate-weight
assertions.
In `@test/pages/popunder-debug.test.ts`:
- Line 13: Replace the source-text assertion in the popunder debug page test
with a Nuxt test-utils Playwright browser test that invokes the page’s armAds
flow, then inspect the DOM to verify provider injection creates the Kadam
container and the injected script omits the crossorigin attribute. Follow the
existing frontend test setup and use `@nuxt/test-utils` browser mode.
🪄 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: b449d2d1-e0e5-4c0a-9677-d2037ab9e3c7
📒 Files selected for processing (4)
app/composables/useAdvertisements.tsapp/pages/__ad-debug/popunder.vuetest/assets/popunder-provider-weights.test.tstest/pages/popunder-debug.test.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (8)
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/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.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/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.test.tsapp/pages/__ad-debug/popunder.vueapp/composables/useAdvertisements.ts
**/*.{ts,tsx,js,jsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
Use Nuxt flat ESLint via
@nuxt/eslintfor linting
Files:
test/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.test.tsapp/pages/__ad-debug/popunder.vueapp/composables/useAdvertisements.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/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.test.tsapp/pages/__ad-debug/popunder.vueapp/composables/useAdvertisements.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/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.test.tsapp/composables/useAdvertisements.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/__ad-debug/popunder.vueapp/composables/useAdvertisements.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/__ad-debug/popunder.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/__ad-debug/popunder.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/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.test.ts
🔇 Additional comments (2)
app/composables/useAdvertisements.ts (1)
74-74: LGTM!Also applies to: 86-105, 229-238, 257-263, 273-273
app/pages/__ad-debug/popunder.vue (1)
3-9: LGTM!Also applies to: 181-194, 213-214
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Real pre-production delivery verified in Chrome Testing/Profile 1. The live Kadam tag returned |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
test/pages/popunder-debug.test.ts (1)
8-11: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueUse debug browser options for the tracked page.
defaultSetupConfigenables Playwright mode withbrowser: true, butuseTrackedPageFactory()still creates pages withcreatePage()and nobrowserOptions. ApplydebugBrowserOptionshere unless another debug helper is intended.🤖 Prompt for 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. In `@test/pages/popunder-debug.test.ts` around lines 8 - 11, Update the tracked page setup in the “popunder debug page” suite so useTrackedPageFactory receives debugBrowserOptions when creating pages. Ensure the factory uses those browser options instead of relying on createPage’s defaults, while preserving the existing defaultSetupConfig setup.Source: Coding guidelines
🤖 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.
Outside diff comments:
In `@test/pages/popunder-debug.test.ts`:
- Around line 8-11: Update the tracked page setup in the “popunder debug page”
suite so useTrackedPageFactory receives debugBrowserOptions when creating pages.
Ensure the factory uses those browser options instead of relying on createPage’s
defaults, while preserving the existing defaultSetupConfig setup.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: baab008d-d9e8-40e2-9b90-6451c813a86c
📒 Files selected for processing (4)
app/composables/useAdvertisements.tsapp/pages/__ad-debug/popunder.vuetest/assets/popunder-provider-weights.test.tstest/pages/popunder-debug.test.ts
💤 Files with no reviewable changes (2)
- app/pages/__ad-debug/popunder.vue
- app/composables/useAdvertisements.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (5)
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/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.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/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.test.ts
**/*.{ts,tsx,js,jsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
Use Nuxt flat ESLint via
@nuxt/eslintfor linting
Files:
test/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.test.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/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.test.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/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.test.ts
🧠 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/pages/popunder-debug.test.tstest/assets/popunder-provider-weights.test.ts
🔇 Additional comments (2)
test/assets/popunder-provider-weights.test.ts (1)
10-16: LGTM!test/pages/popunder-debug.test.ts (1)
23-45: LGTM!
|
CodeRabbit current-head finding disposition: no change. |
Summary
crossoriginthrough the existing Nuxt/Unhead loaderVerification
.hneuyk427249elementsnthClick: 1andnext: 1200ERR_BLOCKED_BY_CLIENT, but the tag, bid request, and accepted delivery completed successfullycrossoriginattributeScope
No provider settings, browser blocker settings, code outside this PR, or deployment state were changed during verification.
Summary by CodeRabbit
New Features
Bug Fixes
Tests