prreviewbuddy 0.34.0 → 0.36.4

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,100 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.36.4
4
+
5
+ The search box and filters on the reviews list now sit over the list itself, sharing its column,
6
+ rather than pressed against the right edge of the window. The bar they live in spans the whole
7
+ window while the reviews below it are a centred column, so the controls used to begin past the
8
+ middle of the page with the cards they filter starting far to their left.
9
+
10
+ ## 0.36.3
11
+
12
+ **The reviews list is one click away from anywhere.** The strip at the top of every workspace page
13
+ now opens it, beside the notifications bell. Until now the only way back to the list was the rail,
14
+ which a narrow window hides, so from a review page it was the browser's Back button or nothing.
15
+
16
+ Every workspace place now has an icon up there, so the text links that used to appear in the strip
17
+ on a narrow window are gone: each of them was the same destination as the icon beside it.
18
+
19
+ ## 0.36.2
20
+
21
+ The note saying where your settings are kept now ends the settings, above the Server section rather
22
+ than below it. Between Stop server and the foot of the page it read as a footnote about the server,
23
+ which is the one thing on that page it says nothing about.
24
+
25
+ ## 0.36.1
26
+
27
+ **A status dot says whether the workspace server is there.** It sits beside the restart button:
28
+ green while the server is answering, amber while a restart is in flight, red once nothing is. It is
29
+ small on purpose — while you are reading a page, the page itself is the proof the server is up, so
30
+ the dot earns its place in the other two states.
31
+
32
+ **A restart now says it worked.** The page comes back with "Server restarted. Workspace is back
33
+ online." rather than simply blinking. There is still nothing to confirm beforehand: it is one click
34
+ when the server is idle.
35
+
36
+ If a restart does not come back, the page says so and stays saying so. It tells the two cases apart:
37
+ a restart the server refused before stopping anything leaves it running and says that, and only a
38
+ restart that actually lost the server names the command that brings it back.
39
+
40
+ ## 0.36.0
41
+
42
+ **The workspace can restart its own server.** A restart button sits in the global strip on every
43
+ page: the running server starts its replacement, hands over the port and goes, and the page reloads
44
+ itself onto the new one. It needs no terminal, and because the replacement is read from disk it is
45
+ how you pick up a new build without leaving the browser. While the server is making a review of its
46
+ own the button is disabled and says why, since that work would end with the process; a review being
47
+ made from a terminal is a different process and never stands in the way.
48
+
49
+ If the replacement cannot be started, nothing is stopped. The server refuses before it tears
50
+ anything down, keeps serving, and the page says so rather than reloading into nothing.
51
+
52
+ **Stop server has moved to Settings.** It used to sit at the foot of the rail on every page, one
53
+ press from ending every open review, next to the links you navigate with. It is the one thing the
54
+ workspace cannot undo — the page it leaves behind has no server to ask — so it now lives on the
55
+ Settings page with the sentence that matters beside it: start it again with `prreviewbuddy open`,
56
+ from any directory. The rail is navigation again, and the strip offers the recoverable action
57
+ instead.
58
+
59
+ `prreviewbuddy open` has always worked from any directory and starts the server if it is not
60
+ running; it is now tested to keep doing so. The workspace is global; only reviews belong to a
61
+ repository.
62
+
63
+ ## 0.35.0
64
+
65
+ **Notifications have a home in the top-right corner.** A bell sits in the workspace's new global
66
+ strip, on every page including a review, and shows a dot when something is waiting. It was reachable
67
+ only from the foot of the rail before, which is not where anybody looks for it. The bell opens the
68
+ Notifications page and marks nothing read: that still happens only by a deliberate act. How many are
69
+ waiting is still said in words in the rail, which is where there is room to say it; the dot is only
70
+ the news that there is something to look at.
71
+
72
+ The caret on a menu is ours now rather than the browser's. The native one sat hard against the
73
+ control's right edge in a colour used nowhere else in the product; this one is inset by the same
74
+ distance the text has on the other side, and drawn in the muted grey everything quiet here shares.
75
+
76
+ **Settings is in that strip too**, as an icon beside the bell, reachable from any page without
77
+ going to the rail for it. It still sits in the rail with its name beside it.
78
+
79
+ **The workspace has two bars instead of one.** The product's own controls and the review's identity
80
+ used to share a single header, which is why there was no room for the bell. They are separated now:
81
+ a thin strip carries the wordmark, the bell and the build, and the bar below it belongs entirely to
82
+ what you are looking at. On a review that is the branch, the size, the freshness and Mark reviewed,
83
+ exactly as before but with the product's chrome lifted out of it. On the other pages it names the
84
+ page and carries that page's own controls, which have moved up out of the column they act on rather
85
+ than being added: the reviews search and filters, the Notifications count and Mark all read, and the
86
+ way back out of Settings.
87
+
88
+ The build version now sits in the strip on every page, including a review, where it used to be at
89
+ the foot of the rail.
90
+
91
+ Two things that had never worked in a window too narrow for the rail, both found by looking at the
92
+ real thing. The workspace links meant to replace the hidden rail were never shown at all, so at that
93
+ width there was no way to Notifications, Settings or the feedback form. And the reviews list,
94
+ Notifications and Settings were squeezed into the width the rail had vacated, with the rest of the
95
+ window empty beside them: the same fault the review itself had, fixed there in 0.34.0 and missed
96
+ here.
97
+
3
98
  ## 0.34.0
