feat: collapse mesh.name and mesh.slug into one identifier (v1.21.0)
Pre-launch fix: every visible surface already keyed on slug, so
"name" was a parallel string that only existed to confuse users
on rename ("I renamed but nothing visible changed").
Now slug IS the identifier. claudemesh rename <old> <new> is the
whole rename surface. PATCH /api/cli/meshes/:slug body becomes
{ slug } and the route writes both columns to keep them in sync.
Mesh create derives slug from input.name and stores name = slug.
Pickers drop the (parens). The claudemesh slug verb shipped 30
min ago is removed — merged into rename.
The mesh.name DB column stays for now to avoid touching ~25
reader sites; a follow-up migration drops it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -49,8 +49,7 @@ async function pickMesh(meshes: JoinedMesh[]): Promise<JoinedMesh> {
|
||||
|
||||
console.log("\n Select mesh:");
|
||||
meshes.forEach((m, i) => {
|
||||
const label = m.name && m.name !== m.slug ? `${m.name} \x1b[2m(${m.slug})\x1b[0m` : m.slug;
|
||||
console.log(` ${i + 1}) ${label}`);
|
||||
console.log(` ${i + 1}) ${m.slug}`);
|
||||
});
|
||||
console.log("");
|
||||
|
||||
@@ -219,9 +218,7 @@ async function runLaunchWizard(opts: {
|
||||
spinner.stop();
|
||||
const choice = await menuSelect({
|
||||
title: "Select mesh",
|
||||
items: opts.meshes.map((m) =>
|
||||
m.name && m.name !== m.slug ? `${m.name} \x1b[2m(${m.slug})\x1b[0m` : m.slug,
|
||||
),
|
||||
items: opts.meshes.map((m) => m.slug),
|
||||
row,
|
||||
});
|
||||
mesh = opts.meshes[choice]!;
|
||||
@@ -229,8 +226,7 @@ async function runLaunchWizard(opts: {
|
||||
for (let i = 0; i < opts.meshes.length + 1; i++) {
|
||||
writeCentered(row + i, " ");
|
||||
}
|
||||
const meshLabel = mesh.name && mesh.name !== mesh.slug ? `${mesh.name} (${mesh.slug})` : mesh.slug;
|
||||
writeCentered(row, `Mesh ${tGreen("✓")} ${meshLabel}`);
|
||||
writeCentered(row, `Mesh ${tGreen("✓")} ${mesh.slug}`);
|
||||
spinner.start();
|
||||
row++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user