prreviewbuddy 0.18.0 → 0.19.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/CHANGELOG.md +112 -0
- package/README.md +115 -45
- package/dist/main.js +226 -37
- package/dist/{relative_time-Ckbb4Srd.js → relative_time-BdTOYOad.js} +2792 -2272
- package/dist/server.js +215 -18
- package/package.json +6 -3
- package/static/chunk-B80S6zbH.js +4 -4
- package/static/chunk-B9H2wUlQ.js +1 -0
- package/static/reviews.js +1 -1
- package/static/shell.css +116 -14
- package/static/workspace.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,117 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.19.0
|
|
4
|
+
|
|
5
|
+
*It asks before it sends anything, and the npm page stops reading like a manual.*
|
|
6
|
+
|
|
7
|
+
**PR Review Buddy now asks, once, whether it may send anonymous usage counts.** There is no default:
|
|
8
|
+
nothing is sent until you answer, a bare Return re-asks rather than being read as either answer, and
|
|
9
|
+
answering no is the end of it. If you are not at a terminal, because this is a durable job, a CI run
|
|
10
|
+
or a piped command, it does not ask and does not record an answer, so the same machine is asked
|
|
11
|
+
properly the first time somebody is there to answer.
|
|
12
|
+
|
|
13
|
+
**Two events reach us, carrying eight fields between them.** `review_started` and `review_finished`,
|
|
14
|
+
with a random UUID generated on your machine, the version, the platform, which agent ran the
|
|
15
|
+
analysis, a timestamp, whether it succeeded and how long it took. That is the whole list, and the
|
|
16
|
+
server refuses any field that is not on it rather than accepting the request and dropping what it
|
|
17
|
+
does not recognise, which is what makes [the published field
|
|
18
|
+
table](https://prreviewbuddy.com/privacy) a claim rather than a description.
|
|
19
|
+
|
|
20
|
+
Never sent: your code, diffs, prompts, questions, findings, file paths, repository or branch names,
|
|
21
|
+
or the counts of any of those. The identifier is an installation rather than a person, so a laptop,
|
|
22
|
+
a desktop and a CI machine are three and nothing joins them up. No IP address or user agent is
|
|
23
|
+
stored against an event. `prreviewbuddy config set telemetry-upload off` stops it afterwards, and
|
|
24
|
+
`PRB_TELEMETRY=off` stops both that and the local log.
|
|
25
|
+
|
|
26
|
+
**Rows are deleted after 90 days.** Not archived and not folded into a longer-lived aggregate:
|
|
27
|
+
deleted. Every question the data exists to answer is a weekly one, so thirteen weeks answers all of
|
|
28
|
+
them. A scheduled job in our own application does the deleting, daily, so the period holds whether
|
|
29
|
+
or not anybody sends another event: retention is not a side effect of somebody using the tool.
|
|
30
|
+
|
|
31
|
+
**The local usage log is unchanged.** It still records the full set of events to
|
|
32
|
+
`~/.prreviewbuddy/events.jsonl`, on by default and disclosed since it existed. The question is about
|
|
33
|
+
transmission, which is a different act from writing a file you own and can read or delete.
|
|
34
|
+
|
|
35
|
+
**Three usage numbers were quietly zero and are not any more.** Two events the code declared were
|
|
36
|
+
emitted by nothing, so `themesTotal` — the number that tells an abandoned review from one worked
|
|
37
|
+
through — has been zero in every log ever written. A third read a field that does not exist, so the
|
|
38
|
+
count of pull request threads was zero on every pull request review. All three were plausible zeroes
|
|
39
|
+
rather than errors, which is why they lasted; there are now tests that read the values back.
|
|
40
|
+
|
|
41
|
+
**Deleting a review can no longer take a checkout that is in use.** Both surfaces asked whether
|
|
42
|
+
anything was running and then, with nothing holding that answer still, removed working trees. The
|
|
43
|
+
command-line one put a confirmation prompt in the gap, so the window was however long you took to
|
|
44
|
+
read it; the browser one put a recursive delete over a whole card in it. Deletion and every path
|
|
45
|
+
that starts work now take the same per-review lock, so "nothing is running" stays true for as long
|
|
46
|
+
as it is being acted on, and a job that starts a moment too late is refused with a sentence rather
|
|
47
|
+
than destroyed halfway through.
|
|
48
|
+
|
|
49
|
+
**An assistant question or an update in progress now counts as work.** Preparing the isolated
|
|
50
|
+
checkout those need registered a job and never claimed it, and the deletion guard answers from
|
|
51
|
+
claims -- so those checkouts were invisible to it always, not merely during a race. Deleting a
|
|
52
|
+
review while the assistant prepared its checkout removed the directory it was reading. It is now
|
|
53
|
+
visible, deletion refuses while it is being made, and the refusal names the branch.
|
|
54
|
+
|
|
55
|
+
**Two settings could not both survive.** Recording a usage event overwrote `config.json` rather than
|
|
56
|
+
updating it, so a machine that ran `prreviewbuddy config set agent` before it ever recorded an event
|
|
57
|
+
lost the agent on the first event, and `config get agent` then reported no default. Both settings
|
|
58
|
+
now survive each other.
|
|
59
|
+
|
|
60
|
+
**A branch review no longer claims to have read a pull request.** The progress checklist ticked
|
|
61
|
+
"Read pull request conversation" on every review, including one of a branch with no request, which
|
|
62
|
+
made an ordinary complete review look like an incomplete PR review. An optional stage that did not
|
|
63
|
+
apply is now not drawn at all, rather than drawn as done or drawn as missing: a line in a checklist
|
|
64
|
+
reads as something absent whatever words are in it. A pull request review still shows it from the
|
|
65
|
+
start, and so does a branch review that turns out to have a request, because then the step did real
|
|
66
|
+
work. Why a conversation is absent is still said once, at the end, where it is a fact about the
|
|
67
|
+
finished review rather than a gap in a list of things still happening.
|
|
68
|
+
|
|
69
|
+
**A failed sign-in says which tool and which profile, and stops there.** It used to answer an
|
|
70
|
+
expired token with five sentences: that this was `claude` and not GitHub, that re-authenticating
|
|
71
|
+
the GitHub CLI would not help, which environment variable had not been set, that a review pins the
|
|
72
|
+
environment it was created under, and that `--fresh` from another shell was an option. All true,
|
|
73
|
+
and debugging notes wearing the clothes of user guidance — one of them introducing GitHub to
|
|
74
|
+
somebody who had not been thinking about GitHub. Two facts are what a person needs at that moment,
|
|
75
|
+
so that is what it says now. The agent's own words are kept on the job record for anybody who wants
|
|
76
|
+
them.
|
|
77
|
+
|
|
78
|
+
**An old review now lists the newer ones, instead of pointing at the index.** A review that is not
|
|
79
|
+
the latest has always said so. Answering the question that raises took four steps: leave the page,
|
|
80
|
+
find the branch's card, expand its history, pick a row. The other analyses of the branch are now
|
|
81
|
+
listed in the strip itself, newest first, each with the commit it was of and the risk it found, and
|
|
82
|
+
opening one is a single click from the sentence that said it existed. The review being read is
|
|
83
|
+
marked rather than moved, so the list stays a timeline.
|
|
84
|
+
|
|
85
|
+
No review page carries another review's credential, which is the constraint the whole treatment is
|
|
86
|
+
built around: a review link is a thing people copy and it has to stay worth exactly the one review
|
|
87
|
+
it names. The rows hold identifiers, which open nothing. Turning one into a way in is done by the
|
|
88
|
+
list's own credential, the same one that already authorises pinning and deleting from the index.
|
|
89
|
+
|
|
90
|
+
**The npm page leads with what this is.** It was 149 lines of reference material with the value
|
|
91
|
+
proposition and the install in the first fifteen. The commands, base resolution, deleting and
|
|
92
|
+
uninstalling are all still there, below a screenshot and an install line, with the longest sections
|
|
93
|
+
folded away.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## 0.18.1
|
|
97
|
+
|
|
98
|
+
*The review ID, where you would look for it.*
|
|
99
|
+
|
|
100
|
+
**Every review page now offers its own ID.** The `...` menu in the workspace header copies the ID of
|
|
101
|
+
the review you are reading, which is the identifier `prreviewbuddy review --review <review>
|
|
102
|
+
--delete` takes. It was previously only on the reviews index, so the one page devoted to a single
|
|
103
|
+
review was the only place that could not tell you which review it was.
|
|
104
|
+
|
|
105
|
+
**A card that holds several reviews offers one too.** It used to offer none, on the grounds that
|
|
106
|
+
such a card stands for the branch rather than any one review. That is right about deleting and wrong
|
|
107
|
+
about copying: there is always a latest review, so there is always exactly one ID the card can mean,
|
|
108
|
+
and the item now says so. Older reviews keep their own IDs on their own rows.
|
|
109
|
+
|
|
110
|
+
**The `...` is always visible.** It was revealed on hover, copied from the pin beside it, and that
|
|
111
|
+
was fine while it was decorative. It holds copy and delete, so it is a control, and a control you
|
|
112
|
+
find by sweeping the mouse across a card is one most people never find.
|
|
113
|
+
|
|
114
|
+
|
|
3
115
|
## 0.18.0
|
|
4
116
|
|
|
5
117
|
*A pull request is compared against its own base, or not at all.*
|
package/README.md
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
# PR Review Buddy
|
|
2
2
|
|
|
3
|
-
Review a branch, or a pull request, in an isolated checkout. From
|
|
3
|
+
**Review a branch, or a pull request, in an isolated checkout. From your terminal.**
|
|
4
4
|
|
|
5
|
-
The
|
|
6
|
-
checkout is never read or written while it works and you can carry on using it. The result is a
|
|
7
|
-
local workspace you open in a browser: a suggested path through the change, findings, questions,
|
|
8
|
-
and an assistant that has read the diff.
|
|
5
|
+

|
|
9
6
|
|
|
10
7
|
## Install
|
|
11
8
|
|
|
@@ -13,7 +10,52 @@ and an assistant that has read the diff.
|
|
|
13
10
|
npm install -g prreviewbuddy
|
|
14
11
|
```
|
|
15
12
|
|
|
16
|
-
##
|
|
13
|
+
## Review something
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
prreviewbuddy review
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Run it inside the repository you want reviewed. It prints a workspace URL before the analysis
|
|
20
|
+
starts and fills in as the review is made, so you can open the link and watch it arrive.
|
|
21
|
+
|
|
22
|
+
`prreviewbuddy review --pr <url>` reviews a pull request instead, and `--branch <branch>` reviews
|
|
23
|
+
another branch without checking it out.
|
|
24
|
+
|
|
25
|
+
## What does the reviewing
|
|
26
|
+
|
|
27
|
+
A coding agent you have already installed: [Claude Code](https://claude.com/claude-code),
|
|
28
|
+
[Codex CLI](https://developers.openai.com/codex/cli) or
|
|
29
|
+
[Gemini CLI](https://github.com/google-gemini/gemini-cli). Run `prreviewbuddy agents` to see which
|
|
30
|
+
of them this machine has.
|
|
31
|
+
|
|
32
|
+
There is no account, no API key and nothing to sign up for. PR Review Buddy uses that agent's
|
|
33
|
+
existing authentication; it never sees a token and never asks you for one.
|
|
34
|
+
|
|
35
|
+
## How it works
|
|
36
|
+
|
|
37
|
+
The analysis runs in a separate process against a git worktree pinned to one commit, so your own
|
|
38
|
+
checkout is never read or written while it works and you can carry on using it. What you get back
|
|
39
|
+
is a local workspace in your browser: a suggested path through the change, findings, questions, and
|
|
40
|
+
an assistant that has read the diff. The job is durable, so closing the terminal does not stop it.
|
|
41
|
+
|
|
42
|
+
## Privacy
|
|
43
|
+
|
|
44
|
+
Your code goes to the coding agent you chose, exactly as it would if you had run that agent
|
|
45
|
+
yourself. It does not pass through us, and no server of ours is in the path of a review.
|
|
46
|
+
|
|
47
|
+
PR Review Buddy asks once, on first run, whether it may send anonymous usage counts: two event
|
|
48
|
+
names, a random ID generated on your machine, the version, the platform, the agent and a duration.
|
|
49
|
+
Never your code, diffs, file paths, repository names, prompts or review content, and never anything
|
|
50
|
+
at all unless you said yes. [The full field table is published](https://prreviewbuddy.com/privacy).
|
|
51
|
+
|
|
52
|
+
More at [prreviewbuddy.com](https://prreviewbuddy.com).
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
# Reference
|
|
57
|
+
|
|
58
|
+
## Commands
|
|
17
59
|
|
|
18
60
|
A command names what to review, and what to do to it.
|
|
19
61
|
|
|
@@ -37,6 +79,8 @@ prreviewbuddy open <review> open one review
|
|
|
37
79
|
|
|
38
80
|
prreviewbuddy agents which coding agents you have
|
|
39
81
|
prreviewbuddy config set agent <agent> remember which to use when you do not name one
|
|
82
|
+
prreviewbuddy config set telemetry-upload on|off
|
|
83
|
+
send anonymous usage counts, or stop
|
|
40
84
|
|
|
41
85
|
prreviewbuddy uninstall remove everything this put on your machine
|
|
42
86
|
```
|
|
@@ -44,45 +88,17 @@ prreviewbuddy uninstall remove everything this put on your machi
|
|
|
44
88
|
The two halves go together: `prreviewbuddy review --branch feat/foo --update` brings the review of
|
|
45
89
|
`feat/foo` up to date without checking it out.
|
|
46
90
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## Which base a review is compared against
|
|
52
|
-
|
|
53
|
-
A base named by its short name resolves to the remote copy of it, and a base named in full resolves
|
|
54
|
-
to exactly what was named.
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
--base main -> origin/main
|
|
58
|
-
--base refs/heads/main -> your own main, deliberately
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
A local branch is behind the remote from the first day nobody pulls, and it is usually an ancestor
|
|
62
|
-
of the branch under review, so git accepts it as a merge base without complaint and every upstream
|
|
63
|
-
commit you have not pulled lands in the review. There is no error, only a much larger diff and
|
|
64
|
-
findings about code the author never touched. Naming the ref in full is how you say you meant your
|
|
65
|
-
own branch.
|
|
66
|
-
|
|
67
|
-
A pull request is stricter, because its base is not something you typed. PR Review Buddy asks the
|
|
68
|
-
forge which commit the request is cut from and uses that; failing that, the remote-tracking copy of
|
|
69
|
-
the base branch; and failing both it refuses and asks you to run `git fetch`. It also checks the
|
|
70
|
-
diff it built against the number of files the forge says the request touches, and refuses if the two
|
|
71
|
-
disagree.
|
|
91
|
+
`--branch` takes a branch, local or remote, so `--branch origin/feat/foo` reviews what is on the
|
|
92
|
+
remote rather than what is in your clone. A review follows the ref it was made from and keeps
|
|
93
|
+
following it.
|
|
72
94
|
|
|
73
95
|
## What you need
|
|
74
96
|
|
|
75
97
|
- **Node 20 or newer**, and **git**.
|
|
76
|
-
- **A coding agent**, installed and signed in. It does the analysis.
|
|
77
|
-
[Claude Code](https://claude.com/claude-code), [Codex CLI](https://developers.openai.com/codex/cli)
|
|
78
|
-
or [Gemini CLI](https://github.com/google-gemini/gemini-cli). Run `prreviewbuddy agents` to see
|
|
79
|
-
which of them this machine has.
|
|
98
|
+
- **A coding agent**, installed and signed in. It does the analysis.
|
|
80
99
|
- **[GitHub CLI](https://cli.github.com/)** (`gh`), signed in, if you want the pull request
|
|
81
100
|
conversation read. Without it the review still runs, on the code alone, and says so.
|
|
82
101
|
|
|
83
|
-
There is no account and no API key. PR Review Buddy uses a coding agent installed on your machine
|
|
84
|
-
and that agent's existing authentication; it never sees a token and never asks you for one.
|
|
85
|
-
|
|
86
102
|
With more than one agent installed and none chosen, the first review asks which to use and offers
|
|
87
103
|
to remember the answer. A review keeps the agent it was made with, so a later question about it is
|
|
88
104
|
answered by whichever agent wrote it.
|
|
@@ -93,9 +109,8 @@ started with.
|
|
|
93
109
|
|
|
94
110
|
## What to expect
|
|
95
111
|
|
|
96
|
-
The
|
|
97
|
-
|
|
98
|
-
interruption carries on from the phase that stopped rather than starting over.
|
|
112
|
+
The job is durable: closing the terminal does not stop it, and running the same command again after
|
|
113
|
+
an interruption carries on from the phase that stopped rather than starting over.
|
|
99
114
|
|
|
100
115
|
Reviews are kept in `~/.prreviewbuddy` for thirty days. A local server holds them open and outlives
|
|
101
116
|
the terminal that started it, taking a new port each time it starts, so bookmark
|
|
@@ -104,7 +119,34 @@ the terminal that started it, taking a new port each time it starts, so bookmark
|
|
|
104
119
|
The isolated checkout a review was made in is kept for six hours after it finishes, because that is
|
|
105
120
|
what the assistant reads when you ask it questions, and is then removed.
|
|
106
121
|
|
|
107
|
-
|
|
122
|
+
<details>
|
|
123
|
+
<summary><b>Which base a review is compared against</b> — <code>--base main</code> means
|
|
124
|
+
<code>origin/main</code>, and why</summary>
|
|
125
|
+
|
|
126
|
+
A base named by its short name resolves to the remote copy of it, and a base named in full resolves
|
|
127
|
+
to exactly what was named.
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
--base main -> origin/main
|
|
131
|
+
--base refs/heads/main -> your own main, deliberately
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
A local branch is behind the remote from the first day nobody pulls, and it is usually an ancestor
|
|
135
|
+
of the branch under review, so git accepts it as a merge base without complaint and every upstream
|
|
136
|
+
commit you have not pulled lands in the review. There is no error, only a much larger diff and
|
|
137
|
+
findings about code the author never touched. Naming the ref in full is how you say you meant your
|
|
138
|
+
own branch.
|
|
139
|
+
|
|
140
|
+
A pull request is stricter, because its base is not something you typed. PR Review Buddy asks the
|
|
141
|
+
forge which commit the request is cut from and uses that; failing that, the remote-tracking copy of
|
|
142
|
+
the base branch; and failing both it refuses and asks you to run `git fetch`. It also checks the
|
|
143
|
+
diff it built against the number of files the forge says the request touches, and refuses if the two
|
|
144
|
+
disagree.
|
|
145
|
+
|
|
146
|
+
</details>
|
|
147
|
+
|
|
148
|
+
<details>
|
|
149
|
+
<summary><b>Deleting a review</b></summary>
|
|
108
150
|
|
|
109
151
|
```
|
|
110
152
|
prreviewbuddy review --review <review> --delete
|
|
@@ -122,6 +164,34 @@ can name several reviews once you have used `--fresh`.
|
|
|
122
164
|
You can also delete from the list in your browser: the `...` menu on a review offers **Copy review
|
|
123
165
|
ID** and **Delete review**, and the menu on a card deletes every review of that branch at once.
|
|
124
166
|
|
|
167
|
+
</details>
|
|
168
|
+
|
|
169
|
+
<details>
|
|
170
|
+
<summary><b>Anonymous usage counts</b> — what is sent, and how to stop it</summary>
|
|
171
|
+
|
|
172
|
+
Two events reach a server we run, and only if you answered yes when asked on first run:
|
|
173
|
+
`review_started` and `review_finished`. Between them they carry a random UUID generated on your
|
|
174
|
+
machine, the CLI version, the platform, which agent ran the analysis, a timestamp, whether it
|
|
175
|
+
succeeded and how long it took. That is the whole list, and the server refuses any field that is
|
|
176
|
+
not on it rather than accepting the request and dropping what it does not recognise.
|
|
177
|
+
|
|
178
|
+
Never sent: your code, diffs, prompts, questions, findings, file paths, repository or branch names,
|
|
179
|
+
or the counts of any of those. The identifier is an installation rather than a person, so a laptop,
|
|
180
|
+
a desktop and a CI machine are three, and nothing joins them up. No IP address or user agent is
|
|
181
|
+
stored against an event, and rows are deleted after 90 days.
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
prreviewbuddy config get telemetry-upload what it is doing now
|
|
185
|
+
prreviewbuddy config set telemetry-upload off
|
|
186
|
+
PRB_TELEMETRY=off turns off the local log as well
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
PR Review Buddy also keeps a fuller usage log on your own machine, at
|
|
190
|
+
`~/.prreviewbuddy/events.jsonl`. It is yours to read or delete, and only the two events above ever
|
|
191
|
+
leave the machine. [The published field table](https://prreviewbuddy.com/privacy) has the detail.
|
|
192
|
+
|
|
193
|
+
</details>
|
|
194
|
+
|
|
125
195
|
## Uninstall
|
|
126
196
|
|
|
127
197
|
```
|
|
@@ -142,7 +212,7 @@ still being made rather than refusing over it.
|
|
|
142
212
|
Removing the package itself is the second line, and it is yours to run: a command that deleted the
|
|
143
213
|
install it was running from would depend on whichever package manager put it there.
|
|
144
214
|
|
|
145
|
-
|
|
215
|
+
---
|
|
146
216
|
|
|
147
|
-
|
|
148
|
-
pull requests in the browser.
|
|
217
|
+
**Prefer reviewing in GitHub?** PR Review Buddy is also available as a Chrome extension that reviews
|
|
218
|
+
pull requests in the browser. [prreviewbuddy.com](https://prreviewbuddy.com)
|