feat(list): add --pinned and --no-pinned filter flags

Add ability to filter issues by their pinned status in bd list command.

- Add pinned column to issues table via migration 023
- Add Pinned field to Issue struct and IssueFilter
- Update all storage layer queries to include pinned column
- Add --pinned flag to show only pinned issues
- Add --no-pinned flag to exclude pinned issues
- Update RPC layer to forward pinned filter to daemon mode
- Add pinned to allowedUpdateFields for bd update support

Resolves: beads-p8e

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-19 00:46:46 -08:00
parent 9dc34da64a
commit f6930eb399
15 changed files with 168 additions and 27 deletions

View File

@@ -45,6 +45,9 @@ type Issue struct {
Ephemeral bool `json:"ephemeral,omitempty"` // Can be bulk-deleted when closed
// NOTE: RepliesTo, RelatesTo, DuplicateOf, SupersededBy moved to dependencies table
// per Decision 004 (Edge Schema Consolidation). Use dependency API instead.
// Pinned flag (bd-p8e): mark important issues
Pinned bool `json:"pinned,omitempty"` // Pinned issues are visually marked
}
// ComputeContentHash creates a deterministic hash of the issue's content.
@@ -432,6 +435,9 @@ type IssueFilter struct {
// Ephemeral filtering (bd-kwro.9)
Ephemeral *bool // Filter by ephemeral flag (nil = any, true = only ephemeral, false = only non-ephemeral)
// Pinned filtering (bd-p8e)
Pinned *bool // Filter by pinned flag (nil = any, true = only pinned, false = only non-pinned)
}
// SortPolicy determines how ready work is ordered