Skip to content

Conversation

dstaley
Copy link
Member

@dstaley dstaley commented Oct 10, 2025

Description

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
    • Added an experimental auth surface with hooks: useSignIn and useSignUp, available via @clerk/tanstack-react-start/experimental, enabling sign-in and sign-up flows in TanStack Start apps.
  • Chores
    • Published the experimental entry so it can be imported by consumers.

Copy link

changeset-bot bot commented Oct 10, 2025

🦋 Changeset detected

Latest commit: 5623d8b

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

This PR includes changesets to release 1 package
Name Type
@clerk/tanstack-react-start 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 Oct 10, 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 Oct 10, 2025 4:29pm

Copy link
Contributor

coderabbitai bot commented Oct 10, 2025

Walkthrough

Adds a new experimental export surface for tanstack-react-start, exposing useSignIn and useSignUp hooks by aliasing Clerk’s experimental signals. Updates package.json exports and files to publish the new entry point. Includes a changeset entry documenting the new module and hooks.

Changes

Cohort / File(s) Summary
Experimental API surface
packages/tanstack-react-start/src/experimental.ts
New module re-exporting useSignInSignal and useSignUpSignal from @clerk/clerk-react/experimental as useSignIn and useSignUp.
Package export/publish config
packages/tanstack-react-start/package.json
Adds "./experimental" to exports with type and default paths; includes "experimental" in files for publishing.
Release notes / changeset
.changeset/tame-tips-own.md
Documents the new experimental module and hooks for sign-in and sign-up flows.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant App as App (Consumer)
  participant TRS as @clerk/tanstack-react-start/experimental
  participant CRX as @clerk/clerk-react/experimental
  participant Clerk as Clerk Services

  App->>TRS: import { useSignIn, useSignUp }
  note over TRS: Aliased re-exports of signals
  TRS->>CRX: useSignInSignal / useSignUpSignal
  CRX->>Clerk: Initiate sign-in/sign-up flows
  Clerk-->>CRX: Auth state / results
  CRX-->>App: Signals update (success/error)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A nibble of code, a hop to new ground,
Two little hooks where experiments are found.
Sign in, sign up—signals align,
Alias paths neat, publishing fine.
I twitch my whiskers, merge with delight—
Shipping new carrots by Friday night! 🥕✨

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 pull request title succinctly describes the primary change by indicating the addition of an experimental export in the tanstack-react-start package, matching the core modification introduced across multiple files and configuration updates.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ds.feat/tanstack-experimental

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

Copy link

pkg-pr-new bot commented Oct 10, 2025

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/elements

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

@clerk/clerk-expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/clerk-react

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

@clerk/react-router

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

@clerk/remix

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/themes

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

@clerk/types

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

@clerk/upgrade

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

@clerk/vue

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

commit: 5623d8b

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: 2

📜 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 a66357e and 5623d8b.

📒 Files selected for processing (3)
  • .changeset/tame-tips-own.md (1 hunks)
  • packages/tanstack-react-start/package.json (2 hunks)
  • packages/tanstack-react-start/src/experimental.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
.changeset/**

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

Automated releases must use Changesets.

Files:

  • .changeset/tame-tips-own.md
**/*.{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/tanstack-react-start/package.json
  • packages/tanstack-react-start/src/experimental.ts
packages/*/package.json

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

All publishable packages should be placed under the packages/ directory

packages/*/package.json: All publishable packages must be located in the 'packages/' directory.
All packages must be published under the @clerk namespace on npm.
Semantic versioning must be used across all packages.

Files:

  • packages/tanstack-react-start/package.json
**/*.{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/tanstack-react-start/src/experimental.ts
packages/**/*.{ts,tsx}

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

TypeScript is required for all packages

Files:

  • packages/tanstack-react-start/src/experimental.ts
packages/**/*.{ts,tsx,d.ts}

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

Packages should export TypeScript types alongside runtime code

Files:

  • packages/tanstack-react-start/src/experimental.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/tanstack-react-start/src/experimental.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/tanstack-react-start/src/experimental.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). (28)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (custom, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 14)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Integration Tests (machine, chrome)
  • GitHub Check: Integration Tests (handshake, chrome)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (elements, chrome)
  • GitHub Check: Integration Tests (expo-web, chrome)
  • GitHub Check: Integration Tests (handshake:staging, chrome)
  • GitHub Check: Integration Tests (tanstack-react-start, chrome)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (sessions:staging, chrome)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (quickstart, chrome)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • 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: Static analysis
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (3)
packages/tanstack-react-start/package.json (2)

