fix: eliminate duplicate Loading manifest spinner in agent/cloud info (#1021)

When running `spawn claude` or `spawn hetzner`, the "Loading manifest..."
spinner appeared twice: once in showInfoOrError() and again in
cmdAgentInfo/cmdCloudInfo via validateAndGetEntity(). Pass the
pre-loaded manifest to avoid the redundant load and spinner flash.

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
A 2026-02-13 15:07:08 -08:00 committed by GitHub
parent 415df93ea0
commit aafe3d1ce4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 10 deletions

View file

@ -1418,8 +1418,10 @@ function printGroupedList(
// ── Agent Info ─────────────────────────────────────────────────────────────────
export async function cmdAgentInfo(agent: string): Promise<void> {
const [manifest, agentKey] = await validateAndGetEntity(agent, "agent");
export async function cmdAgentInfo(agent: string, preloadedManifest?: Manifest): Promise<void> {
const [manifest, agentKey] = preloadedManifest
? [preloadedManifest, agent]
: await validateAndGetEntity(agent, "agent");
const agentDef = manifest.agents[agentKey];
printInfoHeader(agentDef);
@ -1544,8 +1546,10 @@ function printAgentList(
}
}
export async function cmdCloudInfo(cloud: string): Promise<void> {
const [manifest, cloudKey] = await validateAndGetEntity(cloud, "cloud");
export async function cmdCloudInfo(cloud: string, preloadedManifest?: Manifest): Promise<void> {
const [manifest, cloudKey] = preloadedManifest
? [preloadedManifest, cloud]
: await validateAndGetEntity(cloud, "cloud");
const c = manifest.clouds[cloudKey];
printInfoHeader(c);