prreviewbuddy 0.55.10 → 0.57.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 CHANGED
@@ -1,5 +1,84 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.57.0
4
+
5
+ **Reviews you marked reviewed now find out when their pull request merges.** Until now the
6
+ workspace server only checked the pull requests of reviews that were queued, saved, Waiting, Done or
7
+ not yet marked reviewed. A review you finished while its pull request was still open stopped being
8
+ checked, so if the pull request merged later, its card kept saying nothing. The server now keeps
9
+ checking those in the background too, for whether each pull request is open, closed or merged and
10
+ nothing else. The checks run every hour and take a limited number of pull requests each time, so
11
+ with many reviews, or a pull request GitHub keeps failing to answer for, it can take a few hours to
12
+ come round to a particular one. A card that had already missed a merge picks it up the same way, and
13
+ shows **Merged** with the time it was found, so it may read "Merged just now" for a pull request that
14
+ merged days ago. A merged pull request is never checked again. One closed without merging keeps
15
+ being checked, since it can be reopened. These background checks never send a notification, and
16
+ never take a turn from the checks of reviews you are still working on.
17
+
18
+ **Check for updates asks GitHub too.** Pressing **Check for updates** on a review page now also asks
19
+ GitHub whether its pull request is open, closed or merged, and the label beside the pull request
20
+ number updates at once. It does not wait for any background check that happens to be running. It works on any review, including one marked **Done**, and leaves the review
21
+ where it is: still Done, not queued, not checked any more often than before. The checks the page makes
22
+ by itself, every minute and when you come back to the tab, still never contact GitHub.
23
+
24
+ **A deleted checkout no longer stops other pull requests being checked.** If a review's folder had
25
+ been moved or deleted, the server took the failure to mean the GitHub CLI was missing, and skipped
26
+ every other pull request on GitHub for the rest of that check. Now only that one review's check
27
+ fails, and everything else is checked as normal.
28
+
29
+ **Done reviews no longer notify when their pull request merges or closes.** A Done review is still
30
+ checked, so its card still says **Changed since done** after a push, a merge, a close or a reopen, and
31
+ a push still sends **PR updated**. A merge, close or reopen is now recorded without a **PR merged** or
32
+ **PR closed** notification. Reviews that are not Done notify as before.
33
+
34
+ ## 0.56.0
35
+
36
+ **Work in one focused tab, with Back and Forward that know where you were.** The workspace now has
37
+ Back and Forward buttons at the start of the top bar, before Reviews. They move through this tab's
38
+ workspace history: from the Reviews list into a review, between Overview, themes, Issues,
39
+ Questions, Files, PR context, Diagrams and KISS, and back out again. The browser's own Back and
40
+ Forward buttons, mouse buttons and shortcuts use the same history, and so do **⌘[** and **⌘]** on a
41
+ Mac (**Ctrl+[** and **Ctrl+]** elsewhere). The shortcuts do nothing while you are typing in a field
42
+ or a dialog is open. The workspace's Back is disabled on the first workspace page in a tab, so it
43
+ never takes you to a site you came from; the browser's Back still does.
44
+
45
+ **Coming back puts every page as you left it.** Back to the Reviews list restores the search,
46
+ filters, rows you loaded with Load more, opened history rows, scroll position and the review you
47
+ had selected. Back to a review restores its section or theme, exactly the files that were open, each
48
+ where you were reading it (the change you stepped to, how far Show more had gone, Expand, and the
49
+ line at the top), the document and sidebar scroll, whether Buddy AI was open and where in its conversation,
50
+ the folded parts of the sidebar, and keyboard focus. If something changed while you were away, for
51
+ example a finding is gone after an update or a file is shorter, you land on the closest thing that
52
+ is still there. Open files and scrolling are part of a page, not steps of their own, so one Back
53
+ always goes to the previous page. A reload keeps all of this too, and so does going back an instant
54
+ after scrolling. Pressing Back and Forward faster than a file can load ends on the page you stopped
55
+ at, with that page's files, never with an earlier page's.
56
+
57
+ **An unsent Buddy AI question survives.** A question you have started typing is kept per tab while
58
+ you move around, through a refresh, and through the reloads a review does to itself when an
59
+ analysis or update lands. While an earlier question is still being answered you can write the next
60
+ one, and it is kept even if you leave and come back: it waits in the box, never sent by itself, and
61
+ Ask is there once the answer arrives. Enter does nothing until then, so typing can never stop the
62
+ running answer. A question that did not go, because you stopped it, the server could not be
63
+ reached, or another page of the review was already asking, goes back into the box. Text you wrote
64
+ is cleared only when it is sent or when you delete it.
65
+
66
+ **New tabs still work as links do.** The sidebar's views and themes are now real links, so
67
+ Cmd-click, Ctrl-click, middle-click and the browser's "Open link in new tab" open them in a tab of
68
+ their own, for comparing side by side. Each new tab starts its own history.
69
+
70
+ **Search and filters no longer add history steps.** Changing the search, the status, author or PR
71
+ filter on the Reviews list updates its address in place, so Back from a review returns to the list
72
+ as you filtered it rather than stepping back through each filter. Bookmarked list addresses open
73
+ exactly as before.
74
+
75
+ At phone width the version number in the top bar gives way to Back and Forward; it is now also at
76
+ the foot of Help.
77
+
78
+ Tested in current Chromium, Firefox and WebKit (Safari's engine), each with and without the
79
+ browser's Navigation API. Safari itself and earlier major versions have not been run, so support
80
+ there is provisional.
81
+
3
82
  ## 0.55.10
4
83
 
5
84
  **Complexity worth keeping loses its side rules.** In a KISS review, each item in the list had a
@@ -6471,8 +6471,17 @@ function authStatusArgs(host) {
6471
6471
  *
6472
6472
  * `host` defaults for the one caller that has no repository in hand yet. Both callers that are
6473
6473
  * about to make a real request pass the host they are about to make it against.
6474
+ *
6475
+ * **A directory that is not there is not a missing `gh`, and is thrown rather than answered.** Node
6476
+ * reports a spawn into a missing `cwd` as `ENOENT`, exactly as it reports a missing executable, so
6477
+ * without this check a review whose checkout had been deleted read as "`gh` is not installed". The
6478
+ * watcher takes that verdict as true of every request reached the same way, and one stale checkout
6479
+ * then silenced every other check for the rest of the pass. Neither verdict this function returns is
6480
+ * about one directory, so it says neither: the caller gets a failure that belongs to the one
6481
+ * review whose checkout it is.
6474
6482
  */
6475
6483
  async function ghAvailable(cwd, env, host = "github.com") {
6484
+ if (!existsSync(cwd)) throw new GhError(`The checkout at ${cwd} no longer exists.`);
6476
6485
  try {
6477
6486
  await run(["--version"], cwd, env);
6478
6487
  } catch {
@@ -6947,7 +6956,15 @@ function readHeadSha(raw) {
6947
6956
  };
6948
6957
  }
6949
6958
  async function headOf(repo, number, env, cwd) {
6950
- const availability = await ghAvailable(cwd, env, repo.host);
6959
+ let availability;
6960
+ try {
6961
+ availability = await ghAvailable(cwd, env, repo.host);
6962
+ } catch (error) {
6963
+ return {
6964
+ kind: "failed",
6965
+ detail: error.message
6966
+ };
6967
+ }
6951
6968
  if (!availability.ok) return {
6952
6969
  kind: availability.kind,
6953
6970
  cli: availability.cli
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $n as resolveAgent, $t as driverGone, At as statedWorkspacePort, Ct as PACKAGE_NAME, Dt as MIN_WORKSPACE_PORT, E as telemetryUploadConsent, Et as MAX_WORKSPACE_PORT, Gt as loadJob, Jn as kissOutcome, Nt as forgeResolver, Ot as parseWorkspacePort, Qn as git, Qt as clearClaim, Rt as checkReview, S as startJob, St as BUILD_VERSION, T as recordTelemetryUploadConsent, Tt as DEFAULT_WORKSPACE_PORT, Vt as allJobs, Wt as isTerminal, Xn as displayRef, Xt as progressSteps, Yn as resolveTarget, Zt as purposeOf, _n as recentWorkspaces, a as wasBlocked, ar as STORE_ROOT, at as modelHelpLines, b as reanalyseReview, bn as summarise, bt as workspaceUrl, cr as agentById, dn as loadWorkspace, dt as readIndexToken, en as isClaimed, er as resolveModel, fn as matchingWorkspaceIds, ft as bootstrapUrl, g as runningJobs, gt as reviewsUrl, h as liveUpdateFor, i as liveJobsFor, ir as CONFIG_PATH, it as removeWorktree, jt as writePortPreference, l as mergeUpdateInto, ln as lineageKeyFor, lt as queueForReview, m as UpdateAlreadyRunningError, mn as positionInLineage, mt as ensureServer, n as deleteReview$1, nn as followedRefName, nr as readAgentPreference, nt as MANAGED_ROOT, or as AGENT_IDS, ot as relativeTime, pn as mutateWorkspace, qn as WITHHELD_REASON, qt as PHASES, rn as groupByLineage, rr as writeAgentPreference, rt as readMarker, sr as DEFAULT_AGENT_ID, u as updateReview, ur as detectAgents, v as recordKissRun, w as record$1, x as runJob, yn as reviewedRepositories, yt as stopServer } from "./delete_review-C5bz0Pts.js";
2
+ import { $n as resolveAgent, $t as driverGone, At as statedWorkspacePort, Ct as PACKAGE_NAME, Dt as MIN_WORKSPACE_PORT, E as telemetryUploadConsent, Et as MAX_WORKSPACE_PORT, Gt as loadJob, Jn as kissOutcome, Nt as forgeResolver, Ot as parseWorkspacePort, Qn as git, Qt as clearClaim, Rt as checkReview, S as startJob, St as BUILD_VERSION, T as recordTelemetryUploadConsent, Tt as DEFAULT_WORKSPACE_PORT, Vt as allJobs, Wt as isTerminal, Xn as displayRef, Xt as progressSteps, Yn as resolveTarget, Zt as purposeOf, _n as recentWorkspaces, a as wasBlocked, ar as STORE_ROOT, at as modelHelpLines, b as reanalyseReview, bn as summarise, bt as workspaceUrl, cr as agentById, dn as loadWorkspace, dt as readIndexToken, en as isClaimed, er as resolveModel, fn as matchingWorkspaceIds, ft as bootstrapUrl, g as runningJobs, gt as reviewsUrl, h as liveUpdateFor, i as liveJobsFor, ir as CONFIG_PATH, it as removeWorktree, jt as writePortPreference, l as mergeUpdateInto, ln as lineageKeyFor, lt as queueForReview, m as UpdateAlreadyRunningError, mn as positionInLineage, mt as ensureServer, n as deleteReview$1, nn as followedRefName, nr as readAgentPreference, nt as MANAGED_ROOT, or as AGENT_IDS, ot as relativeTime, pn as mutateWorkspace, qn as WITHHELD_REASON, qt as PHASES, rn as groupByLineage, rr as writeAgentPreference, rt as readMarker, sr as DEFAULT_AGENT_ID, u as updateReview, ur as detectAgents, v as recordKissRun, w as record$1, x as runJob, yn as reviewedRepositories, yt as stopServer } from "./delete_review-B3VPeozh.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";