bdtui 0.7.0 → 0.7.2
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 +24 -0
- package/README.md +1 -1
- package/package.json +20 -3
- package/src/app.js +29 -11
- package/src/bd.js +22 -2
- package/src/keys.js +25 -2
- package/src/views/detail.js +4 -1
- package/src/views/modals.js +15 -8
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.7.2] - 2026-06-29
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `w` now works on epics. Previously the workflow-command picker was disabled for epics ("workflow skills apply to tasks only"); pressing `w` on an epic now opens a picker offering `/executor-epic-sequential` and `/executor-epic-sequential-worktree` (which run every ready child of the epic on a single branch / isolated worktree). Tasks, chores, and bugs keep their existing per-bead executors.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- `bd` errors now render as readable text in the status bar. When a `bd` command failed, bdtui threw the entire structured JSON error body (`{"error": "…", "schema_version": 1}`) verbatim — a multi-line blob whose leading `{` corrupted the one-line status bar markup (the "error with `{`" seen when a tab failed to load). bdtui now parses that body and surfaces just the human-readable `error` field, collapsing newlines and escaping tag markup so the status bar stays a clean single line.
|
|
16
|
+
- Tag-escaping no longer mangles text containing a literal `}`. The two-step escape (`replace('{')` then `replace('}')`) re-processed the `}` it had just inserted into `{open}`, turning any `}` in a bead description (e.g. JSON/code snippets) or in a `/` search query into a stray `{open}` token. Escaping is now a single pass in both the detail pane and the status bar.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- npm package metadata: expanded `description` and added `keywords` for discoverability; normalized the repository URL to the `git+https://` form.
|
|
21
|
+
- Removed internal agent-workflow tooling (`.beads/`, `.claude/` agents and skills, `CLAUDE.md`, `BEADS_WORKFLOW.md`, `docs/TROUBLESHOOTING.md`) from the repository.
|
|
22
|
+
|
|
23
|
+
## [0.7.1] - 2026-06-21
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- The **Keybindings** (`?`) help can now be dismissed after a mouse click moves focus to the Beads list or Detail pane. Its close keys were bound to the help box itself, so once a click stole focus the modal became unclosable (every global key is suppressed while a modal is open). `q`/`Esc`/`h` are now bound at the screen level and dismiss it regardless of which pane holds focus.
|
|
28
|
+
- Reopening the Keybindings help with `?` works again. `?` is now a single open/close toggle, fixing a re-entrancy where the freshly-registered `?` close handler fired on the very keypress that opened the modal and slammed it shut.
|
|
29
|
+
- The boot status bar no longer shows the `? help` hint twice. `setStatus` already appends it, so the redundant hint baked into the "Ready" message was removed.
|
|
30
|
+
|
|
7
31
|
## [0.7.0] - 2026-06-21
|
|
8
32
|
|
|
9
33
|
### Added
|
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ be-12 P2 ready T └ Another child
|
|
|
82
82
|
| `p` | Change priority |
|
|
83
83
|
| `h` | Change parent (epic / standalone) |
|
|
84
84
|
| `y` | Yank bead ID to clipboard |
|
|
85
|
-
| `w` | Pick a workflow
|
|
85
|
+
| `w` | Pick a workflow command and copy it with the selected bead's ID. Tasks list the per-bead executors (`/executor-task`, `/executor-task-worktree`, `/executor-epic-task`, `/executor-epic-task-worktree`, `/executor-rework-in-place`); epics list `/executor-epic-sequential` and `/executor-epic-sequential-worktree`. See [workflow-template](https://github.com/jsiovn/workflow-template). |
|
|
86
86
|
| `?` | Help overlay |
|
|
87
87
|
| `q` / `Ctrl-C` | Quit |
|
|
88
88
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bdtui",
|
|
3
|
-
"version": "0.7.
|
|
4
|
-
"description": "Terminal UI for the bd beads issue tracker",
|
|
3
|
+
"version": "0.7.2",
|
|
4
|
+
"description": "Terminal UI (TUI) for the bd beads issue tracker - browse, filter, and update beads from the CLI with vim keybindings",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"bd",
|
|
7
|
+
"beads",
|
|
8
|
+
"bdtui",
|
|
9
|
+
"issue-tracker",
|
|
10
|
+
"tui",
|
|
11
|
+
"terminal-ui",
|
|
12
|
+
"terminal",
|
|
13
|
+
"cli",
|
|
14
|
+
"bug-tracker",
|
|
15
|
+
"project-management",
|
|
16
|
+
"blessed",
|
|
17
|
+
"vim",
|
|
18
|
+
"dependency-aware",
|
|
19
|
+
"developer-tools",
|
|
20
|
+
"nodejs"
|
|
21
|
+
],
|
|
5
22
|
"type": "module",
|
|
6
23
|
"bin": {
|
|
7
24
|
"bdtui": "bin/bdtui.js"
|
|
@@ -14,7 +31,7 @@
|
|
|
14
31
|
],
|
|
15
32
|
"repository": {
|
|
16
33
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/jsiovn/bdtui.git"
|
|
34
|
+
"url": "git+https://github.com/jsiovn/bdtui.git"
|
|
18
35
|
},
|
|
19
36
|
"homepage": "https://github.com/jsiovn/bdtui#readme",
|
|
20
37
|
"bugs": {
|
package/src/app.js
CHANGED
|
@@ -13,7 +13,10 @@ const TYPE_FILTERS = ['all', 'epic', 'task', 'chore', 'bug'];
|
|
|
13
13
|
// Neutralize blessed tag markup in free text before it lands in a tags:true
|
|
14
14
|
// box (mirrors esc() in views/detail.js). The title search is user-typed, so a
|
|
15
15
|
// query like "{bold}" would otherwise corrupt the status line.
|
|
16
|
-
|
|
16
|
+
// Single pass: a two-step .replace(/\{/).replace(/\}/) would re-process the "}"
|
|
17
|
+
// it just inserted into "{open}", corrupting any text that contains a literal
|
|
18
|
+
// "}" (e.g. a bd JSON error blob) into a stray "{open}" token.
|
|
19
|
+
const escTags = (s) => String(s ?? '').replace(/[{}]/g, (c) => (c === '{' ? '{open}' : '{close}'));
|
|
17
20
|
|
|
18
21
|
export async function run(cwd) {
|
|
19
22
|
state.cwd = cwd;
|
|
@@ -48,7 +51,9 @@ export async function run(cwd) {
|
|
|
48
51
|
// active so the caller can fall back to a plain "Ready".
|
|
49
52
|
function filterSummary() {
|
|
50
53
|
const parts = [];
|
|
51
|
-
|
|
54
|
+
// Plain text only — setStatus() escapes the whole summary, so pre-escaping
|
|
55
|
+
// textFilter here would double-escape any braces in the search query.
|
|
56
|
+
if (state.textFilter) parts.push(`"${state.textFilter}"`);
|
|
52
57
|
if (state.epicFilter) parts.push(`epic: ${state.epicFilter}`);
|
|
53
58
|
if (state.typeFilter !== 'all') parts.push(`type: ${state.typeFilter}`);
|
|
54
59
|
if (parts.length === 0) return null;
|
|
@@ -59,8 +64,13 @@ export async function run(cwd) {
|
|
|
59
64
|
}
|
|
60
65
|
function setStatus(msg, isError = false, transient = false) {
|
|
61
66
|
if (statusTimer) { clearTimeout(statusTimer); statusTimer = null; }
|
|
67
|
+
// The status bar is a single tags:true row. Neutralize blessed tag markup
|
|
68
|
+
// and collapse newlines so dynamic text — bd error messages especially,
|
|
69
|
+
// which can be multi-line and contain "{" — renders as plain text instead
|
|
70
|
+
// of corrupting the markup or overflowing the one-line height.
|
|
71
|
+
const safe = escTags(String(msg ?? '').replace(/\s*\n\s*/g, ' ').trim());
|
|
62
72
|
const icon = isError ? '{red-fg}✗{/}' : '{green-fg}●{/}';
|
|
63
|
-
const text = isError ? `{red-fg}${
|
|
73
|
+
const text = isError ? `{red-fg}${safe}{/}` : safe;
|
|
64
74
|
statusBar.setContent(` ${icon} ${text} {gray-fg}? help · q quit{/}`);
|
|
65
75
|
screen.render();
|
|
66
76
|
if (transient) {
|
|
@@ -282,9 +292,19 @@ export async function run(cwd) {
|
|
|
282
292
|
setStatus(defaultStatus());
|
|
283
293
|
});
|
|
284
294
|
|
|
285
|
-
|
|
295
|
+
// '?' toggles the help modal. Registered directly (NOT through key(), which
|
|
296
|
+
// swallows every global while a modal is open) so the same key that opens the
|
|
297
|
+
// help can also close it. Driving open AND close from this one handler — kept
|
|
298
|
+
// out of showHelp's own close keys — avoids re-entrancy: a separate '?' close
|
|
299
|
+
// binding would fire on the very keypress that registered it and slam the
|
|
300
|
+
// modal shut again. closeHelp is non-null exactly while the help is open.
|
|
301
|
+
let closeHelp = null;
|
|
302
|
+
screen.key(['?'], () => {
|
|
303
|
+
if (closeHelp) { closeHelp(); return; }
|
|
304
|
+
if (modalOpen) return; // another modal (a picker) owns the screen
|
|
286
305
|
modalOpen = true;
|
|
287
|
-
showHelp(screen, () => {
|
|
306
|
+
closeHelp = showHelp(screen, () => {
|
|
307
|
+
closeHelp = null;
|
|
288
308
|
modalOpen = false;
|
|
289
309
|
list.focus();
|
|
290
310
|
screen.render();
|
|
@@ -534,12 +554,8 @@ export async function run(cwd) {
|
|
|
534
554
|
if (screen.focused !== list || !state.selectedId) return;
|
|
535
555
|
const id = state.selectedId;
|
|
536
556
|
const bead = state.beadsById.get(id);
|
|
537
|
-
if (bead?.issue_type === 'epic') {
|
|
538
|
-
setStatus(`${id} is an epic — workflow skills apply to tasks only`, true, true);
|
|
539
|
-
return;
|
|
540
|
-
}
|
|
541
557
|
try {
|
|
542
|
-
const line = await skillPicker(screen, id);
|
|
558
|
+
const line = await skillPicker(screen, id, bead?.issue_type);
|
|
543
559
|
list.focus();
|
|
544
560
|
await copyToClipboard(line, {
|
|
545
561
|
busyMsg: `Copying ${line}…`,
|
|
@@ -564,5 +580,7 @@ export async function run(cwd) {
|
|
|
564
580
|
setStatus(err.message, true);
|
|
565
581
|
}
|
|
566
582
|
render();
|
|
567
|
-
setStatus
|
|
583
|
+
// setStatus already appends "? help · q quit"; defaultStatus() yields "Ready"
|
|
584
|
+
// (or the active-filter summary) without duplicating the help hint.
|
|
585
|
+
setStatus(defaultStatus());
|
|
568
586
|
}
|
package/src/bd.js
CHANGED
|
@@ -7,12 +7,32 @@ const execFileP = promisify(execFile);
|
|
|
7
7
|
// closed beads) can exceed that and throw "stdout maxBuffer length exceeded".
|
|
8
8
|
const MAX_BUFFER = 64 * 1024 * 1024; // 64MB
|
|
9
9
|
|
|
10
|
+
// bd reports failures with a non-zero exit and a structured JSON body
|
|
11
|
+
// ({"error": "…", "schema_version": 1}) — usually on stderr, occasionally on
|
|
12
|
+
// stdout. Surface the human-readable `error` field; fall back to the raw text,
|
|
13
|
+
// then execFile's own message. Without this the whole multi-line JSON blob —
|
|
14
|
+
// leading "{" and all — gets thrown verbatim and dumped into the one-line
|
|
15
|
+
// status bar, which is the "error with {" users see when a tab fails to load.
|
|
16
|
+
function bdErrorMessage(err) {
|
|
17
|
+
const raw = (err.stderr?.trim() || err.stdout?.trim() || '');
|
|
18
|
+
if (raw) {
|
|
19
|
+
try {
|
|
20
|
+
const parsed = JSON.parse(raw);
|
|
21
|
+
if (parsed && typeof parsed.error === 'string' && parsed.error.trim()) {
|
|
22
|
+
return parsed.error.trim();
|
|
23
|
+
}
|
|
24
|
+
} catch {}
|
|
25
|
+
return raw;
|
|
26
|
+
}
|
|
27
|
+
return err.message;
|
|
28
|
+
}
|
|
29
|
+
|
|
10
30
|
async function runBd(args, cwd) {
|
|
11
31
|
try {
|
|
12
32
|
const { stdout } = await execFileP('bd', args, { cwd, maxBuffer: MAX_BUFFER });
|
|
13
33
|
return JSON.parse(stdout);
|
|
14
34
|
} catch (err) {
|
|
15
|
-
throw new Error(
|
|
35
|
+
throw new Error(bdErrorMessage(err));
|
|
16
36
|
}
|
|
17
37
|
}
|
|
18
38
|
|
|
@@ -24,7 +44,7 @@ async function runBdVoid(args, cwd) {
|
|
|
24
44
|
try {
|
|
25
45
|
await execFileP('bd', args, { cwd, maxBuffer: MAX_BUFFER });
|
|
26
46
|
} catch (err) {
|
|
27
|
-
throw new Error(
|
|
47
|
+
throw new Error(bdErrorMessage(err));
|
|
28
48
|
}
|
|
29
49
|
}
|
|
30
50
|
|
package/src/keys.js
CHANGED
|
@@ -34,7 +34,7 @@ export const HELP_TEXT = [
|
|
|
34
34
|
' Other',
|
|
35
35
|
' ──────────────────────────────────────',
|
|
36
36
|
' y Yank bead ID to clipboard',
|
|
37
|
-
' w Copy workflow
|
|
37
|
+
' w Copy workflow command (tasks: executors; epics: epic-sequential)',
|
|
38
38
|
' ? Toggle this help',
|
|
39
39
|
' q / Ctrl-C Quit',
|
|
40
40
|
'',
|
|
@@ -65,11 +65,34 @@ export function showHelp(screen, onClose) {
|
|
|
65
65
|
box.focus();
|
|
66
66
|
screen.render();
|
|
67
67
|
|
|
68
|
+
// '?' is deliberately NOT a close key here — the caller (app.js) drives it as
|
|
69
|
+
// an open/close toggle. Binding '?' as a close key would re-enter on the very
|
|
70
|
+
// keypress that opens the modal: the toggle adds this listener mid-dispatch
|
|
71
|
+
// and blessed's emitter would then fire it in the same 'key ?' pass, slamming
|
|
72
|
+
// the help shut the instant it opened. q/Esc/h are safe — they never open the
|
|
73
|
+
// help, so they can only ever close it.
|
|
74
|
+
const CLOSE_KEYS = ['q', 'escape', 'h'];
|
|
75
|
+
let closed = false;
|
|
68
76
|
const close = () => {
|
|
77
|
+
if (closed) return;
|
|
78
|
+
closed = true;
|
|
79
|
+
screen.unkey(CLOSE_KEYS, close);
|
|
69
80
|
box.destroy();
|
|
70
81
|
screen.render();
|
|
71
82
|
onClose?.();
|
|
72
83
|
};
|
|
73
84
|
|
|
74
|
-
box.
|
|
85
|
+
// Bind the close keys on the screen, not the box. A box-level binding only
|
|
86
|
+
// fires while the box holds keyboard focus, but the Beads list and Detail
|
|
87
|
+
// pane are both mouse:true — a click on either steals focus from the help
|
|
88
|
+
// box. app.js suppresses every global key while a modal is open, so a
|
|
89
|
+
// focus-stealing click would otherwise leave the help permanently stuck
|
|
90
|
+
// open (its own close keys dead, every global key inert). Screen-level keys
|
|
91
|
+
// fire regardless of which pane holds focus, so q/Esc/h always dismiss it.
|
|
92
|
+
// unkey() on close keeps the binding from leaking across repeated opens.
|
|
93
|
+
screen.key(CLOSE_KEYS, close);
|
|
94
|
+
|
|
95
|
+
// Returned so the caller's '?' toggle can dismiss the help regardless of
|
|
96
|
+
// which pane currently holds focus.
|
|
97
|
+
return close;
|
|
75
98
|
}
|
package/src/views/detail.js
CHANGED
|
@@ -24,7 +24,10 @@ const STATUS_ICON = {
|
|
|
24
24
|
const PRIORITY_COLOR = ['red', 'yellow', 'green', 'cyan', 'gray'];
|
|
25
25
|
const PRIORITY_LABEL = ['Critical', 'High', 'Normal', 'Low', 'Trivial'];
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
// Single pass: a two-step .replace(/\{/).replace(/\}/) would re-process the "}"
|
|
28
|
+
// it just inserted into "{open}", corrupting any text containing a literal "}"
|
|
29
|
+
// (e.g. a JSON/code snippet in a description) into a stray "{open}" token.
|
|
30
|
+
function esc(s) { return String(s ?? '').replace(/[{}]/g, (c) => (c === '{' ? '{open}' : '{close}')); }
|
|
28
31
|
function t(color, text) { return `{${color}-fg}${text}{/}`; }
|
|
29
32
|
function bold(text) { return `{bold}${text}{/bold}`; }
|
|
30
33
|
function fmtDate(iso) { return iso ? iso.slice(0, 10) : '—'; }
|
package/src/views/modals.js
CHANGED
|
@@ -175,14 +175,21 @@ export function epicPicker(screen, epics, currentEpicId = null) {
|
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
export function skillPicker(screen, beadId) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
178
|
+
export function skillPicker(screen, beadId, issueType) {
|
|
179
|
+
// Epics get the epic-level executor (runs every ready child sequentially on a
|
|
180
|
+
// single branch); tasks/chores/bugs get the per-bead executors.
|
|
181
|
+
const items = issueType === 'epic'
|
|
182
|
+
? [
|
|
183
|
+
`/executor-epic-sequential ${beadId}`,
|
|
184
|
+
`/executor-epic-sequential-worktree ${beadId}`,
|
|
185
|
+
]
|
|
186
|
+
: [
|
|
187
|
+
`/executor-task ${beadId}`,
|
|
188
|
+
`/executor-task-worktree ${beadId}`,
|
|
189
|
+
`/executor-epic-task ${beadId}`,
|
|
190
|
+
`/executor-epic-task-worktree ${beadId}`,
|
|
191
|
+
`/executor-rework-in-place ${beadId}`,
|
|
192
|
+
];
|
|
186
193
|
return listPicker(screen, 'Copy workflow command', items, 'magenta', 56, 1);
|
|
187
194
|
}
|
|
188
195
|
|