beads-ui 0.1.2 → 0.3.0
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/CHANGES.md +29 -2
- package/README.md +39 -45
- package/app/data/list-selectors.js +98 -0
- package/app/data/providers.js +25 -127
- package/app/data/sort.js +45 -0
- package/app/data/subscription-issue-store.js +161 -0
- package/app/data/subscription-issue-stores.js +102 -0
- package/app/data/subscriptions-store.js +219 -0
- package/app/index.html +8 -0
- package/app/main.js +483 -61
- package/app/protocol.js +10 -14
- package/app/protocol.md +21 -19
- package/app/router.js +45 -9
- package/app/state.js +27 -11
- package/app/styles.css +373 -184
- package/app/utils/issue-id-renderer.js +71 -0
- package/app/utils/issue-url.js +9 -0
- package/app/utils/markdown.js +15 -194
- package/app/utils/priority-badge.js +0 -2
- package/app/utils/status-badge.js +0 -1
- package/app/utils/toast.js +34 -0
- package/app/utils/type-badge.js +0 -3
- package/app/views/board.js +439 -87
- package/app/views/detail.js +364 -154
- package/app/views/epics.js +128 -76
- package/app/views/issue-dialog.js +163 -0
- package/app/views/issue-row.js +10 -11
- package/app/views/list.js +164 -93
- package/app/views/new-issue-dialog.js +345 -0
- package/app/ws.js +36 -9
- package/bin/bdui.js +1 -1
- package/docs/adr/001-push-only-lists.md +134 -0
- package/docs/adr/002-per-subscription-stores-and-full-issue-push.md +200 -0
- package/docs/architecture.md +35 -85
- package/docs/data-exchange-subscription-plan.md +198 -0
- package/docs/db-watching.md +2 -1
- package/docs/migration-v2.md +54 -0
- package/docs/protocol/issues-push-v2.md +179 -0
- package/docs/subscription-issue-store.md +112 -0
- package/package.json +11 -3
- package/server/bd.js +0 -2
- package/server/cli/commands.js +12 -5
- package/server/cli/daemon.js +12 -5
- package/server/cli/index.js +34 -5
- package/server/cli/usage.js +2 -2
- package/server/config.js +12 -6
- package/server/db.js +0 -1
- package/server/index.js +9 -5
- package/server/list-adapters.js +218 -0
- package/server/subscriptions.js +277 -0
- package/server/validators.js +111 -0
- package/server/watcher.js +6 -9
- package/server/ws.js +466 -227
- package/docs/quickstart.md +0 -142
package/docs/quickstart.md
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# beads-ui Quickstart
|
|
2
|
-
|
|
3
|
-
This project provides a local-first SPA for the `bd` (beads) CLI. It runs a
|
|
4
|
-
local HTTP + WebSocket server that serves the UI and proxies edits to the `bd`
|
|
5
|
-
CLI. Changes to the active beads database are pushed live to the browser.
|
|
6
|
-
|
|
7
|
-
## Prerequisites
|
|
8
|
-
|
|
9
|
-
- Node.js >= 22
|
|
10
|
-
- The `bd` CLI on your PATH (or set `BD_BIN=/path/to/bd`)
|
|
11
|
-
- An initialized beads database (see below)
|
|
12
|
-
|
|
13
|
-
## Install
|
|
14
|
-
|
|
15
|
-
```sh
|
|
16
|
-
npm install
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Run
|
|
20
|
-
|
|
21
|
-
Use the CLI to daemonize the server and open your browser:
|
|
22
|
-
|
|
23
|
-
```sh
|
|
24
|
-
bdui start
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Or run in the foreground for quick debugging:
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
npm start
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
- Server binds to `127.0.0.1:3000` by default.
|
|
34
|
-
- Open http://127.0.0.1:3000 in your browser.
|
|
35
|
-
|
|
36
|
-
Environment knobs:
|
|
37
|
-
|
|
38
|
-
- `PORT` to change the listen port (default: `3000`). The server always binds to
|
|
39
|
-
`127.0.0.1` for local‑only access.
|
|
40
|
-
- `BD_BIN` to point at a non-default `bd` binary.
|
|
41
|
-
|
|
42
|
-
## Database Resolution and Watching
|
|
43
|
-
|
|
44
|
-
The server and watcher resolve the active beads database in this order:
|
|
45
|
-
|
|
46
|
-
1. `--db <path>` injected by the server when invoking `bd` (derived from
|
|
47
|
-
resolution below)
|
|
48
|
-
2. `BEADS_DB` environment variable, if set
|
|
49
|
-
3. Nearest `.beads/*.db` by walking up from the server `root_dir`
|
|
50
|
-
4. `~/.beads/default.db`
|
|
51
|
-
|
|
52
|
-
The watcher listens for changes to the resolved SQLite DB and broadcasts an
|
|
53
|
-
`issues-changed` event to all connected clients. See `docs/db-watching.md` for
|
|
54
|
-
details.
|
|
55
|
-
|
|
56
|
-
## Initialize a Workspace (if needed)
|
|
57
|
-
|
|
58
|
-
From your project root:
|
|
59
|
-
|
|
60
|
-
```sh
|
|
61
|
-
# create a workspace DB
|
|
62
|
-
bd init
|
|
63
|
-
|
|
64
|
-
# create a few issues
|
|
65
|
-
bd create "First issue" -t task -p 2 -d "Initial work"
|
|
66
|
-
bd create "Bug: wrong color" -t bug -p 1
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
The UI should list these after startup. Edits in the UI map to `bd update`
|
|
70
|
-
commands executed by the server.
|
|
71
|
-
|
|
72
|
-
## Development Workflow
|
|
73
|
-
|
|
74
|
-
- Type check: `npm run typecheck`
|
|
75
|
-
- Tests: `npm test`
|
|
76
|
-
- Lint: `npm run lint`
|
|
77
|
-
- Format: `npm run format`
|
|
78
|
-
|
|
79
|
-
Tests cover protocol handlers, WebSocket client/server behavior, and core UI
|
|
80
|
-
flows (list and detail views, edits, and dependency management).
|
|
81
|
-
|
|
82
|
-
## CLI (`bdui`) Local Link
|
|
83
|
-
|
|
84
|
-
The `bdui` CLI is exposed via npm’s `bin` field for local development. To make
|
|
85
|
-
it available on your PATH:
|
|
86
|
-
|
|
87
|
-
```sh
|
|
88
|
-
npm link
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Common commands:
|
|
92
|
-
|
|
93
|
-
```sh
|
|
94
|
-
bdui start # daemonize the server and open the browser
|
|
95
|
-
bdui start --no-open # start without opening a browser (or set BDUI_NO_OPEN=1)
|
|
96
|
-
bdui stop # stop the daemon (exit code 2 if not running)
|
|
97
|
-
bdui restart # stop then start
|
|
98
|
-
bdui --help # usage
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Runtime directory and logs:
|
|
102
|
-
|
|
103
|
-
- PID and log files live under `$XDG_RUNTIME_DIR/beads-ui` or the system temp
|
|
104
|
-
directory. Override with `BDUI_RUNTIME_DIR=/path`.
|
|
105
|
-
|
|
106
|
-
Environment knobs also used by `bdui`:
|
|
107
|
-
|
|
108
|
-
- `PORT` to change the listen port (default: `3000`)
|
|
109
|
-
- `BDUI_NO_OPEN=1` to disable auto-opening the browser on `start`
|
|
110
|
-
- `BDUI_RUNTIME_DIR` to set a custom runtime directory
|
|
111
|
-
|
|
112
|
-
## Protocol
|
|
113
|
-
|
|
114
|
-
The WebSocket protocol is documented in `app/protocol.md` and shared by server
|
|
115
|
-
and client via `server/protocol.js` re-exports.
|
|
116
|
-
|
|
117
|
-
## Troubleshooting
|
|
118
|
-
|
|
119
|
-
- If the UI shows no issues, verify a beads DB exists or run `bd init` in your
|
|
120
|
-
workspace.
|
|
121
|
-
- To target a specific DB, set `BEADS_DB=/path/to/file.db` before `npm start`.
|
|
122
|
-
- If `bd` isn’t on your PATH, set `BD_BIN` to the full path.
|
|
123
|
-
|
|
124
|
-
### `bdui` specific
|
|
125
|
-
|
|
126
|
-
- Logs and PID: check the runtime dir for `daemon.log` and `server.pid`.
|
|
127
|
-
- Default: `$XDG_RUNTIME_DIR/beads-ui` (Linux), otherwise your system temp
|
|
128
|
-
directory (see `os.tmpdir()`).
|
|
129
|
-
- Override: set `BDUI_RUNTIME_DIR=/path`.
|
|
130
|
-
- Stale process: if `bdui stop` reports exit code `2` but `server.pid` exists,
|
|
131
|
-
remove the PID file and try again:
|
|
132
|
-
|
|
133
|
-
```sh
|
|
134
|
-
rm "$(bdui --help >/dev/null 2>&1; echo ${BDUI_RUNTIME_DIR:-$(echo ${XDG_RUNTIME_DIR:-/tmp})/beads-ui})/server.pid" 2>/dev/null || true
|
|
135
|
-
bdui stop
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
- Port in use: set a different port and restart:
|
|
139
|
-
|
|
140
|
-
```sh
|
|
141
|
-
PORT=4000 bdui restart
|
|
142
|
-
```
|