feat(clerk-js): send touch intent with session updates#8101
feat(clerk-js): send touch intent with session updates#8101nikosdouvlis merged 3 commits intomainfrom
Conversation
Pass touch intent through session touch requests so focus refreshes, session switches, and org switches can trigger the matching FAPI behavior. Made-with: Cursor
🦋 Changeset detectedLatest commit: c4db595 The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe changes extend the session touch API across the Clerk codebase to support an optional intent parameter. New types 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
Comment Tip CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.Add a .trivyignore file to your project to customize which findings Trivy reports. |
This reverts commit 7e60d2b.
This reverts commit ce67184.
…tate resolveAuthState had gaps in its condition branches that caused it to return undefined, triggering "Invalid state" errors. This was exposed by #8101 when touch responses came back without last_active_token. Two fixes: - When sessionId/userId exist but sessionClaims is missing (e.g. during client hydration before token fetch), return loading state instead of throwing - When orgId exists but orgRole is missing, fall through to signed-in without org state instead of throwing
Summary
intentonSession.touch()and__internal_touch()requestssetActive()touches asselect_sessionorselect_org, and focus refreshes asfocusTest plan
pnpm --filter @clerk/clerk-js test -- --run src/core/resources/__tests__/Session.test.ts src/core/__tests__/clerk.test.tsMade with Cursor
Summary by CodeRabbit
New Features
Tests