From 3fe9d70ba7d08ff12233003a9342037ab80af3ce Mon Sep 17 00:00:00 2001 From: rUv Date: Fri, 6 Nov 2026 16:11:14 -0600 Subject: [PATCH] fix(init): print the project snapshot after the optional prompts (#4875) #4870 added the telemetry opt-in after capability enrollment, which left the #4871 snapshot and paste-ready prompt above two questions. Move it below them so it is the last thing init prints. Co-authored-by: r --- v3/@claude-flow/cli/src/commands/init.ts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/v3/@claude-flow/cli/src/commands/init.ts b/v3/@claude-flow/cli/src/commands/init.ts index 4d01a14f3c..1b63b59907 100644 --- a/v3/@claude-flow/cli/src/commands/init.ts +++ b/v3/@claude-flow/cli/src/commands/init.ts @@ -1082,12 +1082,24 @@ const initClaudeAction = async (ctx: CommandContext): Promise => } } + if (ctx.flags.format === 'json') { + output.printJson(result); + } + + await offerCapabilityEnrollment(ctx); + + await offerTelemetryOptIn(ctx); + + await noteInitCompleted(); + if (!startDaemon && !startAll && ctx.flags.format !== 'json') { // End on something about the user's own repo, not a list of commands - // (adoption plan item 1). Local-only, time-capped, never throws. + // (adoption plan item 1). Printed after the optional prompts so it is + // the last thing on screen. Local-only, time-capped, never throws. const { snapshotProject, snapshotLines, firstPrompt } = await import('../init/first-win.js'); const snap = snapshotProject(ctx.cwd); const lines = snapshotLines(snap); + output.writeln(); if (lines.length) { output.writeln(output.bold('Your project:')); output.printList(lines); @@ -1100,16 +1112,6 @@ const initClaudeAction = async (ctx: CommandContext): Promise => output.writeln(output.dim(`Background workers: ${bin} daemon start ยท health check: ${bin} doctor`)); } - if (ctx.flags.format === 'json') { - output.printJson(result); - } - - await offerCapabilityEnrollment(ctx); - - await offerTelemetryOptIn(ctx); - - await noteInitCompleted(); - return { success: true, data: result }; } catch (error) { spinner.fail('Initialization failed');