From cb5ebfc6673ccd6deb3973f548ac9459e45733d1 Mon Sep 17 00:00:00 2001 From: Christian Catalan <1514479+crcatala@users.noreply.github.com> Date: Thu, 18 Dec 2025 23:33:25 -0500 Subject: [PATCH] fix(init): update output to show hash-based ID format The bd init and quickstart commands displayed outdated ID format examples showing sequential IDs (prefix-1, prefix-2, ...) but beads has used content-based hash IDs since bd-8e05. Updated output now correctly shows: Issues will be named: prefix- (e.g., prefix-a3f2dd) This matches the actual GenerateHashID implementation in internal/types/id_generator.go which generates 6-8 char hex hashes. test(init): update test expectations to match hash-based ID format Tests were checking for the old sequential format (prefix-1, prefix-2) but the code now outputs hash-based format (prefix-). Co-authored-by: cc-vps --- cmd/bd/init.go | 4 ++-- cmd/bd/init_test.go | 4 ++-- cmd/bd/quickstart.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/bd/init.go b/cmd/bd/init.go index e94307f4..9727b2c2 100644 --- a/cmd/bd/init.go +++ b/cmd/bd/init.go @@ -222,7 +222,7 @@ With --stealth: configures global git settings for invisible beads usage: fmt.Printf(" Mode: %s\n", cyan("no-db (JSONL-only)")) fmt.Printf(" Issues file: %s\n", cyan(jsonlPath)) fmt.Printf(" Issue prefix: %s\n", cyan(prefix)) - fmt.Printf(" Issues will be named: %s\n\n", cyan(prefix+"-1, "+prefix+"-2, ...")) + fmt.Printf(" Issues will be named: %s\n\n", cyan(prefix+"- (e.g., "+prefix+"-a3f2dd)")) fmt.Printf("Run %s to get started.\n\n", cyan("bd --no-db quickstart")) } return @@ -440,7 +440,7 @@ With --stealth: configures global git settings for invisible beads usage: fmt.Printf("\n%s bd initialized successfully!\n\n", green("✓")) fmt.Printf(" Database: %s\n", cyan(initDBPath)) fmt.Printf(" Issue prefix: %s\n", cyan(prefix)) - fmt.Printf(" Issues will be named: %s\n\n", cyan(prefix+"-1, "+prefix+"-2, ...")) + fmt.Printf(" Issues will be named: %s\n\n", cyan(prefix+"- (e.g., "+prefix+"-a3f2dd)")) fmt.Printf("Run %s to get started.\n\n", cyan("bd quickstart")) // Run bd doctor diagnostics to catch setup issues early (bd-zwtq) diff --git a/cmd/bd/init_test.go b/cmd/bd/init_test.go index c96d2b85..4f2b9e40 100644 --- a/cmd/bd/init_test.go +++ b/cmd/bd/init_test.go @@ -27,7 +27,7 @@ func TestInitCommand(t *testing.T) { name: "init with custom prefix", prefix: "myproject", quiet: false, - wantOutputText: "myproject-1, myproject-2", + wantOutputText: "myproject-", }, { name: "init with quiet flag", @@ -39,7 +39,7 @@ func TestInitCommand(t *testing.T) { name: "init with prefix ending in hyphen", prefix: "test-", quiet: false, - wantOutputText: "test-1, test-2", + wantOutputText: "test-", }, } diff --git a/cmd/bd/quickstart.go b/cmd/bd/quickstart.go index bcb75e24..f0f0095f 100644 --- a/cmd/bd/quickstart.go +++ b/cmd/bd/quickstart.go @@ -26,7 +26,7 @@ var quickstartCmd = &cobra.Command{ fmt.Printf(" Auto-detects prefix from directory name (e.g., myapp-1, myapp-2)\n\n") fmt.Printf(" %s Initialize with custom prefix\n", cyan("bd init --prefix api")) - fmt.Printf(" Issues will be named: api-1, api-2, ...\n\n") + fmt.Printf(" Issues will be named: api- (e.g., api-a3f2dd)\n\n") fmt.Printf("%s\n", bold("CREATING ISSUES")) fmt.Printf(" %s\n", cyan("bd create \"Fix login bug\""))