Skip to content

fix(web): keep copied alias IDs locale-independent - #607

Draft
yyyr-p wants to merge 3 commits into
Menci:mainfrom
yyyr-p:codex/alias-copy-id-suffix
Draft

yyyr-p wants to merge 3 commits into
Menci:mainfrom
yyyr-p:codex/alias-copy-id-suffix

Conversation

@yyyr-p

@yyyr-p yyyr-p commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Copying a model alias pre-filled the ID from the localized dashboard.modelAliases.copy.nameSuffix string, so the same action produced source copy in English and source 副本 in Chinese.

An alias name is the public model id clients send, so a copied alias was announced under an ID containing a space, or CJK characters, and the ID a copy received depended on the operator's dashboard language. Names are unique, so copying the same alias twice also always collided with the Alias <name> already exists 409.

The copy dialog now derives its ID from copiedAliasName, which appends a locale-independent -copy suffix and walks to the first free numeric suffix — source-copy, source-copy-2, source-copy-3 — when an ID is already taken. The dashboard.modelAliases.copy.nameSuffix key loses its last reader and is dropped from both locales.

Test Plan:

  • apps/web/__tests__/components/model-alias: 20 tests, covering the new dialog cases that assert one ASCII ID under both en and zh-Hans and the first-free-suffix choice.
  • pnpm run verify on this branch: 601 test files / 6544 tests, installer suite, repository checks and the web build all pass.

@yyyr-p
yyyr-p marked this pull request as draft October 11, 2026 17:04
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.

1 participant