From e1e3427d9b50a952a0b32ff41cb9253d812e0916 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Wed, 3 Dec 2025 10:49:17 -0800 Subject: [PATCH] fix(ready): show correct message when all issues are closed (bd-r4n) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When bd ready found no ready work, it always showed 'all issues have blocking dependencies' even when there were no open issues at all. Now it checks if any open/in_progress issues exist: - If no open issues: shows 'No open issues' (green) - If open issues but all blocked: shows 'all issues have blocking dependencies' (yellow) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- cmd/bd/ready.go | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/cmd/bd/ready.go b/cmd/bd/ready.go index ac366107..c94ef5a1 100644 --- a/cmd/bd/ready.go +++ b/cmd/bd/ready.go @@ -83,9 +83,23 @@ var readyCmd = &cobra.Command{ maybeShowUpgradeNotification() if len(issues) == 0 { + // Check if there are any open issues at all (bd-r4n) + statsResp, statsErr := daemonClient.Stats() + hasOpenIssues := false + if statsErr == nil { + var stats types.Statistics + if json.Unmarshal(statsResp.Data, &stats) == nil { + hasOpenIssues = stats.OpenIssues > 0 || stats.InProgressIssues > 0 + } + } yellow := color.New(color.FgYellow).SprintFunc() - fmt.Printf("\n%s No ready work found (all issues have blocking dependencies)\n\n", - yellow("✨")) + if hasOpenIssues { + fmt.Printf("\n%s No ready work found (all issues have blocking dependencies)\n\n", + yellow("✨")) + } else { + green := color.New(color.FgGreen).SprintFunc() + fmt.Printf("\n%s No open issues\n\n", green("✨")) + } return } cyan := color.New(color.FgCyan).SprintFunc() @@ -142,9 +156,19 @@ var readyCmd = &cobra.Command{ maybeShowUpgradeNotification() if len(issues) == 0 { - yellow := color.New(color.FgYellow).SprintFunc() - fmt.Printf("\n%s No ready work found (all issues have blocking dependencies)\n\n", - yellow("✨")) + // Check if there are any open issues at all (bd-r4n) + hasOpenIssues := false + if stats, statsErr := store.GetStatistics(ctx); statsErr == nil { + hasOpenIssues = stats.OpenIssues > 0 || stats.InProgressIssues > 0 + } + if hasOpenIssues { + yellow := color.New(color.FgYellow).SprintFunc() + fmt.Printf("\n%s No ready work found (all issues have blocking dependencies)\n\n", + yellow("✨")) + } else { + green := color.New(color.FgGreen).SprintFunc() + fmt.Printf("\n%s No open issues\n\n", green("✨")) + } // Show tip even when no ready work found maybeShowTip(store) return