Commit graph

10 commits

Author SHA1 Message Date
matt wilkie
bb6b8f226b
Fix ready/list UX regressions (#3481)
* fix(ready): honor filter.ExcludeTypes in GetReadyWorkInTx (GH#3397)

The --exclude-type CLI flag was silently ignored by bd ready. The CLI
correctly populated filter.ExcludeTypes, and the type's godoc promised
that values are "Appended to the default exclusion list", but the
no-Type branch of GetReadyWorkInTx built the NOT IN clause from the
hardcoded defaults only.

Merge user-supplied ExcludeTypes into the default exclusion list (with
dedup against defaults and empties) before building the placeholders.
This matches the pattern already used by issueops/filters.go and
dolt/queries.go for bd list.

Fixes GH#3397.

* fix(ready): --parent returns transitive descendants, not direct children only (GH#3396)

The SQL clause in GetReadyWorkInTx's ParentID branch was a one-hop join
against the parent-child dependency table, so only direct children
surfaced. The --parent help text in cmd/bd/ready.go:672 and the
WorkFilter.ParentID godoc (internal/types/types.go:1295) both promise
"descendants (recursive)".

Add a BFS helper GetDescendantIDsInTx alongside GetChildrenOfIssuesInTx
in blocked.go — BFS rather than a recursive CTE because the existing
children helper already iterates across both dependencies and
wisp_dependencies tables, and composing that inside a single CTE gets
ugly. The visited set breaks cycles and a depth cap (default 100,
matching the cycle-detection CTE elsewhere in issueops) guards against
malformed data.

Rewrite the ParentID branch in GetReadyWorkInTx to resolve descendants
via the new helper and OR that with the prior dotted-ID prefix match
(for implicit-parent IDs with no explicit parent-child dep), preserving
the original semantics for dotted IDs.

MoleculeID is deliberately left as one-hop — its inline comment
explicitly scopes it to "direct children" unlike ParentID.

Fixes GH#3396.

* Improve ready and list UX regressions (bd-main-typ)

* fix(list): make --ready flag use blocker-aware GetReadyWork semantics (GH#3478)

bd list --ready previously only filtered by status=open, showing issues
that bd ready correctly excluded as blocked. Now both commands use the
same GetReadyWork path, ensuring consistent results.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add list ready blocker regression coverage (bd-qo1)

* Fix ready list review regressions

---------

Co-authored-by: Daniel Jasiński <daniel.jasinski@gmail.com>
Co-authored-by: kev <kglynn@pryoninc.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 20:29:30 -07:00
matt wilkie
29bef78283
fix: show blocked icon for dependency-blocked issues in bd list (#2858) (#2878)
Open issues with unresolved dependencies now display the ● (blocked)
icon instead of ○ (open) in compact list output. This matches the
legend shown by bd list and the behavior of bd blocked.

Only overrides the icon when the stored status is "open" and the issue
has active blockers — in_progress and other statuses keep their own icon.
🤖 Generated with [Nori](https://nori.ai)


Amp-Thread-ID: https://ampcode.com/threads/T-019d3f66-ab13-74d8-bcc7-e53e8e736eef

Co-authored-by: Nori <contact@tilework.tech>
Co-authored-by: Amp <amp@ampcode.com>
2026-03-30 10:59:14 -07:00
coffeegoddd☕️✨
58915b13e7 /{cmd,internal}: update global store to be interface 2026-03-17 13:26:17 -07:00
Joseph Turian
0c2d95c3cb
feat(metadata): add human-readable metadata visibility to bd show and bd list --long (#1905)
Custom metadata (GH#1406) was persisted and available via --json but invisible
in human-readable output. This adds a METADATA section to bd show (sorted keys,
type-aware value formatting) and a "Metadata: N keys" indicator to bd list --long.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:01:08 -08:00
beads/crew/leeloo
2bcca39f23
fix(list): separate parent-child deps from blocking deps in bd list
bd list displayed parent-child dependencies as "(blocked by: <parent>)"
which is incorrect — parent-child is structural containment, not a
blocking relationship. This caused real harm: AI agents seeing
"blocked by" would attempt to remove the dependency or skip the issue
entirely, treating organisational hierarchy as a workflow blocker.

Two fixes in this commit:

1. Human-readable output now shows "(parent: X)" instead of
   "(blocked by: X)" for parent-child deps. Mixed relationships
   render correctly: "(parent: X, blocked by: Y, blocks: Z)".

2. JSON output (bd list --json) now includes a computed "parent"
   field on each issue, matching bd show --json behaviour. Previously
   consumers had to manually parse the dependencies array to find the
   parent, requiring knowledge of the dep type convention.

Changes:
- GetBlockingInfoForIssues returns parentMap (childID→parentID) as a
  new return value, routing parent-child deps separately from blockers
- formatDependencyInfo/formatIssueCompact/formatAgentIssue accept
  parent parameter for distinct display
- IssueWithCounts gains Parent field computed from dependency records

This is the bd list counterpart to PR #1293 which fixed the same
conflation in bd show. Related upstream issues: #1155, #1122.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/leeloo
Rig: beads
Role: crew
2026-02-21 23:54:27 +00:00
Marco Del Pin
fedf1daa7e
fix(list): treat missing blockers as resolved in annotations (#1884)
getClosedBlockerIDs skipped unreachable blockers (err or nil) without
marking them as closed, so they still appeared in "(blocked by: ...)"
annotations. This is inconsistent with computeBlockedIDs (used by
bd ready) which only considers active issues as blockers.

Now treats missing/deleted/unreachable blockers the same as closed ones,
ensuring bd list and bd ready agree on blocker status.
2026-02-20 09:23:27 -08:00
Steven Syrek
6155b6cd86 feat(ready): improve default output with pretty format, priority sort, truncation footer, and parent epic context
Default to pretty format (--plain to opt out), sort by priority instead of
hybrid, show "Showing N of M" when results hit the limit, and annotate
issues with their parent epic title when applicable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-16 11:08:46 +01:00
beads/crew/emma
a5da57e39b refactor: remove storage factory, memory backend, and provider abstraction (Phase 7)
Strip out the multi-backend storage layer: factory pattern, memory/in-memory
provider, connection string parsing, local provider, and associated tests.
Inline Dolt as the sole storage backend. Part of Dolt-Native Beads v2 epic.

WIP - SQLite removal in progress, more cleanup phases to follow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-15 11:27:39 -08:00
Patrick Farrell
180c664330 fix: filter closed blockers from bd list annotations (bd-yit)
buildBlockingMaps now accepts a closedIDs set to exclude closed blockers
from "blocked by" and "blocks" annotations. Previously, bd list showed
"(blocked by: X)" even when X was closed, which confused agents into
thinking work was still blocked.

Also adds bd blocked and bd list to the AGENTS.md quick reference, and
updates bd claim as the preferred way to claim work.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:44:21 +00:00
quartz
9afb6800e5 refactor: split list.go, show.go, and sync.go into domain-focused files (bd-05a8)
Split the three largest remaining cmd/bd files:
- list.go (1605→1113): extracted list_format.go, list_tree.go, list_output.go
- show.go (1387→619): extracted show_format.go, show_refs.go, show_children.go, show_display.go
- sync.go (1344→856): extracted sync_conflict.go, sync_status.go

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/polecats/quartz
Rig: beads
Role: polecats
2026-02-09 17:02:53 -08:00