Skip to content

Conversation

@dstaley
Copy link
Member

@dstaley dstaley commented Nov 10, 2025

Description

This PR updates our always-applied Cursor rules to use @clerk/shared/types, and how to update the package if a type error occurs. This should (hopefully!) improve agent performance when encountering type errors that arise as a result of needing to build the @clerk/shared package.

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

  • Documentation

    • Enhanced monorepo documentation with expanded package categories, development workflows, framework integrations, testing architecture, build system details, and release management guidance.
  • Chores

    • Added changeset entry for tracking internal updates.

@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2025

🦋 Changeset detected

Latest commit: 16f3429

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

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@vercel
Copy link

vercel bot commented Nov 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 Nov 10, 2025 5:35pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

This PR adds a new empty changeset file and expands monorepo documentation with detailed guidance on package categories, development workflows, testing architecture, build systems, environment configuration, localization support, package dependencies, and release management. No functional code changes introduced.

Changes

Cohort / File(s) Change Summary
Changeset metadata
\.changeset/wild-animals-call.md
New file added with YAML document separators; no functional content present.
Monorepo documentation
\.cursor/rules/monorepo.mdc
Front-matter corrections and comprehensive documentation expansion covering Core Package Categories, Directory Structure, Development Workflow, Framework-Specific Packages, Testing Architecture, Build System, Environment Configuration, Localization Support, Package Interdependency Rules, and Release Management.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Documentation and metadata additions only; no logic changes to review
  • Changeset file is minimal/empty
  • Monorepo.mdc changes are extensive but homogeneous (consistent documentation format and guidance structure)
  • Verification focus: accuracy of documented processes, consistency with codebase practices, and clarity of guidance

Poem

🐰 Hop, hop—the docs now bloom so bright,
With packages, workflows, all organized right,
From testing to builds, from frameworks to rules,
A monorepo guide for all coding tools!
The changeset marks change, the docs chart the way,
Adventure awaits in this updated display!

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(repo): Update rules for types' is partially related to the changeset. It mentions updating rules and types, which aligns with the monorepo.mdc documentation update that includes type-related guidance, but it's somewhat vague about the specific changes made.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ds.fix/cursor-rules-types

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

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

📜 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 67b98a9 and 16f3429.