4
99
 
5
100
  **The Guide shows one theme at a time.** The workspace Guide used to stack every theme in one
package/README.md CHANGED
@@ -82,6 +82,8 @@ prreviewbuddy agents which coding agents you have
82
82
  prreviewbuddy config set agent <agent> remember which to use when you do not name one
83
83
  prreviewbuddy config set telemetry-upload on|off
84
84
  send usage telemetry, or stop. On by default
85
+ prreviewbuddy config get port the port the workspace runs on
86
+ prreviewbuddy config set port <port> move it, from the next start onwards
85
87
 
86
88
  prreviewbuddy uninstall remove everything this put on your machine
87
89
  ```
@@ -113,9 +115,11 @@ started with.
113
115
  The job is durable: closing the terminal does not stop it, and running the same command again after
114
116
  an interruption carries on from the phase that stopped rather than starting over.
115
117
 
116
- Reviews are kept in `~/.prreviewbuddy` for thirty days. A local server holds them open and outlives
117
- the terminal that started it, taking a new port each time it starts, so bookmark
118
- `file://~/.prreviewbuddy/reviews.html` rather than a port number.
118
+ Reviews are kept in `~/.prreviewbuddy` for thirty days. A local server holds them open at
119
+ `http://localhost:7726` and outlives the terminal that started it, so a link to a review is worth
120
+ keeping: the address does not move, and the same link still opens after a restart. Run
121
+ `prreviewbuddy open` from any directory to get back to the list, and
122
+ `prreviewbuddy config set port <port>` if 7726 is taken on your machine.
119
123
 
120
124
  The isolated checkout a review was made in is kept for six hours after it finishes, because that is
121
125
  what the assistant reads when you ask it questions, and is then removed.
