Skip to content

Conversation

wobsoriano
Copy link
Member

@wobsoriano wobsoriano commented Sep 18, 2025

Description

The Vue GoogleOneTap component coerces boolean props to false when omitted due to Vue's SFC compilation, while the React version leaves them undefined. This causes different behavior between frameworks:

  • React: fedCmSupport defaults to true (via Google Identity Services)
  • Vue: fedCmSupport defaults to false (due to Vue's boolean coercion)

The same issue affects cancelOnTapOutside and itpSupport props.

Other Clerk components are unaffected because Clerk JS contexts normalize these values before consumption 👍🏼

This PR explicitly set default values that match the intended behavior documented here.

Before (one tap not rendered)

Screenshot 2025-09-18 at 5 40 35 PM

After

Screenshot 2025-09-18 at 5 41 20 PM

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • New Features
    • GoogleOneTap is now auto-imported in Nuxt projects.
    • PricingTable is auto-registered under Billing components for consistent availability.
  • Bug Fixes
    • Fixed incorrect default prop values for the GoogleOneTap component.
  • Chores
    • Added patch-level changeset entries for release tracking.

Copy link

changeset-bot bot commented Sep 18, 2025

🦋 Changeset detected

Latest commit: 1714ad0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@clerk/vue Patch
@clerk/nuxt Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Sep 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
clerk-js-sandbox Ready Ready Preview Comment Sep 19, 2025 0:45am

Copy link
Contributor

coderabbitai bot commented Sep 18, 2025

Walkthrough

Adds GoogleOneTap to the Nuxt module auto-registration and moves PricingTable into the Billing group (removing a duplicate). Sets default boolean props for the GoogleOneTap Vue component. Adds two patch-level changeset entries documenting the Nuxt auto-import and a bugfix for GoogleOneTap defaults. No other runtime logic changes.

Changes

Cohort / File(s) Summary of Changes
Nuxt module auto-registration
packages/nuxt/src/module.ts
Added GoogleOneTap to Authentication Components; moved PricingTable into the Billing Components group and removed its duplicate entry. No runtime or behavior changes beyond auto-registration ordering.
Vue component props
packages/vue/src/components/ui-components/GoogleOneTap.vue
Component props now use withDefaults(defineProps<GoogleOneTapProps>(), { cancelOnTapOutside: true, itpSupport: true, fedCmSupport: true }), adding default true values for three boolean props. Public prop names/type unchanged.
Changeset metadata
.changeset/twelve-carrots-bathe.md, .changeset/clean-cars-fly.md
Added patch changeset for @clerk/nuxt documenting GoogleOneTap as an auto-imported component; added patch changeset for @clerk/vue describing a bugfix for incorrect default prop values for GoogleOneTap. No code changes in changeset files.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant NuxtMod as Nuxt Module (Clerk)
  participant NuxtBuild as Nuxt Build
  participant App as Vue App
  participant GoogleOne as GoogleOneTap Component

  Dev->>NuxtBuild: run build/init
  NuxtBuild->>NuxtMod: initialize module
  NuxtMod->>NuxtBuild: addComponent(GoogleOneTap), adjust Billing components
  Note over NuxtBuild: Components registered for auto-import

  Dev->>App: use <GoogleOneTap /> in template
  App->>GoogleOne: instantiate component (props with defaults)
  GoogleOne-->>App: render UI
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I hop a patch into the flow,
GoogleOneTap now ready to show.
Defaults set so taps behave,
PricingTable finds its billing cave.
A carrot nod — tidy and light, I go. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "chore(vue,nuxt): Set default GoogleOneTap prop values" is concise and accurately captures the primary change—adding explicit default boolean props for the GoogleOneTap Vue component—and it correctly signals related Nuxt updates; it matches the PR description and the modified files.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rob/nuxt-missing-exports

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

pkg-pr-new bot commented Sep 19, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@6809

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@6809

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@6809

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@6809

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@6809

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@6809

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6809

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@6809

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@6809

@clerk/express

npm i https://pkg.pr.new/@clerk/express@6809

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@6809

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@6809

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@6809

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@6809

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@6809

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@6809

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6809

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@6809

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@6809

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@6809

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6809

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6809

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@6809

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@6809

commit: 1714ad0

@wobsoriano wobsoriano marked this pull request as draft September 19, 2025 00:01
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/nuxt/src/module.ts (1)

144-159: Add export for GoogleOneTap in @clerk/vue or remove it from the Nuxt module

GoogleOneTap exists at packages/clerk-js/src/ui/components/GoogleOneTap/* but is not exported from packages/vue/src/index.ts; keeping 'GoogleOneTap' in packages/nuxt/src/module.ts (lines 144–159) will cause runtime import errors. Either add a re-export in packages/vue/src/index.ts that points to the clerk-js implementation, or remove the 'GoogleOneTap' entry from the Nuxt module.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 35bc991 and cb6fab9.

📒 Files selected for processing (2)
  • .changeset/twelve-carrots-bathe.md (1 hunks)
  • packages/nuxt/src/module.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
.changeset/**

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Automated releases must use Changesets.

Files:

  • .changeset/twelve-carrots-bathe.md
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.{js,jsx,ts,tsx}: All code must pass ESLint checks with the project's configuration
Follow established naming conventions (PascalCase for components, camelCase for variables)
Maintain comprehensive JSDoc comments for public APIs
Use dynamic imports for optional features
All public APIs must be documented with JSDoc
Provide meaningful error messages to developers
Include error recovery suggestions where applicable
Log errors appropriately for debugging
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Profile and optimize critical paths
Validate all inputs and sanitize outputs
Implement proper logging with different levels

Files:

  • packages/nuxt/src/module.ts
**/*.{js,jsx,ts,tsx,json,css,scss,md,yaml,yml}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • packages/nuxt/src/module.ts
packages/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

TypeScript is required for all packages

Files:

  • packages/nuxt/src/module.ts
packages/**/*.{ts,tsx,d.ts}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Packages should export TypeScript types alongside runtime code

Files:

  • packages/nuxt/src/module.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use proper TypeScript error types

**/*.{ts,tsx}: Always define explicit return types for functions, especially public APIs
Use proper type annotations for variables and parameters where inference isn't clear
Avoid any type - prefer unknown when type is uncertain, then narrow with type guards
Use interface for object shapes that might be extended
Use type for unions, primitives, and computed types
Prefer readonly properties for immutable data structures
Use private for internal implementation details
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Prefer readonly for properties that shouldn't change after construction
Prefer composition and interfaces over deep inheritance chains
Use mixins for shared behavior across unrelated classes
Implement dependency injection for loose coupling
Let TypeScript infer when types are obvious
Use const assertions for literal types: as const
Use satisfies operator for type checking without widening
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Use type-only imports: import type { ... } from ...
No any types without justification
Proper error handling with typed errors
Consistent use of readonly for immutable data
Proper generic constraints
No unused type parameters
Proper use of utility types instead of manual type construction
Type-only imports where possible
Proper tree-shaking friendly exports
No circular dependencies
Efficient type computations (avoid deep recursion)

Files:

  • packages/nuxt/src/module.ts
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Support multiple Clerk environment variables (CLERK_, NEXT_PUBLIC_CLERK_, etc.) for configuration.

Files:

  • packages/nuxt/src/module.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
  • GitHub Check: Integration Tests (nextjs, chrome, 14)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (custom, chrome)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (machine, chrome)
  • GitHub Check: Integration Tests (tanstack-react-start, chrome)
  • GitHub Check: Integration Tests (tanstack-react-router, chrome)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (expo-web, chrome)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (elements, chrome)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (quickstart, chrome)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: Unit Tests (18, --filter=@clerk/astro --filter=@clerk/backend --filter=@clerk/express --filter=@c...
  • GitHub Check: Publish with pkg-pr-new
  • GitHub Check: Unit Tests (22, **)
  • GitHub Check: Static analysis
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (2)
packages/nuxt/src/module.ts (1)

144-144: LGTM! GoogleOneTap correctly added to Authentication Components.

The placement in the Authentication Components section is appropriate and aligns with the component's purpose.

.changeset/twelve-carrots-bathe.md (1)

1-11: LGTM! Changeset properly documents the new auto-imported component.

The changeset correctly:

  • Uses patch-level versioning for this additive change
  • Provides clear documentation of the new GoogleOneTap component
  • Includes a practical Vue usage example
  • Follows the established changeset format

Comment on lines +158 to +159
// Billing Components
'PricingTable',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

🧩 Analysis chain

Verify PricingTable component organization and duplication removal.

The reorganization places PricingTable under "Billing Components" which is semantically correct. However, I need to verify that the duplicate PricingTable entry was actually removed and that this component exists in @clerk/vue.


🏁 Script executed:

#!/bin/bash
# Description: Verify PricingTable organization and check for duplicates in the module

# Check if PricingTable appears only once in the components array
echo "Checking PricingTable occurrences in module.ts:"
rg -n "PricingTable" packages/nuxt/src/module.ts

# Verify PricingTable export exists in @clerk/vue
echo -e "\nChecking if PricingTable is exported from @clerk/vue:"
rg -n "PricingTable" packages/vue/src/index.ts || echo "Not found in vue/src/index.ts, checking other export files..."

# Check for PricingTable component definition
echo -e "\nSearching for PricingTable component definition:"
fd -t f -e ts -e tsx | xargs rg -l "PricingTable" | head -10

Length of output: 769


Export PricingTable from @clerk/vue or update Nuxt module import

  • packages/nuxt/src/module.ts contains a single 'PricingTable' entry (packages/nuxt/src/module.ts:159) — duplicate removed.
  • Component implementation exists at packages/clerk-js/src/ui/components/PricingTable/(index.tsx, PricingTable.tsx) but is not exported from packages/vue/src/index.ts.
  • Action: either re-export PricingTable from packages/vue/src/index.ts (pointing to the clerk-js implementation) or update packages/nuxt/src/module.ts to register/import the component from the package that actually exposes it.
🤖 Prompt for AI Agents
In packages/nuxt/src/module.ts around lines 158-159, Nuxt registers a
'PricingTable' component but that component isn't exported from
packages/vue/src/index.ts (the actual implementation lives at
packages/clerk-js/src/ui/components/PricingTable). Fix by either: (A)
re-exporting the component from packages/vue/src/index.ts by adding an export
that points to ../../clerk-js/src/ui/components/PricingTable (so @clerk/vue
exposes PricingTable for the Nuxt module), or (B) change
packages/nuxt/src/module.ts to import/register the component directly from
packages/clerk-js/src/ui/components/PricingTable instead of @clerk/vue; ensure
imports use the correct relative package path and update any index exports to
avoid duplicate entries.

@wobsoriano wobsoriano changed the title chore(nuxt): Add GoogleOneTap to auto-imported components chore(vue,nuxt): Set default GoogleOneTap prop values Sep 19, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/vue/src/components/ui-components/GoogleOneTap.vue (1)

8-12: Add a short intent comment to keep frameworks in sync.

A brief note will help future maintainers avoid regressions when React or GIS defaults change.

Apply:

-const props = withDefaults(defineProps<GoogleOneTapProps>(), {
+// Explicit defaults to avoid Vue SFC boolean coercion to false; keep in sync with @clerk/react and GIS defaults.
+const props = withDefaults(defineProps<GoogleOneTapProps>(), {
   cancelOnTapOutside: true,
   itpSupport: true,
   fedCmSupport: true,
 });
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between cb6fab9 and 1714ad0.

📒 Files selected for processing (3)
  • .changeset/clean-cars-fly.md (1 hunks)
  • .changeset/twelve-carrots-bathe.md (1 hunks)
  • packages/vue/src/components/ui-components/GoogleOneTap.vue (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/clean-cars-fly.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/twelve-carrots-bathe.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: Integration Tests (nextjs, chrome, 14)
  • GitHub Check: Integration Tests (custom, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: Static analysis
  • GitHub Check: Publish with pkg-pr-new
  • GitHub Check: Unit Tests (22, **)
  • GitHub Check: Unit Tests (18, --filter=@clerk/astro --filter=@clerk/backend --filter=@clerk/express --filter=@c...
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: semgrep/ci
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (2)
packages/vue/src/components/ui-components/GoogleOneTap.vue (2)

8-12: Good fix: explicit Vue defaults prevent boolean coercion and align with React/GIS.

Using withDefaults here ensures omitted booleans don’t silently become false. Looks correct.


8-12: Verify type parity and React defaults for GoogleOneTap props

  • packages/types/src/clerk.ts: GoogleOneTapProps declares cancelOnTapOutside?, itpSupport?, fedCmSupport? (cancelOnTapOutside has JSDoc @default true).
  • packages/vue/src/components/ui-components/GoogleOneTap.vue: component sets cancelOnTapOutside, itpSupport, fedCmSupport to true via withDefaults — Vue matches the types/docs.
  • I couldn't find the @clerk/react GoogleOneTap implementation in this branch — confirm @clerk/react either leaves these props undefined (so the SDK/docs default to true apply) or explicitly defaults them to true; if it uses different defaults, align the implementations.

@wobsoriano wobsoriano merged commit 99922ec into main Sep 19, 2025
40 checks passed
@wobsoriano wobsoriano deleted the rob/nuxt-missing-exports branch September 19, 2025 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants