beads/internal
Steve Yegge d7f4189e3e feat: Add 'bd count' command for counting and grouping issues
Implements a new 'bd count' command that provides efficient issue counting
with filtering and grouping capabilities.

Features:
- Basic count: Returns total count of issues matching filters
- All filtering options from 'bd list' (status, priority, type, assignee, labels, dates, etc.)
- Grouping via --by-* flags: status, priority, type, assignee, label
- JSON output support for both simple and grouped counts
- Both daemon and direct mode support

Implementation:
- Added OpCount operation and CountArgs to RPC protocol
- Added Count() method to RPC client
- Implemented handleCount() server-side handler with optimized bulk label fetching
- Created cmd/bd/count.go with full CLI implementation

Performance optimization:
- Pre-fetches all labels in a single query when using --by-label to avoid N+1 queries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 19:21:05 -05:00
..
autoimport Improve staleness check error handling and optimization (bd-n4td, bd-o4qy, bd-c4rq) 2025-11-20 20:45:39 -05:00
beads fix: Deduplicate database paths when symlinks present (#354) 2025-11-21 12:22:33 -08:00
compact Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
config Centralize BD_DEBUG logging into internal/debug package 2025-11-06 20:14:34 -08:00
configfile Remove version field from metadata.json 2025-11-08 18:16:39 -08:00
daemon Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
debug Centralize BD_DEBUG logging into internal/debug package 2025-11-06 20:14:34 -08:00
git Fix branchExists test after signature change 2025-11-02 20:30:31 -08:00
importer Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
lockfile Standardize daemon detection with tryDaemonLock probe (bd-wgu4) 2025-11-07 21:02:38 -08:00
merge Annotate gosec-safe file accesses 2025-11-17 10:12:46 -07:00
routing Fix TestRoutingIntegration and improve DetectUserRole robustness 2025-11-20 19:04:42 -05:00
rpc feat: Add 'bd count' command for counting and grouping issues 2025-11-21 19:21:05 -05:00
storage test: Tag 16 slow integration tests with build tags 2025-11-21 14:40:22 -05:00
syncbranch fix: Add context.Background() to sqlite.New() calls in test files 2025-11-21 14:48:41 -05:00
testutil Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
types feat: Add ancestor_id field and implement epic/child filtering 2025-11-05 00:44:41 -08:00
util Extract normalizeLabels to internal/util/strings.go 2025-11-06 20:00:08 -08:00
utils fix: improve ResolvePartialID / ResolveID handling for bd show (issue #336) 2025-11-19 05:54:28 -05:00
validation Refactor: Extract duplicated validation logic to internal/validation 2025-11-20 20:39:23 -05:00