feat(canisters): allow canister names up to 64 characters - #8013
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to 3d101e4. Security Overview
Detected Code Changes
|
There was a problem hiding this comment.
Pull request overview
Updates the frontend to match the backend’s 64-character canister-name limit, including UI tweaks to safely display long single-word names and aligning related tests/messages.
Changes:
- Increased
MAX_CANISTER_NAME_LENGTHfrom 24 to 64 and updated validation-related copy. - Added
overflow-wrap: anywhereto canister heading title/subtitle and the cycles top-up confirm screen name display. - Updated tests to reflect the new length limit and updated error text.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/lib/constants/canisters.constants.ts | Raises max canister name length constant to 64. |
| frontend/src/lib/i18n/en.json | Updates canister “name too long” translation to mention 64. |
| frontend/src/lib/components/common/HeadingSubtitle.svelte | Adds overflow-wrap: anywhere in shared subtitle component. |
| frontend/src/lib/components/canisters/ConfirmCyclesCanister.svelte | Wraps/aligns canister name on cycles confirm screen. |
| frontend/src/lib/components/canister-detail/CanisterHeadingTitle.svelte | Adds wrapping rule for long canister names in heading title. |
| frontend/src/tests/lib/utils/canisters.utils.spec.ts | Updates expected “too long” error message to 64. |
| frontend/src/tests/lib/modals/canisters/RenameCanisterModal.spec.ts | Updates test description to no longer hardcode “24 characters”. |
| frontend/src/tests/lib/modals/canisters/LinkCanisterModal.spec.ts | Updates expected “too long” error message to 64. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟢 Approved
The changes consistently update the max-length constraint, error parameterization, UI wrapping behavior, and the associated test expectations without introducing incomplete call sites or mismatched i18n substitutions.
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 0 new
- Review effort level: Lite
Motivation
The backend accepts canister names up to 64 characters since #8012. The frontend still validates against the old 24-character limit. A 64-character name can also be one long word, so the detail page and the top-up confirm screen need a wrap rule for it.
Changes
MAX_CANISTER_NAME_LENGTHfrom 24 to 64.error__canister.name_too_longmessage to state 64 characters.overflow-wrap: anywhereto the canister heading title, the heading subtitle, and the name on the cycles confirm screen.Prev. #8012