From 04e9f962af6ff25054644feb2f39c76279982911 Mon Sep 17 00:00:00 2001 From: Luca Martial Date: Mon, 11 May 2026 15:57:45 -0700 Subject: [PATCH] fix(cli): add star headline to demo completion summary per spec Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/cli/src/setup-demo-tour.test.ts | 8 +++++-- packages/cli/src/setup-demo-tour.ts | 28 ++++++++++++++---------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/packages/cli/src/setup-demo-tour.test.ts b/packages/cli/src/setup-demo-tour.test.ts index f45b42f6..f484af1e 100644 --- a/packages/cli/src/setup-demo-tour.test.ts +++ b/packages/cli/src/setup-demo-tour.test.ts @@ -84,7 +84,7 @@ describe('renderDemoCompletionSummary', () => { it('includes a temp directory warning', () => { const plain = stripAnsi(renderDemoCompletionSummary(projectDir, true)); - expect(plain).toContain('temporary demo directory'); + expect(plain).toContain('temporary directory'); }); it('points to ktx setup for real data', () => { @@ -97,9 +97,13 @@ describe('renderDemoCompletionSummary', () => { expect(plain).toContain('agent is connected'); }); + it('includes star headline', () => { + const plain = stripAnsi(renderDemoCompletionSummary(projectDir, true)); + expect(plain).toContain('★ KTX demo is ready'); + }); + it('shows manual instructions when agent not installed', () => { const plain = stripAnsi(renderDemoCompletionSummary(projectDir, false)); - expect(plain).toContain('agent not installed'); expect(plain).toContain('--agents'); expect(plain).toContain(`--project-dir ${projectDir}`); }); diff --git a/packages/cli/src/setup-demo-tour.ts b/packages/cli/src/setup-demo-tour.ts index 75bdf8b9..37473d34 100644 --- a/packages/cli/src/setup-demo-tour.ts +++ b/packages/cli/src/setup-demo-tour.ts @@ -94,23 +94,27 @@ export function renderDemoAgentTransition(): string { } export function renderDemoCompletionSummary(projectDir: string, agentInstalled: boolean): string { - const lines: string[] = ['']; + const lines: string[] = [ + '', + `${cyan('★')} KTX demo is ready`, + '', + ]; if (agentInstalled) { - lines.push('┌ Your agent is connected to a demo KTX project.'); + lines.push(' Your agent is connected to a demo KTX project.'); } else { - lines.push('┌ Demo project created (agent not installed).'); - lines.push('│'); - lines.push(`│ To connect an agent manually, run:`); - lines.push(`│ ${cyan(`ktx setup --agents --project-dir ${projectDir}`)}`); + lines.push(' Demo project created. Connect an agent to start using it:'); + lines.push(` $ ${cyan(`ktx setup --agents --project-dir ${projectDir}`)}`); } - lines.push('│'); - lines.push(`│ ${dim('This is a temporary demo directory — data will not persist across sessions.')}`); - lines.push(`│ Run ${cyan('ktx setup')} to connect your own data sources.`); - lines.push('│'); - lines.push(`│ Project: ${projectDir}`); - lines.push('└'); + lines.push( + '', + ` ${dim('⚠')} This project is in a temporary directory and will be`, + ' cleaned up by your system. To set up KTX with your own', + ' data, run: ktx setup', + '', + ` Project: ${projectDir}`, + ); return lines.join('\n'); }