46-49: LGTM!

The experimental export configuration follows the established pattern used by other exports in this package (server, errors, webhooks). The structure correctly specifies both TypeScript types and the default export path.


58-59: LGTM!

Adding "experimental" to the files array ensures the new export will be included in the published package. The placement is consistent with the other export entries.

packages/tanstack-react-start/src/experimental.ts (1)

1-1: Verify module exports
Confirm that useSignInSignal and useSignUpSignal are actually exported by your installed version of @clerk/clerk-react/experimental; otherwise these re-exports will break at runtime.

@@ -0,0 +1,5 @@
---
'@clerk/tanstack-react-start': patch
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 | 🟠 Major

Use "minor" version bump for new feature.

According to semantic versioning, a "patch" bump is for backward-compatible bug fixes, while a "minor" bump is for backward-compatible new functionality. Since this PR adds new exports and hooks, it should be a minor version bump.

Apply this diff:

-'@clerk/tanstack-react-start': patch
+'@clerk/tanstack-react-start': minor
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'@clerk/tanstack-react-start': patch
'@clerk/tanstack-react-start': minor
🤖 Prompt for AI Agents
In .changeset/tame-tips-own.md around line 2, the release type is set to 'patch'
but this PR introduces new exports/hooks so it must be a 'minor' bump; edit the
file to replace 'patch' with 'minor' for the '@clerk/tanstack-react-start' entry
(save the changes and commit them).

@@ -0,0 +1 @@
export { useSignInSignal as useSignIn, useSignUpSignal as useSignUp } from '@clerk/clerk-react/experimental';
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Add JSDoc documentation for public API.

These exported hooks constitute a public API surface and should be documented with JSDoc comments explaining their purpose, usage, and relationship to the underlying experimental signals.

As per coding guidelines

Apply this diff to add JSDoc:

+/**
+ * Experimental hook that provides access to the sign-in flow state and methods.
+ * This is an alias for `useSignInSignal` from `@clerk/clerk-react/experimental`.
+ * @experimental This API is experimental and may change in future versions.
+ */
 export { useSignInSignal as useSignIn, useSignUpSignal as useSignUp } from '@clerk/clerk-react/experimental';

Alternatively, document both hooks separately:

+/**
+ * Experimental hook that provides access to the sign-in flow state and methods.
+ * This is an alias for `useSignInSignal` from `@clerk/clerk-react/experimental`.
+ * @experimental This API is experimental and may change in future versions.
+ */
+export { useSignInSignal as useSignIn } from '@clerk/clerk-react/experimental';
+
+/**
+ * Experimental hook that provides access to the sign-up flow state and methods.
+ * This is an alias for `useSignUpSignal` from `@clerk/clerk-react/experimental`.
+ * @experimental This API is experimental and may change in future versions.
+ */
+export { useSignUpSignal as useSignUp } from '@clerk/clerk-react/experimental';

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In packages/tanstack-react-start/src/experimental.ts around line 1, the exported
re-exports for useSignIn and useSignUp lack JSDoc comments; add JSDoc above each
export (or a grouped JSDoc if you prefer) describing the hook purpose, basic
usage, parameters/return shape (if applicable), and that they are thin
re-exports of the experimental signals from @clerk/clerk-react/experimental;
include tags like @public and a brief note about experimental stability and a
pointer to the underlying implementation package or docs.

@nikosdouvlis nikosdouvlis merged commit e9a9f03 into main Oct 17, 2025
42 checks passed
@nikosdouvlis nikosdouvlis deleted the ds.feat/tanstack-experimental branch October 17, 2025 05:03
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.

5 participants