Skip to content

Conversation

@anmolsinghbhatia
Copy link
Collaborator

@anmolsinghbhatia anmolsinghbhatia commented Dec 8, 2025

Description

This PR includes updates to the project identifier character limit and translations.

Type of Change

  • Improvement
  • Code refactoring

Summary by CodeRabbit

Release Notes

  • New Features
    • Project ID character limit increased from 5 to 10 characters, enabling more descriptive and flexible project identification during creation.
    • Enhanced validation logic to enforce the new maximum Project ID length consistently throughout the application workflow.
    • Updated all user-facing messages, validation tooltips, and error descriptions across 18+ supported languages to reflect the updated constraints.

✏️ Tip: You can customize this high-level summary in your review settings.

@anmolsinghbhatia anmolsinghbhatia self-assigned this Dec 8, 2025
Copilot AI review requested due to automatic review settings December 8, 2025 11:10
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Note

Other AI code review bot(s) detected

CodeRabbit 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.

Walkthrough

This 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

Cohort / File(s) Summary
UI Component Logic
apps/web/core/components/project/create/common-attributes.tsx, apps/web/core/components/project/form.tsx
Updated project ID validation rules: identifier truncation limit increased from 5 to 10 characters; maxLength validation updated from 5 to 10; validation message keys changed; tooltip content made dynamic via translation function.
Internationalization Updates
packages/i18n/src/locales/{cs,de,en,es,fr,id,it,ja,ko,pl,pt-BR,ro,ru,sk,tr-TR,ua,vi-VN,zh-CN,zh-TW}/translations.ts
Updated project_id_tooltip_content and project_id_max_char translation strings across all 18 locales to reflect new 10-character maximum instead of 5 characters.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the identifier truncation logic and validation message key updates in component files are consistent
  • Spot-check 2–3 locale translation files to confirm the string updates are accurate and properly account for language-specific phrasing

Poem

🐰 Five was snug, but ten's the way,
Project IDs now get more play,
From cs to zh, each tongue now sings,
Of longer names and wider wings! ✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks critical details required by the template: no detailed explanation of changes, no test scenarios, no references to related issues, and no screenshots despite UI-facing changes. Add a detailed description of the character limit change, test scenarios (e.g., validation with 10-character identifiers), and reference any related issues or tickets.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: increasing the project identifier character limit from 5 to 10 across validation logic and translations.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore-project-identifier-limit

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.

❤️ Share

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

Copy link
Contributor

Copilot AI left a 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",
Copy link

Copilot AI Dec 8, 2025

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).

Suggested change
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",

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 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 unused project_id_must_be_at_most_5_characters key

project_id_must_be_at_most_5_characters is defined in the French translations (and all other language files) but is never referenced in the codebase. The active validation uses project_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_content and project_id_max_char now reflect a 10-character limit, but project_id_must_be_at_most_5_characters still 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 usage

The updated Korean strings for the tooltip and project_id_max_char now 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 text

The 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_characters is 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 used

The 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 legacy project_id_must_be_at_most_5_characters translation key

This key exists in all translation files but is not used anywhere in the codebase. The active validation uses project_id_max_char with 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 locales

The translation key project_id_must_be_at_most_5_characters references a 5-character limit in Romanian (and all other 20+ locales), while project_id_max_char and project_id_tooltip_content reference 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 limit

The maxLength rule for identifier is set to value: 10 with message: t("project_id_max_char"), and the tooltip now uses t("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: handleIdentifierChange in this file hand-rolls sanitization with /[^a-zA-Z0-9]/g, while the create flow uses the shared projectIdentifierSanitizer (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

📥 Commits

Reviewing files that changed from the base of the PR and between f41e121 and 8c18ef7.

📒 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}: Use const type parameters for more precise literal inference in TypeScript 5.0+
Use the satisfies operator to validate types without widening them
Leverage inferred type predicates to reduce the need for explicit is return types in filter/check functions
Use NoInfer<T> utility to block inference for specific type arguments when they should be determined by other arguments
Utilize narrowing in switch(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 legacy experimentalDecorators
Use using declarations for explicit resource management with Disposable pattern instead of manual cleanup (TypeScript 5.2+)
Use with { type: "json" } for import attributes; avoid deprecated assert syntax (TypeScript 5.3/5.8+)
Use import type explicitly when importing types to ensure they are erased during compilation, respecting verbatimModuleSyntax flag
Use .ts, .mts, .cts extensions in import type statements (TypeScript 5.2+)
Use import 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 new Set methods like union, intersection, etc., when available (TypeScript 5.5+)
Use Object.groupBy / Map.groupBy standard methods for grouping instead of external libraries (TypeScript 5.4+)
Use Promise.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 via super in classes (TypeScript 5....

Files:

  • packages/i18n/src/locales/id/translations.ts
  • packages/i18n/src/locales/it/translations.ts
  • packages/i18n/src/locales/zh-TW/translations.ts
  • packages/i18n/src/locales/vi-VN/translations.ts
  • packages/i18n/src/locales/en/translations.ts
  • packages/i18n/src/locales/sk/translations.ts
  • packages/i18n/src/locales/pt-BR/translations.ts
  • packages/i18n/src/locales/cs/translations.ts
  • packages/i18n/src/locales/ua/translations.ts
  • packages/i18n/src/locales/de/translations.ts
  • packages/i18n/src/locales/ru/translations.ts
  • packages/i18n/src/locales/fr/translations.ts
  • apps/web/core/components/project/create/common-attributes.tsx
  • packages/i18n/src/locales/tr-TR/translations.ts
  • packages/i18n/src/locales/ko/translations.ts
  • packages/i18n/src/locales/zh-CN/translations.ts
  • packages/i18n/src/locales/pl/translations.ts
  • packages/i18n/src/locales/es/translations.ts
  • packages/i18n/src/locales/ja/translations.ts
  • apps/web/core/components/project/form.tsx
  • packages/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.ts
  • packages/i18n/src/locales/cs/translations.ts
  • packages/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 key project_id_must_be_at_most_5_characters exists only in translation files and is not referenced anywhere in the application code. The actual validation uses project_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_content and project_id_max_char both correctly reference a 10-character maximum and align with the updated validation. However, project_id_must_be_at_most_5_characters still 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_content and project_id_max_char are updated to a 10-symbol maximum and look natural in Russian.

Right above them, project_id_must_be_at_most_5_characters still 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_content and project_id_max_char now clearly state a 10-character limit, which matches the new constraint.

project_id_must_be_at_most_5_characters on 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: Passing workspaceSlug directly is a clean, type-correct simplification

Using workspaceSlug directly in checkProjectIdentifierAvailability(workspaceSlug, payload.identifier ?? "") is equivalent to the prior .toString() call given the prop is already a string, 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 cap

Using 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 keys

The identifier rules now:

  • Use t("project_id_min_char") for the minimum-length message.
  • Enforce maxLength.value: 10 with t("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 ignore

The zh-TW translations are correct. The frontend actively validates against project_id_max_char (10 characters) in apps/web/core/components/project/form.tsx and apps/web/core/components/project/create/common-attributes.tsx. The legacy project_id_must_be_at_most_5_characters key 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 risk

The key project_id_must_be_at_most_5_characters appears 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

@anmolsinghbhatia anmolsinghbhatia changed the title [WEB-] chore: project identifier char limit updated chore: project identifier char limit updated Dec 8, 2025
@anmolsinghbhatia anmolsinghbhatia changed the title chore: project identifier char limit updated [WEB-5600] chore: project identifier char limit updated Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants