@citadel-labs/beads-ui 2.0.1 → 2.0.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.
Files changed (34) hide show
  1. package/.claude/worktrees/agent-a6ab297c/LICENSE +21 -0
  2. package/.claude/worktrees/agent-a6ab297c/README.md +71 -0
  3. package/.claude/worktrees/agent-a6ab297c/bin/beads-board.js +183 -0
  4. package/.claude/worktrees/agent-a6ab297c/package.json +16 -0
  5. package/.claude/worktrees/agent-a6ab297c/server/dist/assets/index-B8Dp1QU-.js +53 -0
  6. package/.claude/worktrees/agent-a6ab297c/server/dist/assets/index-Cx3XpFYM.css +1 -0
  7. package/.claude/worktrees/agent-a6ab297c/server/dist/index.html +14 -0
  8. package/.claude/worktrees/agent-a6ab297c/server/dist/vite.svg +1 -0
  9. package/.claude/worktrees/agent-a6ab297c/server/index.js +242 -0
  10. package/.claude/worktrees/agent-a8b08b0a/LICENSE +21 -0
  11. package/.claude/worktrees/agent-a8b08b0a/README.md +71 -0
  12. package/.claude/worktrees/agent-a8b08b0a/bin/beads-board.js +183 -0
  13. package/.claude/worktrees/agent-a8b08b0a/package.json +16 -0
  14. package/.claude/worktrees/agent-a8b08b0a/server/dist/assets/index-CidSj3mC.css +1 -0
  15. package/.claude/worktrees/agent-a8b08b0a/server/dist/assets/index-tKlN_npR.js +53 -0
  16. package/.claude/worktrees/agent-a8b08b0a/server/dist/index.html +14 -0
  17. package/.claude/worktrees/agent-a8b08b0a/server/dist/vite.svg +1 -0
  18. package/.claude/worktrees/agent-a8b08b0a/server/index.js +242 -0
  19. package/package.json +1 -1
  20. package/screenshot-badge-error.png +0 -0
  21. package/screenshot-card-modal.png +0 -0
  22. package/screenshot-collapsed.png +0 -0
  23. package/screenshot-collapsed2.png +0 -0
  24. package/screenshot-hover-commit.png +0 -0
  25. package/screenshot-modal-from-badge.png +0 -0
  26. package/screenshot-overview.png +0 -0
  27. package/screenshot-polished-modal.png +0 -0
  28. package/screenshot-tooltip-hover.png +0 -0
  29. package/server/dist/assets/index-BaFX4Ey_.css +1 -0
  30. package/server/dist/assets/index-CkFv0lE0.js +57 -0
  31. package/server/dist/index.html +2 -2
  32. package/server/index.js +18 -7
  33. package/server/dist/assets/index-C62XoEh1.js +0 -49
  34. package/server/dist/assets/index-DXoLXViw.css +0 -1
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>ui</title>
8
- <script type="module" crossorigin src="/assets/index-C62XoEh1.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-DXoLXViw.css">
8
+ <script type="module" crossorigin src="/assets/index-CkFv0lE0.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-BaFX4Ey_.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/server/index.js CHANGED
@@ -50,6 +50,17 @@ async function execGit(args) {
50
50
  return execCmd('git', args, PROJECT_DIR);
51
51
  }
52
52
 
53
+ // ---------------------------------------------------------------------------
54
+ // Issue normalization — bd CLI outputs `issue_type`, UI expects `type`
55
+ // ---------------------------------------------------------------------------
56
+
57
+ function normalizeIssue(issue) {
58
+ if (issue.issue_type && !issue.type) {
59
+ issue.type = issue.issue_type;
60
+ }
61
+ return issue;
62
+ }
63
+
53
64
  // ---------------------------------------------------------------------------
54
65
  // JSON response helpers
55
66
  // ---------------------------------------------------------------------------
@@ -87,13 +98,13 @@ async function handleRequest(req, res) {
87
98
  try {
88
99
  if (pathname === '/api/issues') {
89
100
  const issues = await execBd(['list', '--flat', '--status=all']);
90
- jsonResponse(res, issues);
101
+ jsonResponse(res, Array.isArray(issues) ? issues.map(normalizeIssue) : issues);
91
102
  } else if (pathname === '/api/ready') {
92
103
  const ready = await execBd(['ready']);
93
- jsonResponse(res, ready);
104
+ jsonResponse(res, Array.isArray(ready) ? ready.map(normalizeIssue) : ready);
94
105
  } else if (pathname === '/api/blocked') {
95
106
  const blocked = await execBd(['blocked']);
96
- jsonResponse(res, blocked);
107
+ jsonResponse(res, Array.isArray(blocked) ? blocked.map(normalizeIssue) : blocked);
97
108
  } else if (pathname.startsWith('/api/issue/')) {
98
109
  const id = pathname.split('/api/issue/')[1];
99
110
  if (!id || !/^[\w-]+$/.test(id)) {
@@ -109,13 +120,13 @@ async function handleRequest(req, res) {
109
120
  errorResponse(res, 'Invalid branch name', 400);
110
121
  return;
111
122
  }
112
- const format = '%h%x00%s%x00%an%x00%ai';
123
+ const format = '%h%x00%s%x00%b%x00%an%x00%ai%x1e';
113
124
  const args = ['log', `--format=${format}`, `-n`, `${limit}`];
114
125
  if (branch) args.splice(1, 0, branch);
115
126
  const stdout = await execGit(args);
116
- const commits = stdout.trim().split('\n').filter(Boolean).map(line => {
117
- const [hash, message, author, date] = line.split('\0');
118
- return { hash, message, author, date };
127
+ const commits = stdout.split('\x1e').filter(s => s.trim()).map(record => {
128
+ const [hash, message, body, author, date] = record.trim().split('\0');
129
+ return { hash, message, body: body?.trim() || '', author, date };
119
130
  });
120
131
  jsonResponse(res, commits);
121
132
  } else if (pathname === '/api/project') {