forked from farhoodlabs/paperclip
fix: append short UUID suffix to project slugs when non-ASCII characters are stripped to prevent slug collisions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user