bdtui 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/bd.js +16 -1
- package/src/views/list.js +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.5.1] - 2026-06-14
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Blocked tab now also lists beads whose status was explicitly set to `blocked`. Previously it ran only `bd blocked` (which returns *derived*-blocked beads — open beads with unclosed blockers), so explicitly-blocked beads were missing from the tab; the filter now merges `bd blocked` with `bd list --status blocked`.
|
|
12
|
+
- List rows for open beads that are derived-blocked now show the `blocked` status label and color, matching the detail view's effective-status logic.
|
|
13
|
+
|
|
7
14
|
## [0.5.0] - 2026-06-13
|
|
8
15
|
|
|
9
16
|
### Added
|
package/package.json
CHANGED
package/src/bd.js
CHANGED
|
@@ -16,9 +16,24 @@ async function runBd(args, cwd) {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
// `bd blocked` only returns *derived*-blocked beads (open beads whose blockers
|
|
20
|
+
// aren't all closed); it omits beads whose status was explicitly set to
|
|
21
|
+
// "blocked". The Blocked tab should show both, so merge the two sources, deduped.
|
|
22
|
+
async function bdBlocked(cwd) {
|
|
23
|
+
const [derived, explicit] = await Promise.all([
|
|
24
|
+
runBd(['blocked', '--json'], cwd).catch(() => []),
|
|
25
|
+
runBd(['list', '--status', 'blocked', '--json', '--limit', '0'], cwd).catch(() => []),
|
|
26
|
+
]);
|
|
27
|
+
const byId = new Map();
|
|
28
|
+
for (const b of [...(derived || []), ...(explicit || [])]) {
|
|
29
|
+
if (b?.id && !byId.has(b.id)) byId.set(b.id, b);
|
|
30
|
+
}
|
|
31
|
+
return [...byId.values()];
|
|
32
|
+
}
|
|
33
|
+
|
|
19
34
|
export const bdList = (filter, cwd, { unlimited = false } = {}) => {
|
|
20
35
|
if (filter === 'ready') return runBd(['ready', '--json'], cwd);
|
|
21
|
-
if (filter === 'blocked') return
|
|
36
|
+
if (filter === 'blocked') return bdBlocked(cwd);
|
|
22
37
|
const args = ['list', '--json'];
|
|
23
38
|
if (filter === 'all') args.push('--all');
|
|
24
39
|
else if (filter) args.push('--status', filter);
|
package/src/views/list.js
CHANGED
|
@@ -31,7 +31,12 @@ function t(color, text) {
|
|
|
31
31
|
function formatRow(bead, depth = 0, isLast = false) {
|
|
32
32
|
const id = bead.id.padEnd(14);
|
|
33
33
|
const p = `P${bead.priority ?? 2}`;
|
|
34
|
-
|
|
34
|
+
// Effective status mirrors how `bd blocked` derives the Blocked tab:
|
|
35
|
+
// an open bead whose blockers aren't all closed reads as "blocked",
|
|
36
|
+
// not "open". The raw `bd list` rows only carry the stored status.
|
|
37
|
+
const stat = (bead.status === 'open' && state.blockedIds.has(bead.id))
|
|
38
|
+
? 'blocked'
|
|
39
|
+
: (bead.status || 'open');
|
|
35
40
|
const s = (STATUS_SHORT[stat] || stat.slice(0, 7)).padEnd(7);
|
|
36
41
|
const badge = TYPE_BADGE[bead.issue_type] ?? t('gray', '?');
|
|
37
42
|
const prefix = depth > 0 ? t('gray', isLast ? ' └ ' : ' ├ ') : ' ';
|