From eff99caefe7985bf19bdcafdb592c93d7beb7c85 Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Sat, 21 Feb 2026 11:46:59 -0800 Subject: [PATCH] fix: apply default spawn name when user presses Enter without typing (#1605) promptSpawnName() used `placeholder` (visual hint only) without `defaultValue`, so pressing Enter returned an empty string instead of applying the placeholder. Now generates a unique default like `spawn-a3f2` with a random suffix to avoid Fly.io global name collisions. Co-authored-by: Claude Co-authored-by: Claude Opus 4.6 (1M context) --- cli/package.json | 2 +- cli/src/commands.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cli/package.json b/cli/package.json index 3cd37e45..8617c450 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/spawn", - "version": "0.5.19", + "version": "0.5.20", "type": "module", "bin": { "spawn": "cli.js" diff --git a/cli/src/commands.ts b/cli/src/commands.ts index fbc0339f..7f441326 100644 --- a/cli/src/commands.ts +++ b/cli/src/commands.ts @@ -459,9 +459,12 @@ async function selectCloud(manifest: Manifest, cloudList: string[], hintOverride // Any string is allowed (spaces, uppercase, etc.) — the shell scripts // derive a kebab-case slug for the actual cloud resource name. async function promptSpawnName(): Promise { + const suffix = Math.random().toString(36).slice(2, 6); + const defaultName = `spawn-${suffix}`; const spawnName = await p.text({ message: "Name your spawn", - placeholder: "My Spawn", + placeholder: defaultName, + defaultValue: defaultName, validate: (value) => { if (!value) return undefined; if (value.length > 128) {