@@ -6984,7 +6984,7 @@ async function waitForPortToFree(port) {
6984
6984
  async function ensureServer() {
6985
6985
  const running = await healthyPort();
6986
6986
  if (running !== null) return running;
6987
- if (!existsSync(SERVER_ENTRY)) throw new Error(`The workspace server is not built. Expected it at ${SERVER_ENTRY}.${buildInstruction(SURFACE.client)}`);
6987
+ if (!serverEntryExists()) throw new Error(`The workspace server is not built. Expected it at ${serverEntry()}.${buildInstruction(SURFACE.client)}`);
6988
6988
  if (!acquireSpawnLock()) {
6989
6989
  const shared = await waitForHealthyServer();
6990
6990
  if (shared !== null) return shared;
@@ -7003,11 +7003,7 @@ async function ensureServer() {
7003
7003
  }
7004
7004
  if (occupant === "foreign") throw new Error(portTakenMessage(port));
7005
7005
  clearServerRecord();
7006
- spawn(process.execPath, [SERVER_ENTRY], {
7007
- detached: true,
7008
- stdio: "ignore",
7009
- cwd: STORE_ROOT
7010
- }).unref();
7006
+ spawnServer();
7011
7007
  const started = await waitForHealthyServer();
7012
7008
  if (started !== null) return started;
7013
7009
  if (await occupantOf(port) === "foreign") throw new Error(portTakenMessage(port));
@@ -7017,6 +7013,32 @@ async function ensureServer() {
7017
7013
  }
7018
7014
  }
7019
7015
  /**
7016
+ * Start a detached workspace server and let go of it.
7017
+ *
7018
+ * One function rather than one per caller: the launcher starts the first server, and a server being
7019
+ * restarted starts its own replacement, and those must be the same process in the same place with
7020
+ * the same entry — a second spawn written separately is how the two quietly drift apart.
7021
+ *
7022
+ * `serverEntry()` is read at call time rather than captured, so a restart after a rebuild picks up
7023
+ * the new file at the same path, which is the main reason anybody wants one.
7024
+ */
7025
+ function spawnServer() {
7026
+ const child = spawn(process.execPath, [serverEntry()], {
7027
+ detached: true,
7028
+ stdio: "ignore",
7029
+ cwd: STORE_ROOT
7030
+ });
7031
+ child.unref();
7032
+ return child;
7033
+ }
7034
+ /** Whether there is anything to start. The one foreseeable reason a restart cannot be attempted. */
7035
+ function serverEntryExists() {
7036
+ return existsSync(serverEntry());
7037
+ }
7038
+ function serverEntry() {
7039
+ return SERVER_ENTRY;
7040
+ }
7041
+ /**
7020
7042
  * The recorded server's port, if it is actually answering *and* is this build's.
7021
7043
  *
7022
7044
  * A server from another version is stopped rather than left alone. Two servers cannot both hold
@@ -12056,4 +12078,4 @@ function lineageIds(id) {
12056
12078
  return [.../* @__PURE__ */ new Set([id, ...lineage.map((review) => review.id)])];
12057
12079
  }
12058
12080
  //#endregion
