OXYGENHUB

README as walkthroughs by task with a settings table, dated changelog entries, and a test that the docs keep up with the manifest e04950748142

refs andymccall/oxygen-vscode#4
Author
Andy McCall @andymccall <[email protected]>
When
· 2026-09-28 16:15 UTC
Signature
✔ signed by Andy McCall
Hash
e049507481420c42ff55ba0aa59bc739b1ab57b4c2aa91c34edd0a7760847152
Depends on
092b8bf9f2ac 1cc0ff44e5ca 426ddc5039b5 486c15b00314 52cef00143db 6e249bbf7777 95f69b4a3ac2 b2dd082c57e4 bf73998c5198 f0b06deac4b9 f902d5b8bfeb
Depended on by
991516a107fa d21a85954a34 85a87a2d7d5b d8ac8f93fd34 d8c9bdc51ee0 bd69712343d2 263de209e5ba 5888949525ec
In bookmarks
main
In tags
v0.10.0 v0.10.1 v0.10.2 v0.11.0 v0.11.1 v0.11.2 v0.13.0
Edits
16 atoms, 1 tree operation, 3 files

Browse the tree at this change

added test/docs.test.mjs +26 −0
1 +
// The documentation keeps up with the manifest: every setting is described
2 +
// in the README, and the CHANGELOG has a dated entry for this version.
3 +
4 +
import { test } from "node:test";
5 +
import assert from "node:assert/strict";
6 +
import { readFileSync } from "node:fs";
7 +
8 +
const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
9 +
const readme = readFileSync(new URL("../README.md", import.meta.url), "utf8");
10 +
const changelog = readFileSync(new URL("../CHANGELOG.md", import.meta.url), "utf8");
11 +
12 +
test("every setting is documented in the README's Settings table", () => {
13 +
  const cfg = pkg.contributes.configuration;
14 +
  const props = (Array.isArray(cfg) ? cfg : [cfg]).flatMap((c) => Object.keys(c.properties ?? {}));
15 +
  assert.ok(props.length > 0);
16 +
  const table = readme.slice(readme.indexOf("## Settings"));
17 +
  const missing = props.filter((p) => !table.includes("| `" + p + "` |"));
18 +
  assert.deepEqual(missing, [], "settings missing from the README");
19 +
});
20 +
21 +
test("the CHANGELOG's newest entry is this version, and every entry is dated", () => {
22 +
  const headings = [...changelog.matchAll(/^## (.+)$/gm)].map((m) => m[1]);
23 +
  assert.match(headings[0], new RegExp("^" + pkg.version.replace(/\./g, "\\.") + " \\(\\d{4}-\\d{2}-\\d{2}\\)$"));
24 +
  const undated = headings.filter((h) => !/^\d+\.\d+\.\d+ \(\d{4}-\d{2}-\d{2}\)$/.test(h));
25 +
  assert.deepEqual(undated, [], "entries without a version and date");
26 +
});
modified CHANGELOG.md +10 −10
1 1
# Changelog
2 2
3 -
## 0.6.2
3 +
## 0.6.2 (2026-09-28)
4 4
5 5
- File links keep line ranges (`#L10-L20`) and permalinks to a state (`hash+hash`) readable, for Oxygen's Copy Permalink.
6 6
- API types match OxygenHub 0.1 with issue editing, labels and projects.
7 7
8 -
## 0.6.1
8 +
## 0.6.1 (2026-09-28)
9 9
10 10
- The name is written OxygenHub throughout.
11 11
12 -
## 0.6.0
12 +
## 0.6.0 (2026-09-28)
13 13
14 14
- A **Releases** view: each repository's releases with their assets and source archives, to open or download.
15 15
- **Draft Release…**: pick a tag without a release, confirm the title, and the notes are written from the changes since the last release.
16 16
17 -
## 0.5.0
17 +
## 0.5.0 (2026-09-28)
18 18
19 19
- **New Issue from Selection** in the editor's context menu: the selected lines (or the current one) quoted in a new issue with a permalink to them on the hub. A TODO or FIXME line suggests the title, and the issue's number can be written back into it as `TODO(#12)`.
20 20
- File links on the hub can carry a line range (`#L3-L7`).
21 21
22 -
## 0.4.0
22 +
## 0.4.0 (2026-09-28)
23 23
24 24
- Type `#` in the Oxygen commit box or a review comment to pick an issue or proposal by number or title, and `@` to mention someone who has opened or been assigned one.
25 25
- Hover a `#N` to see what it is: kind, state, title and author, with a link to the hub.
26 26
27 -
## 0.3.0
27 +
## 0.3.0 (2026-09-28)
28 28
29 29
- A bell in the status bar with your unread notifications across every hub you are signed in to, and a message when new ones arrive (`oxygenhub.announceNotifications`).
30 30
- **Open Inbox**: your notifications, unread first; pick one to mark it read and open it, in the editor for proposals and issues of your workspace's repositories. Mark all as read from the top of the list.
31 31
- Needs OxygenHub with the notifications API (2026-09-28) and a token with `user:read`.
32 32
33 -
## 0.2.0
33 +
## 0.2.0 (2026-09-28)
34 34
35 35
- Proposals expand to their changed files. Click one to open it in VS Code's diff editor: the target's state against the projected state, straight from the hub, no checkout needed.
36 36
- **View Changes** on a proposal (inline button, or in the detail) opens every file in one multi-file diff editor.
37 37
- Review threads appear in those diff editors on the projected side, and new comments there are anchored to the line's atom on the hub.
38 38
- Needs OxygenHub with the proposal files and content API (2026-09-28).
39 39
40 -
## 0.1.2
40 +
## 0.1.2 (2026-09-27)
41 41
42 42
- Fix: the dependency on the Oxygen extension named the wrong id (`andymccall.oxygen-vscode` instead of `oxygen.oxygen-vscode`), so VS Code never activated this extension and Sign in did nothing.
43 43
- The activity bar shows the Oxygen mark itself rather than a filled square.
44 44
45 -
## 0.1.1
45 +
## 0.1.1 (2026-09-27)
46 46
47 47
- Review replies and new threads are anchored to the line's atom through the hub API, so they follow the line through rebases.
48 48
- Hub API types regenerated (releases, anchored comments).
49 49
50 -
## 0.1.0
50 +
## 0.1.0 (2026-09-27)
51 51
52 52
- Sign in to a hub with a personal access token (an `oxygenhub` authentication provider).
53 53
- Hub client over `/api/v1` with the hub's generated types.
…
5 unchanged lines
modified README.md +73 −16
1 1
# OxygenHub for Visual Studio Code
2 2
3 -
Proposals, reviews, issues and checks from an OxygenHub in
4 -
the editor, built on the Oxygen extension the way the
5 -
GitHub Pull Requests extension builds on the built-in Git extension. The
6 -
specification is docs/spec.md in the repository.
3 +
Proposals, reviews, issues, releases and checks from an OxygenHub, in the editor. It builds on the Oxygen extension the way the GitHub Pull Requests extension builds on the built-in Git extension. The specification is `docs/spec.md` in this repository.
7 4
8 -
- **Sign in** with a hub URL and a personal access token (Settings › Tokens on the hub).
9 -
- **Proposals** view: needing me, mine, open; detail with blockers, approvals, checks and changes; check out the projected state; review; seal your approval and land, both through `oxy` in a terminal with your own key.
10 -
- **Issues from the editor**: turn a selection or a TODO line into an issue that quotes the code and links to it.
11 -
- **References while typing**: `#` and `@` completion in the commit box and comments, and a hover on `#N`.
12 -
- **Notifications**: an unread count in the status bar and an inbox that opens proposals and issues in the editor.
13 -
- **Diffs in the editor**: expand a proposal to its files and open each in VS Code's diff editor (target against projected state), or View Changes for all of them at once, without checking out.
14 -
- **Review threads** in those diffs and on the checked-out proposal's files, anchored to atoms so they follow lines through rebases.
15 -
- **Issues** view: open, create, comment, close, assign.
16 -
- **Releases** view: releases with their assets; draft a release from a tag with notes written from the changes since the last one.
17 -
- **Open on Remote** in the Oxygen extension works for hubs once this extension is installed.
18 -
- **Status bar**: the checks of the proposal whose source is your current bookmark, live.
5 +
## Requirements
19 6
20 -
`npm run check` type-checks, bundles and runs the Node tests; the hub client tests start a real hub from `../oxygenhub/target/release/oxygenhub` when it exists.
7 +
- Visual Studio Code 1.137 or later.
8 +
- The **Oxygen** extension (`oxygen.oxygen-vscode`), which this one depends on, and `oxy` on your PATH.
9 +
- An account on an OxygenHub, and a personal access token from it (Settings › Tokens on the hub). `repo:write` covers everything here; `repo:read` is enough to browse.
10 +
11 +
## Getting started
12 +
13 +
1. Run **OxygenHub: Sign in**, give the hub's URL (for example `https://earth.example.org:7343`) and paste the token. The token is kept in VS Code's secret storage, never in settings.
14 +
2. Open a repository whose remote is on that hub. The **OxygenHub** activity bar icon shows Proposals, Issues and Releases for it.
15 +
3. **Open on Remote** and **Copy Permalink** in the Oxygen extension now open pages on the hub.
16 +
17 +
## Walkthroughs
18 +
19 +
### Propose a change
20 +
21 +
1. Commit on a bookmark other than the target.
22 +
2. Run **Propose Current Bookmark…** and pick the target bookmark, then give a title. The bookmark is pushed for you, and the new proposal opens on the hub, where you can write its description.
23 +
3. While that bookmark is current, the status bar follows the proposal's checks live.
24 +
25 +
### Review a proposal
26 +
27 +
1. In **Proposals**, look under **Needing me**. Expand a proposal to see its files.
28 +
2. Click a file for a diff of the target against the proposal's projected state. **View Changes** opens them all.
29 +
3. Hover in the diff and choose **Start Review Thread** to comment on a line. Threads are anchored to atoms (Oxygen's content-addressed lines), so they follow their lines when the proposal is rebased. **Reply** and **Resolve** work in place.
30 +
4. **Review…** approves, requests changes or comments.
31 +
5. To approve with your key, run **Seal My Approval**. It runs `oxy seal --proposal` in a terminal, so the signature is made on your machine.
32 +
33 +
**Check Out Proposal** puts the projected state on a local bookmark named with `oxygenhub.proposalBookmarkPrefix`, so you can run it.
34 +
35 +
### Land a proposal
36 +
37 +
When the requirements are met (approvals, checks, no conflicts), **Land Proposal** lands it through `oxy` in a terminal, with your own key. **Close Proposal** closes it without landing.
38 +
39 +
### File and work on issues
40 +
41 +
- **New Issue…** opens an issue on the repository.
42 +
- Select code, or put the cursor on a `TODO` line, and run **New Issue from Selection…**. The issue quotes the code and links to it.
43 +
- In **Issues**, open an issue to read it. **Comment on Issue…**, **Assign to Me**, **Close Issue** and **Reopen Issue** act on it.
44 +
- Typing `#` or `@` in the commit box or a comment completes issue, proposal and user names. Hovering `#N` shows what it is.
45 +
- A change message with `closes #N` closes that issue when it lands on the default bookmark. Any other `#N` puts the change on that issue's timeline.
46 +
47 +
### Publish a release
48 +
49 +
In **Releases**, run **Draft Release…** and pick a tag. The notes are drafted from the changes since the previous release; edit them before publishing. Each release lists its assets.
50 +
51 +
### Keep up with notifications
52 +
53 +
The status bar shows how many notifications are unread. **Open Inbox** lists them, and each opens its proposal or issue in the editor. New ones are announced unless `oxygenhub.announceNotifications` is off.
54 +
55 +
## Settings
56 +
57 +
| Setting | Default | What it does |
58 +
|---|---|---|
59 +
| `oxygenhub.hubs` | `[]` | Base URLs of the hubs you use. Signing in adds to it, so you rarely edit it by hand. |
60 +
| `oxygenhub.proposalBookmarkPrefix` | `"proposal/"` | Prefix of the local bookmark made by **Check Out Proposal** (`proposal/12`). |
61 +
| `oxygenhub.autoRefresh` | `60` | Seconds between refreshes of the views, the checks and the notification count; `0` turns it off. |
62 +
| `oxygenhub.announceNotifications` | `true` | Show a message when new notifications arrive (checked on the `autoRefresh` interval). |
63 +
64 +
## Building
65 +
66 +
```
67 +
npm install
68 +
npm run check          # typecheck, bundle, and the Node tests
69 +
npm run package        # oxygenhub-vscode-<version>.vsix
70 +
code --install-extension oxygenhub-vscode-<version>.vsix
71 +
```
72 +
73 +
The hub client tests start a real hub from `../oxygenhub/target/release/oxygenhub` when that binary exists. `src/hubapi.d.ts` is generated by OxygenHub (`make ts` there); copy it over when the API changes.
74 +
75 +
## Licence
76 +
77 +
MIT or Apache-2.0, at your option, as for Oxygen itself.