@moberg_hr/work-tree 1.8.0 → 1.9.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/README.md +6 -4
- package/dist/bin.js +541 -166
- package/dist/bin.js.map +1 -1
- package/dist/wd-bin.js +538 -163
- package/dist/wd-bin.js.map +1 -1
- package/dist/web/assets/{index-BV5-pKcI.js → index-B-iWIQnC.js} +57 -58
- package/dist/web/assets/index-B-iWIQnC.js.map +1 -0
- package/dist/web/assets/{index-uJQw1Itb.css → index-BYfxyhDx.css} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-BV5-pKcI.js.map +0 -1
package/README.md
CHANGED
|
@@ -273,20 +273,20 @@ wd -c # interactive review: leave comments inline, stream to stdou
|
|
|
273
273
|
|
|
274
274
|
`wd` resolves the scope from your `cwd`: inside a single-repo worktree it diffs that repo; inside a group worktree (root or any sub-repo) it diffs every repo in the group and renders one tab per repo. Untracked files are included as synthesized "new file" diffs without touching your git index.
|
|
275
275
|
|
|
276
|
-
**One server, every scope.**
|
|
276
|
+
**One server, every scope.** `wd` and `wd -c` register as a *scope* on the singleton `work web` and open `/diff/<hash>` or `/review/<hash>` — no new process, no extra port. When no `work web` is running, `wd` auto-starts a lean one in the background (`work web --lean --no-open`) and registers on that. Either way the live page reloads itself over SSE when files change.
|
|
277
277
|
|
|
278
278
|
### Modes
|
|
279
279
|
|
|
280
280
|
| Mode | What it does |
|
|
281
281
|
|:---|:---|
|
|
282
|
-
| `wd` (default) | **Live server.**
|
|
282
|
+
| `wd` (default) | **Live server.** Registers on a running `work web`, or auto-starts a lean one in the background. Refresh the browser to pick up saved-file changes (chokidar + SSE, per-repo dirty tracking). De-register this scope with `wd --stop`. `--server` / `--watch` are kept as back-compat aliases. |
|
|
283
283
|
| `wd --static` | Renders a fully self-contained HTML file to `~/.work/diffs/<scope-hash>.html` (bundle + diff JSON inlined), opens via `file://`, and exits. No server, no live reload — survives the CLI. |
|
|
284
284
|
| `wd -c` | **Interactive review.** Click any line number to drop an inline comment; each comment streams to stdout as a markdown marker as it's saved. Blocks until you click "Done & Send" (or Ctrl+C). |
|
|
285
285
|
|
|
286
286
|
### Reading the diff
|
|
287
287
|
|
|
288
288
|
- **Uncommitted vs Since branch** — toggle between the working-tree diff and the full PR-style diff against the branch this worktree was forked from.
|
|
289
|
-
- **Checkpoints + range diff** — `wd`
|
|
289
|
+
- **Checkpoints + range diff** — `wd` snapshots each repo's working tree (including untracked files) and holds the snapshots alive behind `refs/wd/<scope>/<n>` refs. Snapshots are taken **per Claude turn** (via the Stop hook) and when edits settle, so each one is a meaningful unit of work rather than one-per-save. A **Range** picker — a single `From → To` dropdown with a pinned *All changes* reset — lets you diff any two points: the full diff, a single checkpoint's own changes (click it), or any span (shift-click to widen the start). Each checkpoint is labelled with a one-line **Claude-generated summary** of what it changed (generated lazily, cached in the manifest), so you pick by meaning, not by number.
|
|
290
290
|
- **Coverage badges** — if a `coverage/lcov.info` (or `lcov.info`) is present, each file shows its line-coverage percentage. The badge is de-emphasized and flagged when the source has been edited since the coverage report was written, so you don't trust stale numbers.
|
|
291
291
|
- **Reviewed-hunk checkboxes** — tick individual hunks as you review them. The state is keyed on a content hash of the hunk (not line numbers), so it survives live reloads and unrelated edits elsewhere in the file, and persists per-scope in `localStorage`.
|
|
292
292
|
- **Expand context** — each hunk separator is a GitHub-style bar showing the `@@ … @@` heading; where lines are collapsed, converging `↓` / `↑` controls on it reveal the hidden lines a chunk at a time (or all the way to the top/bottom of the file). When a gap is fully expanded — or two hunks are already adjacent — the lines become contiguous and the separator drops away.
|
|
@@ -308,7 +308,9 @@ Other features in review mode:
|
|
|
308
308
|
|
|
309
309
|
- **Markdown comments** — both your comments and Claude's replies render as formatted markdown (code blocks, lists, links), not raw text.
|
|
310
310
|
- **Live reload** via SSE — the page refreshes itself when files change; reloads are deferred while you're composing so your draft isn't lost.
|
|
311
|
-
- **Threaded replies** — a wrapping process
|
|
311
|
+
- **Threaded replies** — a wrapping process posts replies with `parentId` and `author: 'claude'`. In the normal (work-web) flow that's `POST <web>/api/scopes/<hash>/comments`, where `<hash>` is the segment from the `/review/<hash>` URL; the standalone fallback is `POST <url>/api/comments`. Replies render inline under the original with distinct styling.
|
|
312
|
+
- **Resolve / mark done** — mark a comment thread resolved: it collapses to a one-line bar in the diff (click to reopen), and stays listed but dimmed + struck-through in the comments panel, so you can fold away what's handled without losing the record.
|
|
313
|
+
- **Whole-file comments** — a *Comment on file* button in each file header attaches a comment to the file as a whole (GitHub-style), not a specific line.
|
|
312
314
|
- **Drafts & submit** — stage multiple comments as drafts, then submit them in one batch (GitHub-style).
|
|
313
315
|
- **Outdated detection** — the line's raw content is captured at compose time; if the file changes underneath, the comment is dimmed with an "outdated" badge.
|
|
314
316
|
- **General comments** — a top-of-page composer for review notes that aren't tied to any line.
|