📒 Files selected for processing (2)
  • .changeset/wild-animals-call.md (1 hunks)
  • .cursor/rules/monorepo.mdc (7 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
.changeset/**

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

Automated releases must use Changesets.

Files:

  • .changeset/wild-animals-call.md
.cursor/rules/**

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

Additional rule files for specific domains should be placed under .cursor/rules/

Files:

  • .cursor/rules/monorepo.mdc
🪛 LanguageTool
.changeset/wild-animals-call.md

[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- ---

(QB_NEW_DE)

⏰ 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 (quickstart, chrome, 15)
  • GitHub Check: Integration Tests (quickstart, chrome, 16)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (nextjs, chrome, 16)
  • GitHub Check: Integration Tests (machine, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 14)
  • GitHub Check: Integration Tests (custom, chrome)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (expo-web, chrome)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (handshake:staging, chrome)
  • GitHub Check: Integration Tests (elements, chrome)
  • GitHub Check: Integration Tests (sessions:staging, chrome)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (tanstack-react-start, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: Integration Tests (handshake, chrome)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • GitHub Check: Unit Tests (22, **)
  • GitHub Check: Publish with pkg-pr-new
  • GitHub Check: Static analysis
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (3)
.cursor/rules/monorepo.mdc (3)

1-5: Front-matter structure and alwaysApply rule preserved correctly.

The alwaysApply: true directive at line 4 is properly maintained, ensuring these Cursor rules are consistently applied across the monorepo. The description and globs additions provide helpful context for AI agents.

Please verify that the glob patterns on line 3 (if present and modified) correctly target the intended file scope for this rule set.


94-96: Excellent addition: Type error resolution guidance directly addresses PR objectives.

Lines 94–96 add the critical guidance referenced in the PR objectives: clarifying the @clerk/shared/types vs. @clerk/types distinction, deprecating the latter, and providing the exact build command (turbo build --filter=@clerk/shared --filter=@clerk/types) for agents to recover from type-related build failures. This will significantly improve agent performance when encountering type errors requiring package rebuilds.


7-107: Documentation content is comprehensive and well-organized.

The expanded sections (Repository Overview, Core Package Categories, Directory Structure, Development Workflow, Framework-Specific Packages, Testing Architecture, Build System, Environment Configuration, Localization Support, and Release Management) provide thorough guidance for agents navigating the monorepo. Content is clear, structured logically, and actionable.

Comment on lines +1 to +2
---
---
Copy link
Contributor

@coderabbitai coderabbitai bot Nov 10, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Incomplete changeset: missing required metadata and description.

Changeset files require package metadata and a description to support automated releases. The current file contains only YAML separators with no content between them.

A valid changeset should follow this structure:

 ---
+"@clerk/shared": minor
+"@clerk/types": minor
 ---
+
+Update Cursor rules to use @clerk/shared/types and add guidance for resolving type errors.

Reference the Changesets documentation for required format.

📝 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/shared: minor
@clerk/types: minor
---
Update Cursor rules to use @clerk/shared/types and add guidance for resolving type errors.
🧰 Tools
🪛 LanguageTool

[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- ---

(QB_NEW_DE)

Copy link
Member Author

Choose a reason for hiding this comment

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

Empty changesets like this are a specific action. They do not need to be called out as incomplete.

Copy link
Contributor

Choose a reason for hiding this comment

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

@dstaley, thank you for the clarification! I understand now that empty changesets with only YAML separators serve a specific purpose in your workflow. I'll make note of this to avoid flagging them as incomplete in future reviews.

(\__/)
(•ㅅ•)
/ >📝  *Taking notes!*

✏️ Learnings added
Learnt from: dstaley
Repo: clerk/javascript PR: 7196
File: .changeset/wild-animals-call.md:1-2
Timestamp: 2025-11-10T17:43:09.237Z
Learning: In the clerk/javascript repository, empty changeset files (containing only "---\n---" with no content) are intentional and serve a specific action. These should not be flagged as incomplete or requiring metadata and description.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 10, 2025

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/elements

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

@clerk/clerk-expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/clerk-react

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

@clerk/react-router

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

@clerk/remix

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/themes

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

@clerk/types

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

@clerk/upgrade

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

@clerk/vue

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

commit: 16f3429

@blacksmith-sh
Copy link

blacksmith-sh bot commented Nov 10, 2025

Found 6 test failures on Blacksmith runners:

Test View Logs
[chrome] › integration/tests/
session-tasks-multi-session.test.ts:33:9 › session tasks multi-session flow @nextjs › l
ong-running--next.appRouter.withSessionTasks › when switching sessions, navigate to tas
k
View Logs
[chrome] › integration/tests/
session-tasks-sign-in.test.ts:62:9 › session tasks after sign-in flow @nextjs › long-ru
nning--next.appRouter.withSessionTasks › with sso, navigate to task on after sign-in
View Logs
[chrome] › integration/tests/
session-tasks-sign-up.test.ts:54:9 › session tasks after sign-up flow @nextjs › long-ru
nning--next.appRouter.withSessionTasks › navigate to task on after sign-up
View Logs
[chrome] › integration/tests/
session-tasks-sign-up.test.ts:79:9 › session tasks after sign-up flow @nextjs › long-ru
nning--next.appRouter.withSessionTasks › with sso, navigate to task on after sign-up
View Logs
[chrome] › integration/tests/session-token-cache/
multi-session.test.ts:54:9 › MemoryTokenCache Multi-Session Integration @nextjs › long-
running--next.appRouter.withSessionTasks › MemoryTokenCache multi-session - multiple us
ers in different tabs with separate token caches
View Logs
[setup] › integration/tests/
global.setup.ts:7:6 › start long running apps ─────────────────────
View Logs


Fix in Cursor

@dstaley dstaley merged commit a95fece into main Nov 10, 2025
41 of 42 checks passed
@dstaley dstaley deleted the ds.fix/cursor-rules-types branch November 10, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants