prreviewbuddy 0.18.1 → 0.19.1

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 CHANGED
@@ -1,5 +1,122 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.19.1
4
+
5
+ *An answer worth keeping can now be taken out whole.*
6
+
7
+ **Every Buddy AI answer carries a copy control.** It sits under the answer, and it copies the
8
+ Markdown the assistant actually wrote, not the text on the screen: the backticks, the fenced
9
+ blocks and the lists survive, so an answer pasted into a pull request comment arrives formatted
10
+ rather than flattened into one run of prose. The question above it does not get one, because the
11
+ question is yours and you still have it.
12
+
13
+ Per-block copy is unchanged and still there. The two answer different questions: that one lifts a
14
+ snippet out of an answer, this one lifts the answer.
15
+
16
+ If the clipboard is unavailable, the control says so and does nothing else. It deliberately does
17
+ not fall back to selecting the answer on the page and asking you to press ⌘C, because what that
18
+ would put on the clipboard is the rendered text, which is the one thing this control exists to
19
+ avoid handing you.
20
+
21
+ **The strips at the top of a review use the whole width of the page.** The notice that you are
22
+ reading an older review, the list of the other reviews of that branch, and the sentence that says
23
+ new commits have landed were each capped part-way across, so on a wide window they stopped
24
+ two-thirds of the way along a band that visibly carried on. They now run to the edge of the
25
+ section they sit in, which puts each row's `Open review` where the eye already expects it.
26
+
27
+ ## 0.19.0
28
+
29
+ *It asks before it sends anything, and the npm page stops reading like a manual.*
30
+
31
+ **PR Review Buddy now asks, once, whether it may send anonymous usage counts.** There is no default:
32
+ nothing is sent until you answer, a bare Return re-asks rather than being read as either answer, and
33
+ answering no is the end of it. If you are not at a terminal, because this is a durable job, a CI run
34
+ or a piped command, it does not ask and does not record an answer, so the same machine is asked
35
+ properly the first time somebody is there to answer.
36
+
37
+ **Two events reach us, carrying eight fields between them.** `review_started` and `review_finished`,
38
+ with a random UUID generated on your machine, the version, the platform, which agent ran the
39
+ analysis, a timestamp, whether it succeeded and how long it took. That is the whole list, and the
40
+ server refuses any field that is not on it rather than accepting the request and dropping what it
41
+ does not recognise, which is what makes [the published field
42
+ table](https://prreviewbuddy.com/privacy) a claim rather than a description.
43
+
44
+ Never sent: your code, diffs, prompts, questions, findings, file paths, repository or branch names,
45
+ or the counts of any of those. The identifier is an installation rather than a person, so a laptop,
46
+ a desktop and a CI machine are three and nothing joins them up. No IP address or user agent is
47
+ stored against an event. `prreviewbuddy config set telemetry-upload off` stops it afterwards, and
48
+ `PRB_TELEMETRY=off` stops both that and the local log.
49
+
50
+ **Rows are deleted after 90 days.** Not archived and not folded into a longer-lived aggregate:
51
+ deleted. Every question the data exists to answer is a weekly one, so thirteen weeks answers all of
52
+ them. A scheduled job in our own application does the deleting, daily, so the period holds whether
53
+ or not anybody sends another event: retention is not a side effect of somebody using the tool.
54
+
55
+ **The local usage log is unchanged.** It still records the full set of events to
56
+ `~/.prreviewbuddy/events.jsonl`, on by default and disclosed since it existed. The question is about
57
+ transmission, which is a different act from writing a file you own and can read or delete.
58
+
59
+ **Three usage numbers were quietly zero and are not any more.** Two events the code declared were
60
+ emitted by nothing, so `themesTotal` — the number that tells an abandoned review from one worked
61
+ through — has been zero in every log ever written. A third read a field that does not exist, so the
62
+ count of pull request threads was zero on every pull request review. All three were plausible zeroes
63
+ rather than errors, which is why they lasted; there are now tests that read the values back.
64
+
65
+ **Deleting a review can no longer take a checkout that is in use.** Both surfaces asked whether
66
+ anything was running and then, with nothing holding that answer still, removed working trees. The
67
+ command-line one put a confirmation prompt in the gap, so the window was however long you took to
68
+ read it; the browser one put a recursive delete over a whole card in it. Deletion and every path
69
+ that starts work now take the same per-review lock, so "nothing is running" stays true for as long
70
+ as it is being acted on, and a job that starts a moment too late is refused with a sentence rather
71
+ than destroyed halfway through.
72
+
73
+ **An assistant question or an update in progress now counts as work.** Preparing the isolated
74
+ checkout those need registered a job and never claimed it, and the deletion guard answers from
75
+ claims -- so those checkouts were invisible to it always, not merely during a race. Deleting a
76
+ review while the assistant prepared its checkout removed the directory it was reading. It is now
77
+ visible, deletion refuses while it is being made, and the refusal names the branch.
78
+
79
+ **Two settings could not both survive.** Recording a usage event overwrote `config.json` rather than
80
+ updating it, so a machine that ran `prreviewbuddy config set agent` before it ever recorded an event
81
+ lost the agent on the first event, and `config get agent` then reported no default. Both settings
82
+ now survive each other.
83
+
84
+ **A branch review no longer claims to have read a pull request.** The progress checklist ticked
85
+ "Read pull request conversation" on every review, including one of a branch with no request, which
86
+ made an ordinary complete review look like an incomplete PR review. An optional stage that did not
87
+ apply is now not drawn at all, rather than drawn as done or drawn as missing: a line in a checklist
88
+ reads as something absent whatever words are in it. A pull request review still shows it from the
89
+ start, and so does a branch review that turns out to have a request, because then the step did real
90
+ work. Why a conversation is absent is still said once, at the end, where it is a fact about the
91
+ finished review rather than a gap in a list of things still happening.
92
+
93
+ **A failed sign-in says which tool and which profile, and stops there.** It used to answer an
94
+ expired token with five sentences: that this was `claude` and not GitHub, that re-authenticating
95
+ the GitHub CLI would not help, which environment variable had not been set, that a review pins the
96
+ environment it was created under, and that `--fresh` from another shell was an option. All true,
97
+ and debugging notes wearing the clothes of user guidance — one of them introducing GitHub to
98
+ somebody who had not been thinking about GitHub. Two facts are what a person needs at that moment,
99
+ so that is what it says now. The agent's own words are kept on the job record for anybody who wants
100
+ them.
101
+
102
+ **An old review now lists the newer ones, instead of pointing at the index.** A review that is not
103
+ the latest has always said so. Answering the question that raises took four steps: leave the page,
104
+ find the branch's card, expand its history, pick a row. The other analyses of the branch are now
105
+ listed in the strip itself, newest first, each with the commit it was of and the risk it found, and
106
+ opening one is a single click from the sentence that said it existed. The review being read is
107
+ marked rather than moved, so the list stays a timeline.
108
+
109
+ No review page carries another review's credential, which is the constraint the whole treatment is
110
+ built around: a review link is a thing people copy and it has to stay worth exactly the one review
111
+ it names. The rows hold identifiers, which open nothing. Turning one into a way in is done by the
112
+ list's own credential, the same one that already authorises pinning and deleting from the index.
113
+
114
+ **The npm page leads with what this is.** It was 149 lines of reference material with the value
115
+ proposition and the install in the first fifteen. The commands, base resolution, deleting and
116
+ uninstalling are all still there, below a screenshot and an install line, with the longest sections
117
+ folded away.
118
+
119
+
3
120
  ## 0.18.1
4
121
 
5
122
  *The review ID, where you would look for it.*
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 the terminal.
3
+ **Review a branch, or a pull request, in an isolated checkout. From your terminal.**
4
4
 
5
- The analysis runs in a separate process against a git worktree pinned to one commit, so your own
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
+ ![The review workspace: a suggested path through the change, its findings and its questions](https://prreviewbuddy.com/npm/workspace.png)
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
- ## Use
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
- Run it from inside the repository you want reviewed. `--branch` takes a branch, local or remote, so
48
- `--branch origin/feat/foo` reviews what is on the remote rather than what is in your clone. A review
49
- follows the ref it was made from and keeps following it.
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. Any one of
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 workspace URL is printed before the analysis starts and fills in as the review is made. The job
97
- is durable: closing the terminal does not stop it, and running the same command again after an
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
- ## Deleting a review
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
- ## Also available
215
+ ---
146
216
 
147
- As a [Claude Code](https://claude.com/claude-code) plugin, and as a Chrome extension that reviews
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)