Skip to content

Conversation

@AlexAndBear
Copy link
Contributor

@AlexAndBear AlexAndBear commented Sep 15, 2025

Description

Related Issue

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear AlexAndBear requested a review from kulmann September 15, 2025 09:18
@AlexAndBear AlexAndBear marked this pull request as ready for review September 15, 2025 09:18
Copilot AI review requested due to automatic review settings September 15, 2025 09:18
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 changes resource name validation from checking character count to checking byte length, addressing issues with multi-byte Unicode characters that could cause validation to pass but fail at the backend level.

  • Updates validation logic to use TextEncoder for accurate byte length calculation
  • Increases the maximum allowed bytes from 63 characters to 256 bytes
  • Simplifies error messages to be more generic

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
packages/web-pkg/src/constants.ts Adds new RESOURCE_NAME_MAX_BYTES constant (256)
packages/web-pkg/src/composables/actions/helpers/useIsResourceNameValid.ts Replaces character length validation with byte length validation using TextEncoder
packages/web-pkg/tests/unit/composables/actions/helpers/useIsResourceNameValid.spec.ts Updates test cases to use new byte-based validation and simplified error messages

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-project-automation github-project-automation bot moved this to Qualification in OpenCloud Team Board Sep 15, 2025
@AlexAndBear AlexAndBear moved this from Qualification to In Progress in OpenCloud Team Board Sep 15, 2025
@AlexAndBear AlexAndBear force-pushed the enhance-name-length-validation branch from 35b2438 to 57225f1 Compare September 15, 2025 12:51
Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

Super nice improvement 🥇

@AlexAndBear AlexAndBear merged commit 7d4e674 into main Sep 16, 2025
28 checks passed
@AlexAndBear AlexAndBear deleted the enhance-name-length-validation branch September 16, 2025 10:15
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenCloud Team Board Sep 16, 2025
@openclouders openclouders mentioned this pull request Sep 16, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Renaming file-function in web is restricted to 63 characters

3 participants