refactor(mosaic): extract the debounced password check into useDebouncedAsync - #10065
alexcarpenter wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: eca67cb The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: This review used your included allowance. 7 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour. 📝 WalkthroughWalkthroughThe change adds Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This refactor moves the password hint's debounce and cancellation into a reusable hook while keeping the behavior the same. No actionable merge-blocking risk was found. Run the test and build checks before merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Description
Follow-up to #9930 (comment): the debounce, cancellation and stale-result handling for the new password hint move out of a
useEffectin the edit password controller and into a reusableuseDebouncedAsynchook. The password field behaves the same as before.The hint stays outside
useFormon purpose. It never blocks submit, so it isn't validation; TanStack Form and React Hook Form both keep non-blocking hints out of their validators too.useDebouncedAsync(value, run, { delayMs, enabled })returns{ data, error, isPending }:run(value, { signal })oncevaluehas stopped changing fordelayMs.signaland ignores late results.error.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change