bdtui 0.7.1 → 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 CHANGED
@@ -4,6 +4,22 @@ 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
+
7
23
  ## [0.7.1] - 2026-06-21
8
24
 
9
25
  ### Fixed
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 skill (`/executor-task`, `/executor-task-worktree`, `/executor-epic-task`, `/executor-epic-task-worktree`) and copy it with the selected task's ID. Disabled for epics. See [workflow-template](https://github.com/jsiovn/workflow-template). |
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.1",
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
- const escTags = (s) => String(s ?? '').replace(/\{/g, '{open}').replace(/\}/g, '{close}');
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
- if (state.textFilter) parts.push(`"${escTags(state.textFilter)}"`);
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}${msg}{/}` : msg;
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) {
@@ -544,12 +554,8 @@ export async function run(cwd) {
544
554
  if (screen.focused !== list || !state.selectedId) return;
545
555
  const id = state.selectedId;
546
556
  const bead = state.beadsById.get(id);
547
- if (bead?.issue_type === 'epic') {
548
- setStatus(`${id} is an epic — workflow skills apply to tasks only`, true, true);
549
- return;
550
- }
551
557
  try {
552
- const line = await skillPicker(screen, id);
558
+ const line = await skillPicker(screen, id, bead?.issue_type);
553
559
  list.focus();
554
560
  await copyToClipboard(line, {
555
561
  busyMsg: `Copying ${line}…`,
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(err.stderr?.trim() || err.message);
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(err.stderr?.trim() || err.message);
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 skill command for selected task',
37
+ ' w Copy workflow command (tasks: executors; epics: epic-sequential)',
38
38
  ' ? Toggle this help',
39
39
  ' q / Ctrl-C Quit',
40
40
  '',
@@ -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
- function esc(s) { return String(s ?? '').replace(/\{/g, '{open}').replace(/\}/g, '{close}'); }
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) : '—'; }
@@ -175,14 +175,21 @@ export function epicPicker(screen, epics, currentEpicId = null) {
175
175
  });
176
176
  }
177
177
 
178
- export function skillPicker(screen, beadId) {
179
- const items = [
180
- `/executor-task ${beadId}`,
181
- `/executor-task-worktree ${beadId}`,
182
- `/executor-epic-task ${beadId}`,
183
- `/executor-epic-task-worktree ${beadId}`,
184
- `/executor-rework-in-place ${beadId}`,
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