-
Notifications
You must be signed in to change notification settings - Fork 411
fix(clerk-js,localizations,shared): Show the correct message when using same password on reset password task #7372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(clerk-js,localizations,shared): Show the correct message when using same password on reset password task #7372
Conversation
🦋 Changeset detectedLatest commit: 854dce3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 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.
|
WalkthroughThis pull request introduces support for a new error code Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
There was a problem hiding this 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
🧹 Nitpick comments (10)
packages/localizations/src/bn-IN.ts (1)
895-895: Consider adding Bengali translation for better user experience.The new error key
form_new_password_matches_currentis currently set toundefined, meaning Bengali users won't see a localized error message when they attempt to reset their password using the same password. While this is consistent with other missing translations in this community-contributed locale file, providing a translation would improve the user experience.Would you like me to suggest a Bengali translation for this error message? A possible translation could be:
- form_new_password_matches_current: undefined, + form_new_password_matches_current: 'নতুন পাসওয়ার্ড বর্তমান পাসওয়ার্ডের মতো হতে পারবে না।',(Translation: "The new password cannot be the same as the current password.")
packages/localizations/src/es-UY.ts (1)
885-897: Consider localizingform_new_password_matches_currentinstead of leaving it undefinedThe new error key is present but untranslated, so es-UY users will likely see a fallback message while other password errors are localized. Since this PR is specifically about this error, it’s worth adding a Spanish string here.
You could apply something like:
- form_new_password_matches_current: undefined, + form_new_password_matches_current: 'La nueva contraseña no puede ser igual a la actual.',packages/localizations/src/hi-IN.ts (1)
883-895: Error key added; consider future translation for hi-IN
unstable__errors.form_new_password_matches_currentis correctly added and will participate in lookups for the new error code. When convenient, you might want to add a Hindi string here (to match the rest of this fairly complete locale), but leaving itundefinedfor now is safe and consistent with other partially translated keys.packages/localizations/src/hu-HU.ts (1)
877-896: New password error key correctly added to unstable__errors
form_new_password_matches_current: undefinedis correctly named, placed alongside the otherform_*errors, and matches the pattern used in this locale for untranslated community strings. No changes needed now; you can later replaceundefinedwith a Hungarian translation if one becomes available.packages/localizations/src/he-IL.ts (1)
869-890: Hebrew locale exposes the new password-match error key correctlyThe
form_new_password_matches_current: undefinedentry is correctly wired intounstable__errorsnext to the other form errors and matches the global key name. Keeping itundefinedis fine for now and will allow fallback behavior until a Hebrew translation is provided.packages/localizations/src/ta-IN.ts (1)
885-903: Tamil locale exposes the new error key consistentlyThe
form_new_password_matches_current: undefinedentry is correctly added tounstable__errorsbeside other form validation errors, matching the shared type and cross-locale naming. Leaving itundefinedis acceptable until a Tamil translation is contributed.packages/localizations/src/ru-RU.ts (1)
890-907: Russian locale now includes the new password-match error keyAdding
form_new_password_matches_current: undefinedunderunstable__errorsis correct and keeps the structure aligned with other locales and the shared type. This will allow the new error to surface; a Russian translation can be added later without further type or structural changes.packages/localizations/src/te-IN.ts (1)
885-903: Telugu locale correctly wires in form_new_password_matches_currentThe
form_new_password_matches_current: undefinedentry is correctly added tounstable__errorsalongside related form errors, matching the shared error code surface used elsewhere. This is structurally sound; you can later replaceundefinedwith a Telugu translation if desired.packages/localizations/src/pt-BR.ts (1)
890-916: Key alignment looks good; optional future localization
unstable__errors.form_new_password_matches_currentis correctly added and will be picked up bycreatePasswordError. When you have a canonical pt-BR phrasing for “New password cannot be the same as the current password”, you can drop it in here to avoid falling back to the default-locale message, but this is fine for now.packages/clerk-js/src/ui/utils/passwordUtils.ts (1)
33-46: Correctly routesform_new_password_matches_currentthrough localized error pathExtending the special-case branch to include
form_new_password_matches_currentkeeps this new API error aligned with the existing password error handling and theunstable__errors.form_new_password_matches_currentkey. The behavior looks correct and matches the rest of the function.If this list of codes keeps growing, consider switching to an array/Set with an
includescheck for readability, but it’s not necessary right now.
📜 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.
📒 Files selected for processing (53)
.changeset/modern-areas-accept.md(1 hunks)packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsx(2 hunks)packages/clerk-js/src/ui/utils/passwordUtils.ts(1 hunks)packages/localizations/src/ar-SA.ts(1 hunks)packages/localizations/src/be-BY.ts(1 hunks)packages/localizations/src/bg-BG.ts(1 hunks)packages/localizations/src/bn-IN.ts(1 hunks)packages/localizations/src/ca-ES.ts(1 hunks)packages/localizations/src/cs-CZ.ts(1 hunks)packages/localizations/src/da-DK.ts(1 hunks)packages/localizations/src/de-DE.ts(1 hunks)packages/localizations/src/el-GR.ts(1 hunks)packages/localizations/src/en-GB.ts(1 hunks)packages/localizations/src/en-US.ts(1 hunks)packages/localizations/src/es-CR.ts(1 hunks)packages/localizations/src/es-ES.ts(1 hunks)packages/localizations/src/es-MX.ts(1 hunks)packages/localizations/src/es-UY.ts(1 hunks)packages/localizations/src/fa-IR.ts(1 hunks)packages/localizations/src/fi-FI.ts(1 hunks)packages/localizations/src/fr-FR.ts(1 hunks)packages/localizations/src/he-IL.ts(1 hunks)packages/localizations/src/hi-IN.ts(1 hunks)packages/localizations/src/hr-HR.ts(1 hunks)packages/localizations/src/hu-HU.ts(1 hunks)packages/localizations/src/id-ID.ts(1 hunks)packages/localizations/src/is-IS.ts(1 hunks)packages/localizations/src/it-IT.ts(1 hunks)packages/localizations/src/ja-JP.ts(1 hunks)packages/localizations/src/kk-KZ.ts(1 hunks)packages/localizations/src/ko-KR.ts(1 hunks)packages/localizations/src/mn-MN.ts(1 hunks)packages/localizations/src/ms-MY.ts(1 hunks)packages/localizations/src/nb-NO.ts(1 hunks)packages/localizations/src/nl-BE.ts(1 hunks)packages/localizations/src/nl-NL.ts(1 hunks)packages/localizations/src/pl-PL.ts(1 hunks)packages/localizations/src/pt-BR.ts(1 hunks)packages/localizations/src/pt-PT.ts(1 hunks)packages/localizations/src/ro-RO.ts(1 hunks)packages/localizations/src/ru-RU.ts(1 hunks)packages/localizations/src/sk-SK.ts(1 hunks)packages/localizations/src/sr-RS.ts(1 hunks)packages/localizations/src/sv-SE.ts(1 hunks)packages/localizations/src/ta-IN.ts(1 hunks)packages/localizations/src/te-IN.ts(1 hunks)packages/localizations/src/th-TH.ts(1 hunks)packages/localizations/src/tr-TR.ts(1 hunks)packages/localizations/src/uk-UA.ts(1 hunks)packages/localizations/src/vi-VN.ts(1 hunks)packages/localizations/src/zh-CN.ts(1 hunks)packages/localizations/src/zh-TW.ts(1 hunks)packages/shared/src/types/localization.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (16)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
All code must pass ESLint checks with the project's configuration
Files:
packages/localizations/src/nb-NO.tspackages/localizations/src/zh-CN.tspackages/localizations/src/es-UY.tspackages/localizations/src/ko-KR.tspackages/localizations/src/es-MX.tspackages/localizations/src/ja-JP.tspackages/localizations/src/cs-CZ.tspackages/localizations/src/hu-HU.tspackages/localizations/src/ro-RO.tspackages/localizations/src/ar-SA.tspackages/localizations/src/el-GR.tspackages/localizations/src/mn-MN.tspackages/localizations/src/nl-BE.tspackages/localizations/src/sv-SE.tspackages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsxpackages/localizations/src/th-TH.tspackages/localizations/src/ru-RU.tspackages/localizations/src/is-IS.tspackages/localizations/src/fr-FR.tspackages/localizations/src/ca-ES.tspackages/localizations/src/bn-IN.tspackages/localizations/src/en-GB.tspackages/localizations/src/kk-KZ.tspackages/localizations/src/uk-UA.tspackages/localizations/src/it-IT.tspackages/localizations/src/pt-PT.tspackages/localizations/src/te-IN.tspackages/localizations/src/nl-NL.tspackages/localizations/src/be-BY.tspackages/localizations/src/da-DK.tspackages/localizations/src/es-ES.tspackages/localizations/src/hr-HR.tspackages/localizations/src/zh-TW.tspackages/localizations/src/en-US.tspackages/localizations/src/pl-PL.tspackages/localizations/src/ms-MY.tspackages/localizations/src/fi-FI.tspackages/localizations/src/es-CR.tspackages/localizations/src/vi-VN.tspackages/clerk-js/src/ui/utils/passwordUtils.tspackages/localizations/src/tr-TR.tspackages/localizations/src/ta-IN.tspackages/localizations/src/bg-BG.tspackages/localizations/src/he-IL.tspackages/localizations/src/pt-BR.tspackages/localizations/src/id-ID.tspackages/localizations/src/hi-IN.tspackages/shared/src/types/localization.tspackages/localizations/src/de-DE.tspackages/localizations/src/sr-RS.tspackages/localizations/src/sk-SK.tspackages/localizations/src/fa-IR.ts
**/*.{js,jsx,ts,tsx,json,md,yml,yaml}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
Use Prettier for consistent code formatting
Files:
packages/localizations/src/nb-NO.tspackages/localizations/src/zh-CN.tspackages/localizations/src/es-UY.tspackages/localizations/src/ko-KR.tspackages/localizations/src/es-MX.tspackages/localizations/src/ja-JP.tspackages/localizations/src/cs-CZ.tspackages/localizations/src/hu-HU.tspackages/localizations/src/ro-RO.tspackages/localizations/src/ar-SA.tspackages/localizations/src/el-GR.tspackages/localizations/src/mn-MN.tspackages/localizations/src/nl-BE.tspackages/localizations/src/sv-SE.tspackages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsxpackages/localizations/src/th-TH.tspackages/localizations/src/ru-RU.tspackages/localizations/src/is-IS.tspackages/localizations/src/fr-FR.tspackages/localizations/src/ca-ES.tspackages/localizations/src/bn-IN.tspackages/localizations/src/en-GB.tspackages/localizations/src/kk-KZ.tspackages/localizations/src/uk-UA.tspackages/localizations/src/it-IT.tspackages/localizations/src/pt-PT.tspackages/localizations/src/te-IN.tspackages/localizations/src/nl-NL.tspackages/localizations/src/be-BY.tspackages/localizations/src/da-DK.tspackages/localizations/src/es-ES.tspackages/localizations/src/hr-HR.tspackages/localizations/src/zh-TW.tspackages/localizations/src/en-US.tspackages/localizations/src/pl-PL.tspackages/localizations/src/ms-MY.tspackages/localizations/src/fi-FI.tspackages/localizations/src/es-CR.tspackages/localizations/src/vi-VN.tspackages/clerk-js/src/ui/utils/passwordUtils.tspackages/localizations/src/tr-TR.tspackages/localizations/src/ta-IN.tspackages/localizations/src/bg-BG.tspackages/localizations/src/he-IL.tspackages/localizations/src/pt-BR.tspackages/localizations/src/id-ID.tspackages/localizations/src/hi-IN.tspackages/shared/src/types/localization.tspackages/localizations/src/de-DE.tspackages/localizations/src/sr-RS.tspackages/localizations/src/sk-SK.tspackages/localizations/src/fa-IR.ts
packages/**/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
TypeScript is required for all packages
Files:
packages/localizations/src/nb-NO.tspackages/localizations/src/zh-CN.tspackages/localizations/src/es-UY.tspackages/localizations/src/ko-KR.tspackages/localizations/src/es-MX.tspackages/localizations/src/ja-JP.tspackages/localizations/src/cs-CZ.tspackages/localizations/src/hu-HU.tspackages/localizations/src/ro-RO.tspackages/localizations/src/ar-SA.tspackages/localizations/src/el-GR.tspackages/localizations/src/mn-MN.tspackages/localizations/src/nl-BE.tspackages/localizations/src/sv-SE.tspackages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsxpackages/localizations/src/th-TH.tspackages/localizations/src/ru-RU.tspackages/localizations/src/is-IS.tspackages/localizations/src/fr-FR.tspackages/localizations/src/ca-ES.tspackages/localizations/src/bn-IN.tspackages/localizations/src/en-GB.tspackages/localizations/src/kk-KZ.tspackages/localizations/src/uk-UA.tspackages/localizations/src/it-IT.tspackages/localizations/src/pt-PT.tspackages/localizations/src/te-IN.tspackages/localizations/src/nl-NL.tspackages/localizations/src/be-BY.tspackages/localizations/src/da-DK.tspackages/localizations/src/es-ES.tspackages/localizations/src/hr-HR.tspackages/localizations/src/zh-TW.tspackages/localizations/src/en-US.tspackages/localizations/src/pl-PL.tspackages/localizations/src/ms-MY.tspackages/localizations/src/fi-FI.tspackages/localizations/src/es-CR.tspackages/localizations/src/vi-VN.tspackages/clerk-js/src/ui/utils/passwordUtils.tspackages/localizations/src/tr-TR.tspackages/localizations/src/ta-IN.tspackages/localizations/src/bg-BG.tspackages/localizations/src/he-IL.tspackages/localizations/src/pt-BR.tspackages/localizations/src/id-ID.tspackages/localizations/src/hi-IN.tspackages/shared/src/types/localization.tspackages/localizations/src/de-DE.tspackages/localizations/src/sr-RS.tspackages/localizations/src/sk-SK.tspackages/localizations/src/fa-IR.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
Follow established naming conventions (PascalCase for components, camelCase for variables)
Prefer importing types from
@clerk/shared/typesinstead of the deprecated@clerk/typesalias
Files:
packages/localizations/src/nb-NO.tspackages/localizations/src/zh-CN.tspackages/localizations/src/es-UY.tspackages/localizations/src/ko-KR.tspackages/localizations/src/es-MX.tspackages/localizations/src/ja-JP.tspackages/localizations/src/cs-CZ.tspackages/localizations/src/hu-HU.tspackages/localizations/src/ro-RO.tspackages/localizations/src/ar-SA.tspackages/localizations/src/el-GR.tspackages/localizations/src/mn-MN.tspackages/localizations/src/nl-BE.tspackages/localizations/src/sv-SE.tspackages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsxpackages/localizations/src/th-TH.tspackages/localizations/src/ru-RU.tspackages/localizations/src/is-IS.tspackages/localizations/src/fr-FR.tspackages/localizations/src/ca-ES.tspackages/localizations/src/bn-IN.tspackages/localizations/src/en-GB.tspackages/localizations/src/kk-KZ.tspackages/localizations/src/uk-UA.tspackages/localizations/src/it-IT.tspackages/localizations/src/pt-PT.tspackages/localizations/src/te-IN.tspackages/localizations/src/nl-NL.tspackages/localizations/src/be-BY.tspackages/localizations/src/da-DK.tspackages/localizations/src/es-ES.tspackages/localizations/src/hr-HR.tspackages/localizations/src/zh-TW.tspackages/localizations/src/en-US.tspackages/localizations/src/pl-PL.tspackages/localizations/src/ms-MY.tspackages/localizations/src/fi-FI.tspackages/localizations/src/es-CR.tspackages/localizations/src/vi-VN.tspackages/clerk-js/src/ui/utils/passwordUtils.tspackages/localizations/src/tr-TR.tspackages/localizations/src/ta-IN.tspackages/localizations/src/bg-BG.tspackages/localizations/src/he-IL.tspackages/localizations/src/pt-BR.tspackages/localizations/src/id-ID.tspackages/localizations/src/hi-IN.tspackages/shared/src/types/localization.tspackages/localizations/src/de-DE.tspackages/localizations/src/sr-RS.tspackages/localizations/src/sk-SK.tspackages/localizations/src/fa-IR.ts
packages/**/src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
packages/**/src/**/*.{ts,tsx,js,jsx}: Maintain comprehensive JSDoc comments for public APIs
Use tree-shaking friendly exports
Validate all inputs and sanitize outputs
All public APIs must be documented with JSDoc
Use dynamic imports for optional features
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
Implement proper logging with different levels
Files:
packages/localizations/src/nb-NO.tspackages/localizations/src/zh-CN.tspackages/localizations/src/es-UY.tspackages/localizations/src/ko-KR.tspackages/localizations/src/es-MX.tspackages/localizations/src/ja-JP.tspackages/localizations/src/cs-CZ.tspackages/localizations/src/hu-HU.tspackages/localizations/src/ro-RO.tspackages/localizations/src/ar-SA.tspackages/localizations/src/el-GR.tspackages/localizations/src/mn-MN.tspackages/localizations/src/nl-BE.tspackages/localizations/src/sv-SE.tspackages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsxpackages/localizations/src/th-TH.tspackages/localizations/src/ru-RU.tspackages/localizations/src/is-IS.tspackages/localizations/src/fr-FR.tspackages/localizations/src/ca-ES.tspackages/localizations/src/bn-IN.tspackages/localizations/src/en-GB.tspackages/localizations/src/kk-KZ.tspackages/localizations/src/uk-UA.tspackages/localizations/src/it-IT.tspackages/localizations/src/pt-PT.tspackages/localizations/src/te-IN.tspackages/localizations/src/nl-NL.tspackages/localizations/src/be-BY.tspackages/localizations/src/da-DK.tspackages/localizations/src/es-ES.tspackages/localizations/src/hr-HR.tspackages/localizations/src/zh-TW.tspackages/localizations/src/en-US.tspackages/localizations/src/pl-PL.tspackages/localizations/src/ms-MY.tspackages/localizations/src/fi-FI.tspackages/localizations/src/es-CR.tspackages/localizations/src/vi-VN.tspackages/clerk-js/src/ui/utils/passwordUtils.tspackages/localizations/src/tr-TR.tspackages/localizations/src/ta-IN.tspackages/localizations/src/bg-BG.tspackages/localizations/src/he-IL.tspackages/localizations/src/pt-BR.tspackages/localizations/src/id-ID.tspackages/localizations/src/hi-IN.tspackages/shared/src/types/localization.tspackages/localizations/src/de-DE.tspackages/localizations/src/sr-RS.tspackages/localizations/src/sk-SK.tspackages/localizations/src/fa-IR.ts
**/*.ts?(x)
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
Use proper TypeScript error types
Files:
packages/localizations/src/nb-NO.tspackages/localizations/src/zh-CN.tspackages/localizations/src/es-UY.tspackages/localizations/src/ko-KR.tspackages/localizations/src/es-MX.tspackages/localizations/src/ja-JP.tspackages/localizations/src/cs-CZ.tspackages/localizations/src/hu-HU.tspackages/localizations/src/ro-RO.tspackages/localizations/src/ar-SA.tspackages/localizations/src/el-GR.tspackages/localizations/src/mn-MN.tspackages/localizations/src/nl-BE.tspackages/localizations/src/sv-SE.tspackages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsxpackages/localizations/src/th-TH.tspackages/localizations/src/ru-RU.tspackages/localizations/src/is-IS.tspackages/localizations/src/fr-FR.tspackages/localizations/src/ca-ES.tspackages/localizations/src/bn-IN.tspackages/localizations/src/en-GB.tspackages/localizations/src/kk-KZ.tspackages/localizations/src/uk-UA.tspackages/localizations/src/it-IT.tspackages/localizations/src/pt-PT.tspackages/localizations/src/te-IN.tspackages/localizations/src/nl-NL.tspackages/localizations/src/be-BY.tspackages/localizations/src/da-DK.tspackages/localizations/src/es-ES.tspackages/localizations/src/hr-HR.tspackages/localizations/src/zh-TW.tspackages/localizations/src/en-US.tspackages/localizations/src/pl-PL.tspackages/localizations/src/ms-MY.tspackages/localizations/src/fi-FI.tspackages/localizations/src/es-CR.tspackages/localizations/src/vi-VN.tspackages/clerk-js/src/ui/utils/passwordUtils.tspackages/localizations/src/tr-TR.tspackages/localizations/src/ta-IN.tspackages/localizations/src/bg-BG.tspackages/localizations/src/he-IL.tspackages/localizations/src/pt-BR.tspackages/localizations/src/id-ID.tspackages/localizations/src/hi-IN.tspackages/shared/src/types/localization.tspackages/localizations/src/de-DE.tspackages/localizations/src/sr-RS.tspackages/localizations/src/sk-SK.tspackages/localizations/src/fa-IR.ts
packages/localizations/**
📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)
packages/localizations/**: Localization support must include translations for 30+ languages using a modular localization system
Support RTL languages in the localization system
Files:
packages/localizations/src/nb-NO.tspackages/localizations/src/zh-CN.tspackages/localizations/src/es-UY.tspackages/localizations/src/ko-KR.tspackages/localizations/src/es-MX.tspackages/localizations/src/ja-JP.tspackages/localizations/src/cs-CZ.tspackages/localizations/src/hu-HU.tspackages/localizations/src/ro-RO.tspackages/localizations/src/ar-SA.tspackages/localizations/src/el-GR.tspackages/localizations/src/mn-MN.tspackages/localizations/src/nl-BE.tspackages/localizations/src/sv-SE.tspackages/localizations/src/th-TH.tspackages/localizations/src/ru-RU.tspackages/localizations/src/is-IS.tspackages/localizations/src/fr-FR.tspackages/localizations/src/ca-ES.tspackages/localizations/src/bn-IN.tspackages/localizations/src/en-GB.tspackages/localizations/src/kk-KZ.tspackages/localizations/src/uk-UA.tspackages/localizations/src/it-IT.tspackages/localizations/src/pt-PT.tspackages/localizations/src/te-IN.tspackages/localizations/src/nl-NL.tspackages/localizations/src/be-BY.tspackages/localizations/src/da-DK.tspackages/localizations/src/es-ES.tspackages/localizations/src/hr-HR.tspackages/localizations/src/zh-TW.tspackages/localizations/src/en-US.tspackages/localizations/src/pl-PL.tspackages/localizations/src/ms-MY.tspackages/localizations/src/fi-FI.tspackages/localizations/src/es-CR.tspackages/localizations/src/vi-VN.tspackages/localizations/src/tr-TR.tspackages/localizations/src/ta-IN.tspackages/localizations/src/bg-BG.tspackages/localizations/src/he-IL.tspackages/localizations/src/pt-BR.tspackages/localizations/src/id-ID.tspackages/localizations/src/hi-IN.tspackages/localizations/src/de-DE.tspackages/localizations/src/sr-RS.tspackages/localizations/src/sk-SK.tspackages/localizations/src/fa-IR.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/typescript.mdc)
**/*.{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
Avoidanytype - preferunknownwhen type is uncertain, then narrow with type guards
Implement type guards forunknowntypes using the patternfunction isType(value: unknown): value is Type
Useinterfacefor object shapes that might be extended
Usetypefor unions, primitives, and computed types
Preferreadonlyproperties for immutable data structures
Useprivatefor internal implementation details in classes
Useprotectedfor inheritance hierarchies
Usepublicexplicitly for clarity in public APIs
Use mixins for shared behavior across unrelated classes in TypeScript
Use generic constraints with bounded type parameters like<T extends { id: string }>
Use utility types likeOmit,Partial, andPickfor data transformation instead of manual type construction
Use discriminated unions instead of boolean flags for state management and API responses
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation at the type level
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Document functions with JSDoc comments including @param, @returns, @throws, and @example tags
Create custom error classes that extend Error for specific error types
Use the Result pattern for error handling instead of throwing exceptions
Use optional chaining (?.) and nullish coalescing (??) operators for safe property access
Let TypeScript infer obvious types to reduce verbosity
Useconst assertionswithas constfor literal types
Usesatisfiesoperator for type checking without widening types
Declare readonly arrays and objects for immutable data structures
Use spread operator and array spread for immutable updates instead of mutations
Use lazy loading for large types...
Files:
packages/localizations/src/nb-NO.tspackages/localizations/src/zh-CN.tspackages/localizations/src/es-UY.tspackages/localizations/src/ko-KR.tspackages/localizations/src/es-MX.tspackages/localizations/src/ja-JP.tspackages/localizations/src/cs-CZ.tspackages/localizations/src/hu-HU.tspackages/localizations/src/ro-RO.tspackages/localizations/src/ar-SA.tspackages/localizations/src/el-GR.tspackages/localizations/src/mn-MN.tspackages/localizations/src/nl-BE.tspackages/localizations/src/sv-SE.tspackages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsxpackages/localizations/src/th-TH.tspackages/localizations/src/ru-RU.tspackages/localizations/src/is-IS.tspackages/localizations/src/fr-FR.tspackages/localizations/src/ca-ES.tspackages/localizations/src/bn-IN.tspackages/localizations/src/en-GB.tspackages/localizations/src/kk-KZ.tspackages/localizations/src/uk-UA.tspackages/localizations/src/it-IT.tspackages/localizations/src/pt-PT.tspackages/localizations/src/te-IN.tspackages/localizations/src/nl-NL.tspackages/localizations/src/be-BY.tspackages/localizations/src/da-DK.tspackages/localizations/src/es-ES.tspackages/localizations/src/hr-HR.tspackages/localizations/src/zh-TW.tspackages/localizations/src/en-US.tspackages/localizations/src/pl-PL.tspackages/localizations/src/ms-MY.tspackages/localizations/src/fi-FI.tspackages/localizations/src/es-CR.tspackages/localizations/src/vi-VN.tspackages/clerk-js/src/ui/utils/passwordUtils.tspackages/localizations/src/tr-TR.tspackages/localizations/src/ta-IN.tspackages/localizations/src/bg-BG.tspackages/localizations/src/he-IL.tspackages/localizations/src/pt-BR.tspackages/localizations/src/id-ID.tspackages/localizations/src/hi-IN.tspackages/shared/src/types/localization.tspackages/localizations/src/de-DE.tspackages/localizations/src/sr-RS.tspackages/localizations/src/sk-SK.tspackages/localizations/src/fa-IR.ts
packages/clerk-js/src/ui/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/clerk-js-ui.mdc)
packages/clerk-js/src/ui/**/*.{ts,tsx}: Element descriptors should be written in camelCase
Use useCardState for card-level state management
Use useFormState for form-level state management
Use useLoadingStatus for managing loading states
Use useFormControl hook for form field state management with validation and localization support
All rendered values must be localized using useLocalizations hook - hard coded values are not allowed
Use localizationKeys for translating UI text with support for parameters and error messages
Use handleError utility for API error handling and provide field states for proper error mapping
Use the styled system sx prop with theme tokens for custom styling instead of inline styles
Use the Card component pattern with Card.Root, Card.Header, Card.Title, Card.Content, and Card.Footer for consistent card layouts
Use FormContainer with headerTitle and headerSubtitle localization keys combined with Form.Root and FormButtons for consistent form layouts
When form submission occurs, manage loading and error states by calling status.setLoading(), card.setLoading(), and card.setError() appropriately
Files:
packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsxpackages/clerk-js/src/ui/utils/passwordUtils.ts
**/*.{test,spec}.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
**/*.{test,spec}.{ts,tsx,js,jsx}: Unit tests are required for all new functionality
Verify proper error handling and edge cases
Include tests for all new features
Files:
packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsx
**/*.tsx
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
**/*.tsx: Use error boundaries in React components
Minimize re-renders in React components
**/*.tsx: Use proper type definitions for props and state in React components
Leverage TypeScript's type inference where possible in React components
Use proper event types for handlers in React components
Implement proper generic types for reusable React components
Use proper type guards for conditional rendering in React components
Files:
packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsx
**/*.{test,spec,e2e}.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
Use real Clerk instances for integration tests
Files:
packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsx
**/*.{md,tsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
Update documentation for API changes
Files:
packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsx
**/*.test.tsx
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
Use React Testing Library for component testing
Files:
packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsx
**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/react.mdc)
**/*.{jsx,tsx}: Always use functional components with hooks instead of class components
Follow PascalCase naming for components (e.g.,UserProfile,NavigationMenu)
Keep components focused on a single responsibility - split large components
Limit component size to 150-200 lines; extract logic into custom hooks
Use composition over inheritance - prefer smaller, composable components
Export components as named exports for better tree-shaking
One component per file with matching filename and component name
Separate UI components from business logic components
Use useState for simple state management in React components
Use useReducer for complex state logic in React components
Implement proper state initialization in React components
Use proper state updates with callbacks in React components
Implement proper state cleanup in React components
Use Context API for theme/authentication state management
Implement proper state persistence in React applications
Use React.memo for expensive components
Implement proper useCallback for handlers in React components
Use proper useMemo for expensive computations in React components
Implement proper virtualization for lists in React components
Use proper code splitting with React.lazy in React applications
Implement proper cleanup in useEffect hooks
Use proper refs for DOM access in React components
Implement proper event listener cleanup in React components
Use proper abort controllers for fetch in React components
Implement proper subscription cleanup in React components
Use proper HTML elements for semantic HTML in React components
Implement proper ARIA attributes for accessibility in React components
Use proper heading hierarchy in React components
Implement proper form labels in React components
Use proper button types in React components
Implement proper focus management for keyboard navigation in React components
Use proper keyboard shortcuts in React components
Implement proper tab order in React components
Use proper ...
Files:
packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsx
**/*.{test,spec}.{jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/react.mdc)
**/*.{test,spec}.{jsx,tsx}: Use React Testing Library for unit testing React components
Test component behavior, not implementation details
Use proper test queries in React Testing Library tests
Implement proper test isolation in React component tests
Use proper test coverage in React component tests
Test component interactions in integration tests
Use proper test data in React component tests
Implement proper test setup in React component tests
Use proper test cleanup in React component tests
Implement proper test assertions in React component tests
Use proper test structure for React component tests
Files:
packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsx
🧬 Code graph analysis (2)
packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsx (2)
packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskResetPassword/index.tsx (1)
TaskResetPassword(201-203)packages/clerk-js/src/test/utils.ts (1)
waitFor(73-73)
packages/clerk-js/src/ui/utils/passwordUtils.ts (1)
scripts/search-for-rhc.mjs (1)
errors(37-37)
⏰ 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). (5)
- GitHub Check: Build Packages
- GitHub Check: Formatting | Dedupe | Changeset
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (42)
packages/localizations/src/sk-SK.ts (1)
894-894: LGTM!The new localization key
form_new_password_matches_currenthas been added correctly within theunstable__errorssection. Theundefinedvalue is consistent with the pattern used throughout this community-contributed locale and aligns with the file's disclaimer about translations not being fully maintained.packages/localizations/src/th-TH.ts (1)
889-889: LGTM! Placeholder follows the established pattern.The addition of
form_new_password_matches_current: undefinedis consistent with how this community-contributed locale handles untranslated strings. The key follows the naming convention and is correctly placed within theunstable__errorssection.Note: While
undefinedis acceptable as a placeholder, providing an actual Thai translation would improve the user experience for th-TH locale users. When this error occurs, users will likely see a fallback message (typically English).packages/localizations/src/sr-RS.ts (1)
887-887: LGTM! Placeholder for new password validation error.The new
form_new_password_matches_currentkey is correctly placed in theunstable__errorssection and follows the established naming convention. Theundefinedvalue is acceptable as a placeholder for this community-contributed localization file.When a Serbian translation becomes available, providing a translated message would improve the user experience for Serbian-speaking users encountering this error.
packages/localizations/src/ar-SA.ts (1)
875-887: New password error key wired correctly
unstable__errors.form_new_password_matches_currentis added consistently with surrounding keys and keeps the resource type-complete for the new error code. Leaving itundefinedmatches the existing pattern of untranslated strings in this community locale and allows fallback to the default message.packages/localizations/src/nb-NO.ts (1)
877-889: Consistent addition of new password error key
unstable__errors.form_new_password_matches_currentis correctly added alongside the other form/password errors, ensuring the new backend error code can be localized (or fall back) without type or runtime issues.packages/localizations/src/ca-ES.ts (1)
878-890: New error code mapped into localization surfaceThe
form_new_password_matches_currententry is correctly introduced underunstable__errors, keeping the locale in sync with the shared error type and allowing the new error code to resolve to a message (or fallback) without breaking lookups.packages/localizations/src/mn-MN.ts (1)
878-890: Locale kept in sync with new password errorAdding
unstable__errors.form_new_password_matches_currentkeeps the Mongolian resource aligned with the shared error set; usingundefinedis consistent with other untranslated keys and safe for fallback behavior.packages/localizations/src/ms-MY.ts (1)
886-899: New error key wiring looks correct
form_new_password_matches_current: undefinedis added in the right place withinunstable__errorsand follows the existing pattern of usingundefinedplaceholders for untranslated keys. No issues from a type or localization-surface perspective.packages/localizations/src/sv-SE.ts (1)
881-895: Swedish locale correctly exposes new password error keyThe addition of
form_new_password_matches_current: undefinedunderunstable__errorscleanly extends the error key surface without impacting existing translations. Structure and ordering are consistent with the rest of the file.packages/localizations/src/ro-RO.ts (1)
891-904: Romanian unstable__errors updated consistently
form_new_password_matches_current: undefinedis introduced in the correct section and matches the existing pattern of leaving some errors untranslated (fallback handled elsewhere). No structural or typing concerns.packages/localizations/src/fi-FI.ts (1)
879-893: Finnish locale correctly surfaces new error keyThe new
form_new_password_matches_current: undefinedentry underunstable__errorsis well-placed and consistent with the file’s existing placeholder strategy. Looks good.packages/localizations/src/de-DE.ts (1)
893-907: German unstable__errors extended appropriatelyAdding
form_new_password_matches_current: undefinedunderunstable__errorsmatches the established error-key pattern and keeps ordering coherent. No issues detected.packages/localizations/src/bg-BG.ts (1)
879-898: New password error key added correctly
form_new_password_matches_current: undefinedis correctly named and consistent with other untranslatedunstable__errorsentries in this locale; it keeps the localization shape in sync with the shared types.packages/localizations/src/tr-TR.ts (1)
880-901: Turkish locale updated with new password error keyThe
form_new_password_matches_current: undefinedentry is correctly added underunstable__errorsand aligns with other untranslated keys in this file.packages/localizations/src/ko-KR.ts (1)
871-894: Korean unstable__errors surface kept in syncAdding
form_new_password_matches_current: undefinedkeeps the Korean localization resource aligned with the shared error set; fallback behavior for this message will continue to work.packages/localizations/src/el-GR.ts (1)
881-902: Greek locale includes new password-match error keyThe
form_new_password_matches_current: undefinedentry is correctly added and keeps the Greekunstable__errorsobject in sync with the shared localization types.packages/localizations/src/fa-IR.ts (1)
889-910: fa-IR unstable__errors extended with new key
form_new_password_matches_current: undefinedis correctly introduced and maintains compatibility with the updatedUnstableErrorssurface; behavior will fall back to the default message until a Farsi translation is added..changeset/modern-areas-accept.md (1)
1-7: Changeset correctly scopes the patch-level bugfixPatch bumps for
@clerk/localizations,@clerk/clerk-js, and@clerk/sharedalign with the touched surfaces, and the summary clearly describes theform_new_password_matches_currentfix. No edits needed.packages/localizations/src/zh-TW.ts (1)
875-875: New error key is correctly added and consistent with locale structure
form_new_password_matches_currentis spelled correctly, placed alongside relatedform_*errors, and usingundefinedmatches the existing pattern for untranslated entries in this community locale. No changes needed.packages/localizations/src/en-US.ts (1)
887-887: English error message for matching passwords looks correct
form_new_password_matches_currentis added in the right place and the copy (“New password cannot be the same as the current password.”) is clear and aligned with the validation semantics. All good.packages/localizations/src/fr-FR.ts (1)
905-905: French locale correctly exposes the new error key
form_new_password_matches_currentis correctly introduced underunstable__errorswith consistent naming and ordering. Leaving itundefinedis in line with other untranslated entries in this community file and keeps typings in sync.packages/localizations/src/da-DK.ts (1)
887-887: Danish locale: new error key is wired up correctlyThe
form_new_password_matches_currententry is added underunstable__errorswith correct naming and grouping. Usingundefinedmatches the pattern for untranslated strings in this locale and keeps the surface aligned with other languages.packages/localizations/src/cs-CZ.ts (1)
900-900: Czech locale cleanly adds the new password-matches-current error key
form_new_password_matches_currentis correctly named, placed with relatedform_*errors, and usingundefinedkeeps the locale structurally consistent while deferring translation. Looks good.packages/localizations/src/pt-PT.ts (1)
876-899: New password-reuse error key is correctly wired
unstable__errors.form_new_password_matches_currentmatches the new backend error code and thecreatePasswordErrormapping, and keeping itundefinedis consistent with other community locales so the UI can safely fall back to the default message.packages/localizations/src/zh-CN.ts (1)
865-887: Consistent addition ofform_new_password_matches_currentThe new
unstable__errors.form_new_password_matches_currentkey matches the API error code andcreatePasswordErrorhandling; leaving itundefinedfollows the established pattern for partially translated locales while still enabling proper fallback behavior.packages/localizations/src/be-BY.ts (1)
883-899: Belarusian localization surface updated consistentlyAdding
unstable__errors.form_new_password_matches_currentkeeps this locale’s error surface in sync with the shared types andcreatePasswordErrorlogic. Leaving itundefinedis acceptable until a translation is available.packages/localizations/src/is-IS.ts (1)
880-899: Icelandic locale now exposes the new password-reuse error key
unstable__errors.form_new_password_matches_currentis added with the expected name, so the new error code will resolve cleanly through the localization pipeline even before a translation is provided.packages/localizations/src/ja-JP.ts (1)
890-903: New password-match error key correctly added to ja-JP unstable__errorsThe
form_new_password_matches_currententry is added in the right place and matches the sharedUnstableErrorstype; usingundefinedis consistent with other placeholder errors in this locale and will safely fall back to the default language.packages/localizations/src/vi-VN.ts (1)
887-899: vi-VN unstable__errors updated to include new password-match keyAdding
form_new_password_matches_current: undefinedaligns this locale with the updatedUnstableErrorscontract and mirrors how other untranslated errors are handled, so type coverage and fallback behavior remain correct.packages/localizations/src/es-CR.ts (1)
885-899: es-CR locale now exposes form_new_password_matches_current in unstable__errorsThe new
form_new_password_matches_current: undefinedentry cleanly extends the error map to support the new password-reset validation case, matching the shared type and other locales’ structure.packages/localizations/src/id-ID.ts (1)
885-899: id-ID unstable__errors correctly extended for same-password validation errorThe
form_new_password_matches_currentkey is added in the appropriate section of the error map and matches the centralUnstableErrorsdefinition, preserving type-safety and fallback behavior.packages/shared/src/types/localization.ts (1)
1307-1326: UnstableErrors type correctly extended with form_new_password_matches_currentAdding
form_new_password_matches_current: LocalizationValuetoUnstableErrorscleanly exposes the new error code to all locales and keeps type definitions aligned with the UI and localization resources.packages/localizations/src/nl-NL.ts (1)
879-891: New password error key correctly added for nl-NL
form_new_password_matches_currentis spelled and placed consistently with otherform_*errors, and leaving itundefinedmatches the pattern for untranslated community strings in this file. No further changes needed.packages/localizations/src/nl-BE.ts (1)
879-891: New password error key correctly added for nl-BE
form_new_password_matches_currentis added underunstable__errorswith the same structure and conventions as existing form error keys; this aligns with the new error code without impacting behavior.packages/localizations/src/es-ES.ts (1)
879-892: es-ES now exposes the new password-matches-current error keyThe
form_new_password_matches_currententry is correctly added and grouped with relatedform_*errors. Usingundefinedkeeps the shape in sync with other locales while allowing translation to be added later.packages/localizations/src/es-MX.ts (1)
887-901: es-MX unstable errors extended with new password-matches-current key
form_new_password_matches_currentis added with correct naming and placement; leaving itundefinedis consistent with other untranslated entries in this file and safely extends the error surface.packages/localizations/src/kk-KZ.ts (1)
871-883: kk-KZ unstable errors correctly include new password-matches-current keyThe
form_new_password_matches_currententry is added with the right identifier and structure, maintaining parity with other locales and keeping the resource type-safe. No further adjustments needed.packages/localizations/src/en-GB.ts (1)
880-895: New error key wiring in en-GB looks correctAdding
form_new_password_matches_current: undefinedunderunstable__errorskeeps the locale in sync with the shared error surface and matches the existing pattern of leaving many keys undefined until translated.packages/localizations/src/hr-HR.ts (1)
880-895: hr-HR localization surface updated correctlyAdding
form_new_password_matches_current: undefinedunderunstable__errorskeeps this locale aligned with the shared error code set without changing runtime behavior.packages/localizations/src/uk-UA.ts (1)
875-890: uk-UA unstable error key addition is consistentThe new
form_new_password_matches_current: undefinedentry underunstable__errorscorrectly exposes the error code for this locale, consistent with the rest of the file.packages/localizations/src/pl-PL.ts (1)
883-898: pl-PL now exposes the new password error keyThe addition of
form_new_password_matches_current: undefinedunderunstable__errorsis correct and keeps the Polish localization schema in sync with the shared error types.packages/localizations/src/it-IT.ts (1)
886-901: it-IT unstable error key addition looks good
form_new_password_matches_current: undefinedis correctly wired intounstable__errors, aligning this locale with the new shared error code.
.../src/ui/components/SessionTasks/tasks/TaskResetPassword/__tests__/TaskResetPassword.test.tsx
Outdated
Show resolved
Hide resolved
… error message directly on password error and added localizations
d18f7d0 to
854dce3
Compare
There was a problem hiding this 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 (6)
packages/localizations/src/ms-MY.ts (1)
887-897: New error key wiring looks correct
unstable__errors.form_new_password_matches_currentis added with the expected name and placement, and usingundefinedis consistent with how this community file handles untranslated strings. Once you localize it, you can safely replaceundefinedwith the Malay message; no further changes needed here.packages/localizations/src/be-BY.ts (1)
884-895: Key addition is consistent with other localesIntroducing
unstable__errors.form_new_password_matches_currenthere aligns this locale with the shared error surface and other languages. Leaving it asundefinedis acceptable for now and will fall back to the default message; you can add a Belarusian translation later without further code changes.packages/localizations/src/ca-ES.ts (1)
879-890: Locale wired up for the new password reuse error
unstable__errors.form_new_password_matches_currentis correctly introduced and keeps the object shape in sync with the shared types and other locales. Usingundefinedis fine for now and will use the fallback copy; consider adding a Catalan translation when available.packages/localizations/src/fa-IR.ts (1)
889-900: fa-IR locale correctly exposes the new error keyAdding
unstable__errors.form_new_password_matches_currentkeeps this locale in sync with the shared error surface. Leaving itundefinedfits the existing pattern for untranslated entries and will fall back to the default text until a Farsi translation is provided.packages/localizations/src/fi-FI.ts (1)
890-890: LGTM - Consistent addition of new error key.The new
form_new_password_matches_currenterror key is correctly positioned alphabetically and follows the established pattern of usingundefinedfor untranslated strings in this community-maintained locale. The localization system will fall back to the default locale when this error occurs.If Finnish-speaking contributors are available, providing an actual translation would improve the user experience. A suggested translation might be:
- form_new_password_matches_current: undefined, + form_new_password_matches_current: 'Uusi salasana ei voi olla sama kuin nykyinen salasana.',However, this is completely optional given the community-maintained nature of this file.
packages/localizations/src/mn-MN.ts (1)
889-889: LGTM - Consistent addition of new error key.The new
form_new_password_matches_currenterror key is correctly positioned alphabetically and follows the established pattern of usingundefinedfor untranslated strings in this community-maintained locale. The localization system will fall back to the default locale when this error occurs.If Mongolian-speaking contributors are available, providing an actual translation would enhance the user experience for Mongolian users. However, this is optional given the community-maintained nature of this file.
📜 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.
📒 Files selected for processing (52)
.changeset/modern-areas-accept.md(1 hunks)packages/clerk-js/src/ui/utils/passwordUtils.ts(1 hunks)packages/localizations/src/ar-SA.ts(1 hunks)packages/localizations/src/be-BY.ts(1 hunks)packages/localizations/src/bg-BG.ts(1 hunks)packages/localizations/src/bn-IN.ts(1 hunks)packages/localizations/src/ca-ES.ts(1 hunks)packages/localizations/src/cs-CZ.ts(1 hunks)packages/localizations/src/da-DK.ts(1 hunks)packages/localizations/src/de-DE.ts(1 hunks)packages/localizations/src/el-GR.ts(1 hunks)packages/localizations/src/en-GB.ts(1 hunks)packages/localizations/src/en-US.ts(1 hunks)packages/localizations/src/es-CR.ts(1 hunks)packages/localizations/src/es-ES.ts(1 hunks)packages/localizations/src/es-MX.ts(1 hunks)packages/localizations/src/es-UY.ts(1 hunks)packages/localizations/src/fa-IR.ts(1 hunks)packages/localizations/src/fi-FI.ts(1 hunks)packages/localizations/src/fr-FR.ts(1 hunks)packages/localizations/src/he-IL.ts(1 hunks)packages/localizations/src/hi-IN.ts(1 hunks)packages/localizations/src/hr-HR.ts(1 hunks)packages/localizations/src/hu-HU.ts(1 hunks)packages/localizations/src/id-ID.ts(1 hunks)packages/localizations/src/is-IS.ts(1 hunks)packages/localizations/src/it-IT.ts(1 hunks)packages/localizations/src/ja-JP.ts(1 hunks)packages/localizations/src/kk-KZ.ts(1 hunks)packages/localizations/src/ko-KR.ts(1 hunks)packages/localizations/src/mn-MN.ts(1 hunks)packages/localizations/src/ms-MY.ts(1 hunks)packages/localizations/src/nb-NO.ts(1 hunks)packages/localizations/src/nl-BE.ts(1 hunks)packages/localizations/src/nl-NL.ts(1 hunks)packages/localizations/src/pl-PL.ts(1 hunks)packages/localizations/src/pt-BR.ts(1 hunks)packages/localizations/src/pt-PT.ts(1 hunks)packages/localizations/src/ro-RO.ts(1 hunks)packages/localizations/src/ru-RU.ts(1 hunks)packages/localizations/src/sk-SK.ts(1 hunks)packages/localizations/src/sr-RS.ts(1 hunks)packages/localizations/src/sv-SE.ts(1 hunks)packages/localizations/src/ta-IN.ts(1 hunks)packages/localizations/src/te-IN.ts(1 hunks)packages/localizations/src/th-TH.ts(1 hunks)packages/localizations/src/tr-TR.ts(1 hunks)packages/localizations/src/uk-UA.ts(1 hunks)packages/localizations/src/vi-VN.ts(1 hunks)packages/localizations/src/zh-CN.ts(1 hunks)packages/localizations/src/zh-TW.ts(1 hunks)packages/shared/src/types/localization.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (38)
- packages/localizations/src/vi-VN.ts
- packages/clerk-js/src/ui/utils/passwordUtils.ts
- packages/localizations/src/bn-IN.ts
- packages/localizations/src/ar-SA.ts
- packages/localizations/src/sr-RS.ts
- packages/localizations/src/kk-KZ.ts
- packages/localizations/src/en-GB.ts
- .changeset/modern-areas-accept.md
- packages/localizations/src/sv-SE.ts
- packages/localizations/src/ru-RU.ts
- packages/localizations/src/id-ID.ts
- packages/localizations/src/uk-UA.ts
- packages/localizations/src/de-DE.ts
- packages/localizations/src/ko-KR.ts
- packages/localizations/src/el-GR.ts
- packages/localizations/src/is-IS.ts
- packages/localizations/src/es-MX.ts
- packages/localizations/src/da-DK.ts
- packages/localizations/src/hr-HR.ts
- packages/localizations/src/tr-TR.ts
- packages/localizations/src/th-TH.ts
- packages/localizations/src/pt-PT.ts
- packages/localizations/src/nl-BE.ts
- packages/localizations/src/cs-CZ.ts
- packages/localizations/src/hi-IN.ts
- packages/localizations/src/hu-HU.ts
- packages/localizations/src/ja-JP.ts
- packages/localizations/src/zh-TW.ts
- packages/localizations/src/es-CR.ts
- packages/localizations/src/es-UY.ts
- packages/localizations/src/te-IN.ts
- packages/localizations/src/pt-BR.ts
- packages/localizations/src/es-ES.ts
- packages/localizations/src/ro-RO.ts
- packages/localizations/src/he-IL.ts
- packages/localizations/src/it-IT.ts
- packages/localizations/src/ta-IN.ts
- packages/localizations/src/nl-NL.ts
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
All code must pass ESLint checks with the project's configuration
Files:
packages/localizations/src/pl-PL.tspackages/localizations/src/fa-IR.tspackages/localizations/src/ms-MY.tspackages/localizations/src/bg-BG.tspackages/localizations/src/nb-NO.tspackages/localizations/src/ca-ES.tspackages/localizations/src/be-BY.tspackages/localizations/src/sk-SK.tspackages/shared/src/types/localization.tspackages/localizations/src/mn-MN.tspackages/localizations/src/en-US.tspackages/localizations/src/fi-FI.tspackages/localizations/src/zh-CN.tspackages/localizations/src/fr-FR.ts
**/*.{js,jsx,ts,tsx,json,md,yml,yaml}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
Use Prettier for consistent code formatting
Files:
packages/localizations/src/pl-PL.tspackages/localizations/src/fa-IR.tspackages/localizations/src/ms-MY.tspackages/localizations/src/bg-BG.tspackages/localizations/src/nb-NO.tspackages/localizations/src/ca-ES.tspackages/localizations/src/be-BY.tspackages/localizations/src/sk-SK.tspackages/shared/src/types/localization.tspackages/localizations/src/mn-MN.tspackages/localizations/src/en-US.tspackages/localizations/src/fi-FI.tspackages/localizations/src/zh-CN.tspackages/localizations/src/fr-FR.ts
packages/**/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
TypeScript is required for all packages
Files:
packages/localizations/src/pl-PL.tspackages/localizations/src/fa-IR.tspackages/localizations/src/ms-MY.tspackages/localizations/src/bg-BG.tspackages/localizations/src/nb-NO.tspackages/localizations/src/ca-ES.tspackages/localizations/src/be-BY.tspackages/localizations/src/sk-SK.tspackages/shared/src/types/localization.tspackages/localizations/src/mn-MN.tspackages/localizations/src/en-US.tspackages/localizations/src/fi-FI.tspackages/localizations/src/zh-CN.tspackages/localizations/src/fr-FR.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
Follow established naming conventions (PascalCase for components, camelCase for variables)
Prefer importing types from
@clerk/shared/typesinstead of the deprecated@clerk/typesalias
Files:
packages/localizations/src/pl-PL.tspackages/localizations/src/fa-IR.tspackages/localizations/src/ms-MY.tspackages/localizations/src/bg-BG.tspackages/localizations/src/nb-NO.tspackages/localizations/src/ca-ES.tspackages/localizations/src/be-BY.tspackages/localizations/src/sk-SK.tspackages/shared/src/types/localization.tspackages/localizations/src/mn-MN.tspackages/localizations/src/en-US.tspackages/localizations/src/fi-FI.tspackages/localizations/src/zh-CN.tspackages/localizations/src/fr-FR.ts
packages/**/src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
packages/**/src/**/*.{ts,tsx,js,jsx}: Maintain comprehensive JSDoc comments for public APIs
Use tree-shaking friendly exports
Validate all inputs and sanitize outputs
All public APIs must be documented with JSDoc
Use dynamic imports for optional features
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
Implement proper logging with different levels
Files:
packages/localizations/src/pl-PL.tspackages/localizations/src/fa-IR.tspackages/localizations/src/ms-MY.tspackages/localizations/src/bg-BG.tspackages/localizations/src/nb-NO.tspackages/localizations/src/ca-ES.tspackages/localizations/src/be-BY.tspackages/localizations/src/sk-SK.tspackages/shared/src/types/localization.tspackages/localizations/src/mn-MN.tspackages/localizations/src/en-US.tspackages/localizations/src/fi-FI.tspackages/localizations/src/zh-CN.tspackages/localizations/src/fr-FR.ts
**/*.ts?(x)
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
Use proper TypeScript error types
Files:
packages/localizations/src/pl-PL.tspackages/localizations/src/fa-IR.tspackages/localizations/src/ms-MY.tspackages/localizations/src/bg-BG.tspackages/localizations/src/nb-NO.tspackages/localizations/src/ca-ES.tspackages/localizations/src/be-BY.tspackages/localizations/src/sk-SK.tspackages/shared/src/types/localization.tspackages/localizations/src/mn-MN.tspackages/localizations/src/en-US.tspackages/localizations/src/fi-FI.tspackages/localizations/src/zh-CN.tspackages/localizations/src/fr-FR.ts
packages/localizations/**
📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)
packages/localizations/**: Localization support must include translations for 30+ languages using a modular localization system
Support RTL languages in the localization system
Files:
packages/localizations/src/pl-PL.tspackages/localizations/src/fa-IR.tspackages/localizations/src/ms-MY.tspackages/localizations/src/bg-BG.tspackages/localizations/src/nb-NO.tspackages/localizations/src/ca-ES.tspackages/localizations/src/be-BY.tspackages/localizations/src/sk-SK.tspackages/localizations/src/mn-MN.tspackages/localizations/src/en-US.tspackages/localizations/src/fi-FI.tspackages/localizations/src/zh-CN.tspackages/localizations/src/fr-FR.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/typescript.mdc)
**/*.{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
Avoidanytype - preferunknownwhen type is uncertain, then narrow with type guards
Implement type guards forunknowntypes using the patternfunction isType(value: unknown): value is Type
Useinterfacefor object shapes that might be extended
Usetypefor unions, primitives, and computed types
Preferreadonlyproperties for immutable data structures
Useprivatefor internal implementation details in classes
Useprotectedfor inheritance hierarchies
Usepublicexplicitly for clarity in public APIs
Use mixins for shared behavior across unrelated classes in TypeScript
Use generic constraints with bounded type parameters like<T extends { id: string }>
Use utility types likeOmit,Partial, andPickfor data transformation instead of manual type construction
Use discriminated unions instead of boolean flags for state management and API responses
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation at the type level
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Document functions with JSDoc comments including @param, @returns, @throws, and @example tags
Create custom error classes that extend Error for specific error types
Use the Result pattern for error handling instead of throwing exceptions
Use optional chaining (?.) and nullish coalescing (??) operators for safe property access
Let TypeScript infer obvious types to reduce verbosity
Useconst assertionswithas constfor literal types
Usesatisfiesoperator for type checking without widening types
Declare readonly arrays and objects for immutable data structures
Use spread operator and array spread for immutable updates instead of mutations
Use lazy loading for large types...
Files:
packages/localizations/src/pl-PL.tspackages/localizations/src/fa-IR.tspackages/localizations/src/ms-MY.tspackages/localizations/src/bg-BG.tspackages/localizations/src/nb-NO.tspackages/localizations/src/ca-ES.tspackages/localizations/src/be-BY.tspackages/localizations/src/sk-SK.tspackages/shared/src/types/localization.tspackages/localizations/src/mn-MN.tspackages/localizations/src/en-US.tspackages/localizations/src/fi-FI.tspackages/localizations/src/zh-CN.tspackages/localizations/src/fr-FR.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). (5)
- GitHub Check: Formatting | Dedupe | Changeset
- GitHub Check: Build Packages
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (8)
packages/localizations/src/sk-SK.ts (1)
894-894: LGTM! New error key added correctly.The addition of
form_new_password_matches_currentfollows the established pattern for this localization file. Theundefinedvalue is consistent with other untranslated keys in this community-maintained locale and serves as an appropriate placeholder until a Slovak translation is provided.packages/localizations/src/bg-BG.ts (1)
879-888: New password error key is correctly added and ordered
form_new_password_matches_currentfits the existing error-key naming pattern, is placed correctly among otherform_*errors, and usingundefinedis consistent with other untranslated entries in this community locale. No further changes needed here.packages/localizations/src/nb-NO.ts (1)
888-888: New error key wiring looks consistent
unstable__errors.form_new_password_matches_currentis added with the same naming and structure as the surrounding error keys, matching the sharedUnstableErrorstype surface. Leaving itundefinedis consistent with other placeholders in this community locale file.packages/localizations/src/zh-CN.ts (1)
874-874: Consistent addition of new password error key
unstable__errors.form_new_password_matches_currentis correctly added and follows the same pattern as other error codes in this locale and the sharedUnstableErrorstype.packages/localizations/src/pl-PL.ts (1)
894-894: Polish locale now exposes the new error key
unstable__errors.form_new_password_matches_currentis added in the right place and matches the shared error key name. Even with anundefinedplaceholder, this keeps the locale in sync with the expanded error surface and avoids type mismatches.packages/localizations/src/fr-FR.ts (1)
905-905: fr-FR localization kept in sync with new error codeThe
form_new_password_matches_currentkey is correctly added underunstable__errorswith naming and placement matching the sharedUnstableErrorsdefinition and other locales.packages/shared/src/types/localization.ts (1)
1322-1322: UnstableErrors surface correctly extendedAdding
form_new_password_matches_current: LocalizationValue;toUnstableErrorscleanly exposes the new backend error code to all locales and aligns with the surrounding password-related entries.packages/localizations/src/en-US.ts (1)
877-888: English message for same-password error is clear and alignedThe
form_new_password_matches_currentstring is precise, user-friendly, and accurately describes the constraint that the new password must differ from the current one. This should integrate cleanly with the updated password error handling.
…ng same password on reset password task (#7372)
Description
Show correct error message when using same password on reset session task
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
Bug Fixes
New Features
✏️ Tip: You can customize this high-level summary in your review settings.