12059
- export { feedbackUrl as $, reviewerDispositions as $t, markRead as A, loadWorkspace as At, modelHelpLines as B, workspaceRevision as Bt, recordTelemetryUploadConsent as C, isClaimed as Ct, headline as D, latestKissRun as Dt, eventName as E, indexReviewGroups as Et, EXPLAIN_SIMPLY_PROMPT as F, reviewedCommit as Ft, ensureServer as G, queueStamp as Gt, readIndexToken as H, dequeueOnComplete as Ht, ReviewBeingDeletedError as I, reviewedRepositories as It, stopServer as J, doneVerb as Jt, readServerRecord as K, readQueue as Kt, MANAGED_ROOT as L, saveWorkspace as Lt, readNotification as M, positionInLineage as Mt, unreadCount as N, previousKissResult as Nt, listNotifications as O, lineageKeyFor as Ot, withUsageRecorded as P, recentWorkspaces as Pt, PACKAGE_NAME as Q, questionsOutstanding as Qt, readMarker as R, summarise as Rt, record as S, driverGone as St, announceJob as T, groupByLineage as Tt, bootstrapUrl as U, queueAdd as Ut, relativeTime as V, workspaceStamps as Vt, clearServerRecord as W, queueRemove as Wt, writeServerRecord as X, isQuestionOutstanding as Xt, workspaceUrl as Y, isIssueOutstanding as Yt, BUILD_VERSION as Z, issuesOutstanding as Zt, startKissJob as _, AgentCancelledError as _n, PHASES as _t, wasBlocked as a, resolveAgent as an, statedWorkspacePort as at, startJob as b, purposeOf as bt, updateReview as c, readAgentPreference as cn, fillFileUrlTemplate as ct, askCheckout as d, STORE_ROOT as dn, allJobs as dt, processDiscussion as en, DEFAULT_WORKSPACE_PORT as et, UpdateAlreadyRunningError as f, AGENT_IDS as fn, endedAt as ft, recordKissRun as g, detectAgents as gn, saveJob as gt, agentEnvOf as h, agentFor as hn, loadJob as ht, liveJobsFor as i, git as in, resolveWorkspacePort as it, pruneNotifications as j, matchingWorkspaceIds as jt, markAllRead as k, lineagePosition as kt, refreshPrContext as l, writeAgentPreference as ln, checkCodeFreshness as lt, runningJobs as m, agentById as mn, isTerminal as mt, deleteReview as n, resolveTarget as nn, MIN_WORKSPACE_PORT as nt, discardJob as o, resolveModel as on, writePortPreference as ot, liveUpdateFor as p, DEFAULT_AGENT_ID as pn, fail as pt, reviewsUrl as q, writeQueue as qt, lineageIds as r, displayRef as rn, parseWorkspacePort as rt, RefreshUnavailableError as s, clearAgentPreference as sn, forgeResolver as st, deleteLineage as t, describeAuthorship as tn, MAX_WORKSPACE_PORT as tt, isUnchanged as u, CONFIG_PATH as un, checkReview as ut, reanalyseReview as v, AgentUnavailableError as vn, phasesFor as vt, telemetryUploadConsent as w, followedRefName as wt, readEvents as x, clearClaim as xt, runJob as y, progressSteps as yt, removeWorktree as z, touchWorkspace as zt };
12081
+ export { BUILD_VERSION as $, issuesOutstanding as $t, markRead as A, lineageKeyFor as At, modelHelpLines as B, summarise as Bt, recordTelemetryUploadConsent as C, clearClaim as Ct, headline as D, groupByLineage as Dt, eventName as E, followedRefName as Et, EXPLAIN_SIMPLY_PROMPT as F, previousKissResult as Ft, ensureServer as G, queueAdd as Gt, readIndexToken as H, workspaceRevision as Ht, ReviewBeingDeletedError as I, recentWorkspaces as It, serverEntryExists as J, readQueue as Jt, readServerRecord as K, queueRemove as Kt, MANAGED_ROOT as L, reviewedCommit as Lt, readNotification as M, loadWorkspace as Mt, unreadCount as N, matchingWorkspaceIds as Nt, listNotifications as O, indexReviewGroups as Ot, withUsageRecorded as P, positionInLineage as Pt, writeServerRecord as Q, isQuestionOutstanding as Qt, readMarker as R, reviewedRepositories as Rt, record as S, purposeOf as St, announceJob as T, isClaimed as Tt, bootstrapUrl as U, workspaceStamps as Ut, relativeTime as V, touchWorkspace as Vt, clearServerRecord as W, dequeueOnComplete as Wt, stopServer as X, doneVerb as Xt, spawnServer as Y, writeQueue as Yt, workspaceUrl as Z, isIssueOutstanding as Zt, startKissJob as _, agentFor as _n, loadJob as _t, wasBlocked as a, displayRef as an, parseWorkspacePort as at, startJob as b, AgentUnavailableError as bn, phasesFor as bt, updateReview as c, resolveModel as cn, writePortPreference as ct, askCheckout as d, writeAgentPreference as dn, checkCodeFreshness as dt, questionsOutstanding as en, PACKAGE_NAME as et, UpdateAlreadyRunningError as f, CONFIG_PATH as fn, checkReview as ft, recordKissRun as g, agentById as gn, isTerminal as gt, agentEnvOf as h, DEFAULT_AGENT_ID as hn, fail as ht, liveJobsFor as i, resolveTarget as in, MIN_WORKSPACE_PORT as it, pruneNotifications as j, lineagePosition as jt, markAllRead as k, latestKissRun as kt, refreshPrContext as l, clearAgentPreference as ln, forgeResolver as lt, runningJobs as m, AGENT_IDS as mn, endedAt as mt, deleteReview as n, processDiscussion as nn, DEFAULT_WORKSPACE_PORT as nt, discardJob as o, git as on, resolveWorkspacePort as ot, liveUpdateFor as p, STORE_ROOT as pn, allJobs as pt, reviewsUrl as q, queueStamp as qt, lineageIds as r, describeAuthorship as rn, MAX_WORKSPACE_PORT as rt, RefreshUnavailableError as s, resolveAgent as sn, statedWorkspacePort as st, deleteLineage as t, reviewerDispositions as tn, feedbackUrl as tt, isUnchanged as u, readAgentPreference as un, fillFileUrlTemplate as ut, reanalyseReview as v, detectAgents as vn, saveJob as vt, telemetryUploadConsent as w, driverGone as wt, readEvents as x, progressSteps as xt, runJob as y, AgentCancelledError as yn, PHASES as yt, removeWorktree as z, saveWorkspace as zt };
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { At as loadWorkspace, B as modelHelpLines, C as recordTelemetryUploadConsent, Ct as isClaimed, G as ensureServer, H as readIndexToken, It as reviewedRepositories, J as stopServer, L as MANAGED_ROOT, Lt as saveWorkspace, Mt as positionInLineage, Ot as lineageKeyFor, Pt as recentWorkspaces, Q as PACKAGE_NAME, R as readMarker, Rt as summarise, S as record$1, St as driverGone, Tt as groupByLineage, U as bootstrapUrl, V as relativeTime, Y as workspaceUrl, Z as BUILD_VERSION, _t as PHASES, a as wasBlocked, an as resolveAgent, at as statedWorkspacePort, b as startJob, bt as purposeOf, c as updateReview, cn as readAgentPreference, dn as STORE_ROOT, dt as allJobs, et as DEFAULT_WORKSPACE_PORT, f as UpdateAlreadyRunningError, fn as AGENT_IDS, g as recordKissRun, gn as detectAgents, ht as loadJob, i as liveJobsFor, in as git, jt as matchingWorkspaceIds, ln as writeAgentPreference, m as runningJobs, mn as agentById, mt as isTerminal, n as deleteReview$1, nn as resolveTarget, nt as MIN_WORKSPACE_PORT, on as resolveModel, ot as writePortPreference, p as liveUpdateFor, pn as DEFAULT_AGENT_ID, q as reviewsUrl, rn as displayRef, rt as parseWorkspacePort, st as forgeResolver, tt as MAX_WORKSPACE_PORT, un as CONFIG_PATH, ut as checkReview, v as reanalyseReview, w as telemetryUploadConsent, wt as followedRefName, xt as clearClaim, y as runJob, yt as progressSteps, z as removeWorktree } from "./delete_review-TNIFNct3.js";
2
+ import { $ as BUILD_VERSION, At as lineageKeyFor, B as modelHelpLines, Bt as summarise, C as recordTelemetryUploadConsent, Ct as clearClaim, Dt as groupByLineage, Et as followedRefName, G as ensureServer, H as readIndexToken, It as recentWorkspaces, L as MANAGED_ROOT, Mt as loadWorkspace, Nt as matchingWorkspaceIds, Pt as positionInLineage, R as readMarker, Rt as reviewedRepositories, S as record$1, St as purposeOf, Tt as isClaimed, U as bootstrapUrl, V as relativeTime, X as stopServer, Z as workspaceUrl, _t as loadJob, a as wasBlocked, an as displayRef, at as parseWorkspacePort, b as startJob, c as updateReview, cn as resolveModel, ct as writePortPreference, dn as writeAgentPreference, et as PACKAGE_NAME, f as UpdateAlreadyRunningError, fn as CONFIG_PATH, ft as checkReview, g as recordKissRun, gn as agentById, gt as isTerminal, hn as DEFAULT_AGENT_ID, i as liveJobsFor, in as resolveTarget, it as MIN_WORKSPACE_PORT, lt as forgeResolver, m as runningJobs, mn as AGENT_IDS, n as deleteReview$1, nt as DEFAULT_WORKSPACE_PORT, on as git, p as liveUpdateFor, pn as STORE_ROOT, pt as allJobs, q as reviewsUrl, rt as MAX_WORKSPACE_PORT, sn as resolveAgent, st as statedWorkspacePort, un as readAgentPreference, v as reanalyseReview, vn as detectAgents, w as telemetryUploadConsent, wt as driverGone, xt as progressSteps, y as runJob, yt as PHASES, z as removeWorktree, zt as saveWorkspace } from "./delete_review-Kup1LXD_.js";
3
3
  import { basename, dirname, join, resolve } from "node:path";
4
4
  import { spawn } from "node:child_process";
5
5
  import { existsSync, mkdirSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";