-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[WEB-5600] chore: project identifier char limit updated #8261
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
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThis pull request increases the maximum allowed length for project IDs from 5 to 10 characters. Changes include updating validation logic in two component files and updating corresponding localization strings across 18 language translations to reflect the new character constraint. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Pull request overview
This PR updates the project identifier character limit from 5 to 10 characters across the application. The changes include updates to frontend validation rules, translation strings in 19 locales, and a code cleanup removing a redundant type assertion.
Key Changes
- Frontend validation rules updated from 5 to 10 characters in form components
- Translation strings updated across 19 locales to reflect the new 10-character limit
- Hardcoded tooltip text replaced with translatable content
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| apps/web/core/components/project/form.tsx | Updated maxLength validation to 10, replaced hardcoded tooltip with translation key, removed redundant type assertion |
| apps/web/core/components/project/create/common-attributes.tsx | Updated substring limit to 10, changed maxLength validation to 10, standardized error message keys |
| packages/i18n/src/locales/en/translations.ts | Updated tooltip and max_char messages from 5 to 10 characters |
| packages/i18n/src/locales/zh-TW/translations.ts | Updated Chinese Traditional translations for new character limit |
| packages/i18n/src/locales/zh-CN/translations.ts | Updated Chinese Simplified translations for new character limit |
| packages/i18n/src/locales/vi-VN/translations.ts | Updated Vietnamese translations for new character limit |
| packages/i18n/src/locales/ua/translations.ts | Updated Ukrainian translations for new character limit |
| packages/i18n/src/locales/tr-TR/translations.ts | Updated Turkish translations for new character limit |
| packages/i18n/src/locales/sk/translations.ts | Updated Slovak translations for new character limit |
| packages/i18n/src/locales/ru/translations.ts | Updated Russian translations for new character limit |
| packages/i18n/src/locales/ro/translations.ts | Updated Romanian translations for new character limit |
| packages/i18n/src/locales/pt-BR/translations.ts | Updated Brazilian Portuguese translations for new character limit |
| packages/i18n/src/locales/pl/translations.ts | Updated Polish translations for new character limit |
| packages/i18n/src/locales/ko/translations.ts | Updated Korean translations for new character limit |
| packages/i18n/src/locales/ja/translations.ts | Updated Japanese translations for new character limit |
| packages/i18n/src/locales/it/translations.ts | Updated Italian translations for new character limit |
| packages/i18n/src/locales/id/translations.ts | Updated Indonesian translations for new character limit |
| packages/i18n/src/locales/fr/translations.ts | Updated French translations for new character limit |
| packages/i18n/src/locales/es/translations.ts | Updated Spanish translations for new character limit |
| packages/i18n/src/locales/de/translations.ts | Updated German translations for new character limit |
| packages/i18n/src/locales/cs/translations.ts | Updated Czech translations for new character limit |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| title_should_be_less_than_255_characters: "Title should be less than 255 characters", | ||
| project_name: "Project name", | ||
| project_id_must_be_at_least_1_character: "Project ID must at least be of 1 character", | ||
| project_id_must_be_at_most_5_characters: "Project ID must at most be of 5 characters", |
Copilot
AI
Dec 8, 2025
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.
The translation key project_id_must_be_at_most_5_characters still references "5 characters" but should be updated to "10 characters" for consistency with the actual validation limit. Although this key is not currently used in the codebase (replaced by project_id_max_char), keeping it outdated could cause confusion or bugs if referenced in the future. This same issue exists in all locale files (cs, de, es, fr, id, it, ja, ko, pl, pt-BR, ro, ru, sk, tr-TR, ua, vi-VN, zh-CN, zh-TW).
| project_id_must_be_at_most_5_characters: "Project ID must at most be of 5 characters", | |
| project_id_must_be_at_most_5_characters: "Project ID must at most be of 10 characters", |
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: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
packages/i18n/src/locales/fr/translations.ts (1)
340-350: Remove or clarify legacy unusedproject_id_must_be_at_most_5_characterskey
project_id_must_be_at_most_5_charactersis defined in the French translations (and all other language files) but is never referenced in the codebase. The active validation usesproject_id_max_char(which correctly references a 10-character limit).Either remove this legacy key entirely, or if it's intentionally preserved for backwards compatibility, update it to say "10 caractères" to match the current constraint.
packages/i18n/src/locales/es/translations.ts (1)
344-354: Update Spanish project ID max-length message from 5 to 10 characters
project_id_tooltip_contentandproject_id_max_charnow reflect a 10-character limit, butproject_id_must_be_at_most_5_charactersstill says “como máximo 5 caracteres”. This contradicts the new limit and the other messages.project_name: "Nombre del proyecto", project_id_must_be_at_least_1_character: "El ID del proyecto debe tener al menos 1 carácter", - project_id_must_be_at_most_5_characters: "El ID del proyecto debe tener como máximo 5 caracteres", + project_id_must_be_at_most_5_characters: "El ID del proyecto debe tener como máximo 10 caracteres", project_id: "ID del proyecto", project_id_tooltip_content: "Te ayuda a identificar elementos de trabajo en el proyecto de manera única. Máximo 10 caracteres.", @@ project_id_min_char: "El ID del proyecto debe tener al menos 1 carácter", project_id_max_char: "El ID del proyecto debe tener como máximo 10 caracteres",
🧹 Nitpick comments (6)
packages/i18n/src/locales/ko/translations.ts (1)
332-341: Project ID limit text updated correctly; verify nearby 5-character string usageThe updated Korean strings for the tooltip and
project_id_max_charnow correctly state a 10-character maximum and read naturally:
- Line 335: “최대 10자.”
- Line 341: “프로젝트 ID는 최대 10자 이하여야 합니다”
Right above,
project_id_must_be_at_most_5_characters(line 333) still says “최대 5자”. If that key is still used anywhere in the UI or validation, users may see conflicting messages about the allowed length.Consider either:
- Updating that message to 10 characters as well, or
- Removing/deprecating it if the app has fully switched to
project_id_max_char.packages/i18n/src/locales/it/translations.ts (1)
339-349: Italian Project ID messages correctly reflect 10 chars; check legacy 5-char textThe updated Italian strings look good and match the new 10-character limit:
- Line 343: tooltip: “Massimo 10 caratteri.”
- Line 349:
project_id_max_char: “al massimo 10 caratteri.”However,
project_id_must_be_at_most_5_characters(line 340) still says “al massimo 5 caratteri”. If that key is still referenced, users could see inconsistent limits.Please verify if
project_id_must_be_at_most_5_charactersis still in use; if yes, align it to 10 characters, otherwise consider removing it to avoid confusion.packages/i18n/src/locales/pt-BR/translations.ts (1)
339-349: pt-BR Project ID text aligned to 10 chars; confirm old 5-char key isn’t usedThe Brazilian Portuguese updates correctly describe the new limit and are idiomatic:
- Line 343: tooltip: “Máximo de 10 caracteres.”
- Line 349:
project_id_max_char: “no máximo 10 caracteres.”As in other locales,
project_id_must_be_at_most_5_characters(line 340) still mentions “5 caracteres”. If that key remains wired to any validation or error state, users may see conflicting limits.Recommend confirming whether that key is referenced; if it is, update it to 10 characters, otherwise consider deprecating/removing it.
packages/i18n/src/locales/id/translations.ts (1)
339-349: Remove or update legacyproject_id_must_be_at_most_5_characterstranslation keyThis key exists in all translation files but is not used anywhere in the codebase. The active validation uses
project_id_max_charwith the correct 10-character limit, so users don't encounter the inconsistent "5 characters" message. Consider removing this key from all translation files if it's no longer needed, or update it to 10 for consistency if it may be used in the future.packages/i18n/src/locales/ro/translations.ts (1)
338-347: Legacy project ID validation key with inconsistent character limit exists across all localesThe translation key
project_id_must_be_at_most_5_charactersreferences a 5-character limit in Romanian (and all other 20+ locales), whileproject_id_max_charandproject_id_tooltip_contentreference 10 characters. This key appears unused in the current codebase validation logic, suggesting it's legacy code. To prevent future confusion or accidental usage, consider removing this key across all locale files or updating it to reference the correct 10-character limit.apps/web/core/components/project/form.tsx (1)
333-343: Identifier validation and tooltip now correctly enforce/describe 10-char limitThe
maxLengthrule foridentifieris set tovalue: 10withmessage: t("project_id_max_char"), and the tooltip now usest("project_id_tooltip_content"). That keeps the edit form in sync with the create flow and with the updated locale strings.One small consistency improvement you might consider:
handleIdentifierChangein this file hand-rolls sanitization with/[^a-zA-Z0-9]/g, while the create flow uses the sharedprojectIdentifierSanitizer(which also allows specific non-latin characters). Reusing the shared sanitizer here would guarantee both flows accept the same character set.Also applies to: 360-363
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (21)
apps/web/core/components/project/create/common-attributes.tsx(2 hunks)apps/web/core/components/project/form.tsx(3 hunks)packages/i18n/src/locales/cs/translations.ts(1 hunks)packages/i18n/src/locales/de/translations.ts(1 hunks)packages/i18n/src/locales/en/translations.ts(1 hunks)packages/i18n/src/locales/es/translations.ts(1 hunks)packages/i18n/src/locales/fr/translations.ts(1 hunks)packages/i18n/src/locales/id/translations.ts(1 hunks)packages/i18n/src/locales/it/translations.ts(1 hunks)packages/i18n/src/locales/ja/translations.ts(1 hunks)packages/i18n/src/locales/ko/translations.ts(1 hunks)packages/i18n/src/locales/pl/translations.ts(1 hunks)packages/i18n/src/locales/pt-BR/translations.ts(1 hunks)packages/i18n/src/locales/ro/translations.ts(1 hunks)packages/i18n/src/locales/ru/translations.ts(1 hunks)packages/i18n/src/locales/sk/translations.ts(1 hunks)packages/i18n/src/locales/tr-TR/translations.ts(1 hunks)packages/i18n/src/locales/ua/translations.ts(1 hunks)packages/i18n/src/locales/vi-VN/translations.ts(1 hunks)packages/i18n/src/locales/zh-CN/translations.ts(1 hunks)packages/i18n/src/locales/zh-TW/translations.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,mts,cts}
📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)
**/*.{ts,tsx,mts,cts}: Useconsttype parameters for more precise literal inference in TypeScript 5.0+
Use thesatisfiesoperator to validate types without widening them
Leverage inferred type predicates to reduce the need for explicitisreturn types in filter/check functions
UseNoInfer<T>utility to block inference for specific type arguments when they should be determined by other arguments
Utilize narrowing inswitch(true)blocks for control flow analysis (TypeScript 5.3+)
Rely on narrowing from direct boolean comparisons for type guards
Trust preserved narrowing in closures when variables aren't modified after the check (TypeScript 5.4+)
Use constant indices to narrow object/array properties (TypeScript 5.5+)
Use standard ECMAScript decorators (Stage 3) instead of legacyexperimentalDecorators
Useusingdeclarations for explicit resource management with Disposable pattern instead of manual cleanup (TypeScript 5.2+)
Usewith { type: "json" }for import attributes; avoid deprecatedassertsyntax (TypeScript 5.3/5.8+)
Useimport typeexplicitly when importing types to ensure they are erased during compilation, respectingverbatimModuleSyntaxflag
Use.ts,.mts,.ctsextensions inimport typestatements (TypeScript 5.2+)
Useimport type { Type } from "mod" with { "resolution-mode": "import" }for specific module resolution contexts (TypeScript 5.3+)
Use new iterator methods (map, filter, etc.) if targeting modern environments (TypeScript 5.6+)
Utilize newSetmethods likeunion,intersection, etc., when available (TypeScript 5.5+)
UseObject.groupBy/Map.groupBystandard methods for grouping instead of external libraries (TypeScript 5.4+)
UsePromise.withResolvers()for creating promises with exposed resolve/reject functions (TypeScript 5.7+)
Use copying array methods (toSorted,toSpliced,with) for immutable array operations (TypeScript 5.2+)
Avoid accessing instance fields viasuperin classes (TypeScript 5....
Files:
packages/i18n/src/locales/id/translations.tspackages/i18n/src/locales/it/translations.tspackages/i18n/src/locales/zh-TW/translations.tspackages/i18n/src/locales/vi-VN/translations.tspackages/i18n/src/locales/en/translations.tspackages/i18n/src/locales/sk/translations.tspackages/i18n/src/locales/pt-BR/translations.tspackages/i18n/src/locales/cs/translations.tspackages/i18n/src/locales/ua/translations.tspackages/i18n/src/locales/de/translations.tspackages/i18n/src/locales/ru/translations.tspackages/i18n/src/locales/fr/translations.tsapps/web/core/components/project/create/common-attributes.tsxpackages/i18n/src/locales/tr-TR/translations.tspackages/i18n/src/locales/ko/translations.tspackages/i18n/src/locales/zh-CN/translations.tspackages/i18n/src/locales/pl/translations.tspackages/i18n/src/locales/es/translations.tspackages/i18n/src/locales/ja/translations.tsapps/web/core/components/project/form.tsxpackages/i18n/src/locales/ro/translations.ts
🧠 Learnings (1)
📚 Learning: 2025-03-11T19:42:41.769Z
Learnt from: janreges
Repo: makeplane/plane PR: 6743
File: packages/i18n/src/store/index.ts:160-161
Timestamp: 2025-03-11T19:42:41.769Z
Learning: In the Plane project, the file 'packages/i18n/src/store/index.ts' already includes support for Polish language translations with the case "pl".
Applied to files:
packages/i18n/src/locales/sk/translations.tspackages/i18n/src/locales/cs/translations.tspackages/i18n/src/locales/pl/translations.ts
🧬 Code graph analysis (2)
apps/web/core/components/project/create/common-attributes.tsx (2)
packages/utils/src/project.ts (1)
projectIdentifierSanitizer(45-46)packages/i18n/src/store/index.ts (1)
t(223-244)
apps/web/core/components/project/form.tsx (2)
apps/space/core/store/publish/publish.store.ts (1)
workspaceSlug(93-95)packages/i18n/src/store/index.ts (1)
t(223-244)
⏰ 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). (4)
- GitHub Check: CodeQL analysis (javascript-typescript)
- GitHub Check: Agent
- GitHub Check: Build and lint web apps
- GitHub Check: Analyze (javascript)
🔇 Additional comments (10)
packages/i18n/src/locales/sk/translations.ts (1)
337-346: The translation keyproject_id_must_be_at_most_5_charactersexists only in translation files and is not referenced anywhere in the application code. The actual validation usesproject_id_max_char(10 characters), which is correctly set across all languages. No update is needed.Likely an incorrect or invalid review comment.
packages/i18n/src/locales/vi-VN/translations.ts (1)
339-347: Project ID strings now match 10-char limit; verify legacy 5-char key usage
project_id_tooltip_contentandproject_id_max_charboth correctly reference a 10-character maximum and align with the updated validation. However,project_id_must_be_at_most_5_charactersstill mentions 5 characters on Line 339.If that key is no longer used after the form/validation refactor, consider removing it; if it is still used anywhere, it should be updated to 10 characters to avoid inconsistent UX. For example:
- project_id_must_be_at_most_5_characters: "ID dự án chỉ được tối đa 5 ký tự", + project_id_must_be_at_most_5_characters: "ID dự án chỉ được tối đa 10 ký tự",packages/i18n/src/locales/ru/translations.ts (1)
335-344: RU translations correctly reflect 10-char limit; check remaining 5-char message
project_id_tooltip_contentandproject_id_max_charare updated to a 10-symbol maximum and look natural in Russian.Right above them,
project_id_must_be_at_most_5_charactersstill mentions 5 symbols on Line 336. Please confirm that this key is no longer used after the validation changes; if it is still referenced, update it to 10 to avoid conflicting messages, for example:- project_id_must_be_at_most_5_characters: "ID проекта должен содержать максимум 5 символов", + project_id_must_be_at_most_5_characters: "ID проекта должен содержать максимум 10 символов",packages/i18n/src/locales/ja/translations.ts (1)
335-344: JA strings updated for 10 chars; ensure no remaining 5-char validation text
project_id_tooltip_contentandproject_id_max_charnow clearly state a 10-character limit, which matches the new constraint.
project_id_must_be_at_most_5_characterson Line 336 still says “最大5文字”. If that key is still referenced anywhere, users may see conflicting limits. Either retire the key if unused or update it to 10 characters, e.g.:- project_id_must_be_at_most_5_characters: "プロジェクトIDは最大5文字までです", + project_id_must_be_at_most_5_characters: "プロジェクトIDは最大10文字までです",apps/web/core/components/project/form.tsx (1)
186-193: PassingworkspaceSlugdirectly is a clean, type-correct simplificationUsing
workspaceSlugdirectly incheckProjectIdentifierAvailability(workspaceSlug, payload.identifier ?? "")is equivalent to the prior.toString()call given the prop is already astring, and it removes an unnecessary cast.apps/web/core/components/project/create/common-attributes.tsx (2)
36-45: Auto-derived identifier now respects 10-character capUsing
projectIdentifierSanitizer(e.target.value).substring(0, 10)when deriving the identifier from the name cleanly enforces the new 10-character limit while reusing the shared sanitizer for allowed characters.
87-99: Validation rules/messages correctly switched to 10-char limit and new keysThe identifier rules now:
- Use
t("project_id_min_char")for the minimum-length message.- Enforce
maxLength.value: 10witht("project_id_max_char")for the error text.This keeps the create flow consistent with the updated locales and the edit form.
packages/i18n/src/locales/zh-TW/translations.ts (1)
327-336: Old 5-character key is unused and safe to ignoreThe zh-TW translations are correct. The frontend actively validates against
project_id_max_char(10 characters) inapps/web/core/components/project/form.tsxandapps/web/core/components/project/create/common-attributes.tsx. The legacyproject_id_must_be_at_most_5_characterskey is not referenced anywhere in the codebase and presents no contradiction.packages/i18n/src/locales/ua/translations.ts (1)
337-346: Key is unused and poses no actual inconsistency riskThe key
project_id_must_be_at_most_5_charactersappears only in translation files and is not referenced anywhere in the codebase. Since it is not actively used, the discrepancy between its 5-character limit and the updated 10-character references in other keys has no user-facing impact and requires no action.Likely an incorrect or invalid review comment.
packages/i18n/src/locales/en/translations.ts (1)
175-175: LGTM! Translation updates are consistent.The character limit updates from 5 to 10 characters are correctly reflected in both translation strings.
Also applies to: 181-181
Description
This PR includes updates to the project identifier character limit and translations.
Type of Change
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.