Merge pull request #2328 from bittoby/fix/project-slug-collision

Fix: project slug collisions for non-English names (#2318)
This commit is contained in:
Dotta 2026-04-01 09:34:23 -05:00 committed by GitHub
commit 6c2c63e0f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 32 additions and 6 deletions

View file

@ -4,6 +4,7 @@ import { projects, projectGoals, goals, projectWorkspaces, workspaceRuntimeServi
import {
PROJECT_COLORS,
deriveProjectUrlKey,
hasNonAsciiContent,
isUuidLike,
normalizeProjectUrlKey,
type ProjectCodebase,
@ -343,6 +344,8 @@ export function resolveProjectNameForUniqueShortname(
): string {
const requestedShortname = normalizeProjectUrlKey(requestedName);
if (!requestedShortname) return requestedName;
// Non-ASCII names get a UUID suffix in deriveProjectUrlKey, making slugs inherently unique.
if (hasNonAsciiContent(requestedName)) return requestedName;
const usedShortnames = new Set(
existingProjects