prreviewbuddy 0.73.0 → 0.73.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 +13 -0
- package/dist/{delete_review-CqnTq6yF.js → delete_review-B0f6rmy_.js} +38 -6
- package/dist/main.js +1 -1
- package/dist/server.js +32 -22
- package/package.json +1 -1
- package/static/shell.css +23 -12
- package/static/workspace.js +81 -81
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.73.1
|
|
4
|
+
|
|
5
|
+
**A review's first update says how long updates take.** While an update runs, the page now
|
|
6
|
+
compares it with this review's earlier updates, and on its first update with other updates in the
|
|
7
|
+
same repository: "Previous update took 51s", "Updates to this review usually take about 1 minute",
|
|
8
|
+
or "Updates in this repository usually take about 1 minute". An update is never compared with a
|
|
9
|
+
fresh review, which does much more work. With no finished update in the repository, nothing is
|
|
10
|
+
said.
|
|
11
|
+
|
|
12
|
+
**The running time is the footer of the progress page.** Under the steps, the running time counts
|
|
13
|
+
to the second ("Running for 1m 08s"), with how long earlier runs took beneath it and Cancel beside
|
|
14
|
+
them as a proper button. The same footer appears while a review runs and while an update runs.
|
|
15
|
+
|
|
3
16
|
## 0.73.0
|
|
4
17
|
|
|
5
18
|
**KISS runs now count as reviews in usage telemetry.** With telemetry on, a KISS run sends the same
|
|
@@ -12869,13 +12869,28 @@ var RUNTIME_WORDS = {
|
|
|
12869
12869
|
last: "Last analysis of this review",
|
|
12870
12870
|
recent: "Recent analyses of this review",
|
|
12871
12871
|
usual: "Usually takes"
|
|
12872
|
-
},
|
|
12873
|
-
update: {
|
|
12874
|
-
last: "Last update of this review",
|
|
12875
|
-
recent: "Recent updates of this review",
|
|
12876
|
-
usual: "Usually takes"
|
|
12877
12872
|
}
|
|
12878
12873
|
};
|
|
12874
|
+
/**
|
|
12875
|
+
* How long earlier updates took, said from the most specific history there is: this review's own
|
|
12876
|
+
* updates, else the repository's, else nothing. Never both, and never a fresh review's runtime,
|
|
12877
|
+
* which is a different operation. The rule above holds at both levels: one run is stated exactly
|
|
12878
|
+
* and only several earn "usually". Several are always one figure, the median, never a range.
|
|
12879
|
+
*/
|
|
12880
|
+
function describeUpdateRuntimes(own, repository) {
|
|
12881
|
+
const [ownRuns, repoRuns] = [own.slice(0, 3), repository.slice(0, 3)];
|
|
12882
|
+
if (ownRuns.length === 1) return `Previous update took ${formatDuration(ownRuns[0])}`;
|
|
12883
|
+
if (ownRuns.length > 1) return `Updates to this review usually take ${aboutMinutes(median(ownRuns))}`;
|
|
12884
|
+
if (repoRuns.length === 1) return `Last update in this repository took ${formatDuration(repoRuns[0])}`;
|
|
12885
|
+
if (repoRuns.length > 1) return `Updates in this repository usually take ${aboutMinutes(median(repoRuns))}`;
|
|
12886
|
+
return null;
|
|
12887
|
+
}
|
|
12888
|
+
/** "less than a minute", "about 1 minute", "about 4 minutes". */
|
|
12889
|
+
function aboutMinutes(ms) {
|
|
12890
|
+
const minutes = toMinutes(ms);
|
|
12891
|
+
if (minutes === 0) return "less than a minute";
|
|
12892
|
+
return `about ${minutes} ${minutes === 1 ? "minute" : "minutes"}`;
|
|
12893
|
+
}
|
|
12879
12894
|
//#endregion
|
|
12880
12895
|
//#region ../../packages/review-harness/src/runtime/store.ts
|
|
12881
12896
|
var VERSION = 1;
|
|
@@ -12982,6 +12997,18 @@ function updateRuntimes(repoPath, reviewId) {
|
|
|
12982
12997
|
reviewType: "standard"
|
|
12983
12998
|
});
|
|
12984
12999
|
}
|
|
13000
|
+
/**
|
|
13001
|
+
* Updates of any review in the repository, for a review's first update. No subject for the reason
|
|
13002
|
+
* `newReviewRuntimes` has none: a review not yet updated has no updates of its own. Still only
|
|
13003
|
+
* updates, because a fresh review of the same change is a different operation and much slower.
|
|
13004
|
+
*/
|
|
13005
|
+
function repoUpdateRuntimes(repoPath) {
|
|
13006
|
+
return durationsOf({
|
|
13007
|
+
operations: ["update"],
|
|
13008
|
+
repoPath,
|
|
13009
|
+
reviewType: "standard"
|
|
13010
|
+
});
|
|
13011
|
+
}
|
|
12985
13012
|
//#endregion
|
|
12986
13013
|
//#region ../../packages/review-harness/src/workspace/runtime_history.ts
|
|
12987
13014
|
/**
|
|
@@ -13015,10 +13042,15 @@ function analysisHistory(workspace, job) {
|
|
|
13015
13042
|
function waitingHistory(workspace, runs) {
|
|
13016
13043
|
return {
|
|
13017
13044
|
job: isLiveJob(runs.job) ? analysisHistory(workspace, runs.job) : null,
|
|
13018
|
-
update: isLiveJob(runs.updateJob) ?
|
|
13045
|
+
update: isLiveJob(runs.updateJob) ? updateHistory(workspace) : null,
|
|
13019
13046
|
kiss: isLiveJob(runs.kissJob) ? analysisHistory(workspace, runs.kissJob) : null
|
|
13020
13047
|
};
|
|
13021
13048
|
}
|
|
13049
|
+
/** This review's own updates first; the repository's only for a review never updated before. */
|
|
13050
|
+
function updateHistory(workspace) {
|
|
13051
|
+
const own = updateRuntimes(workspace.repoPath, workspace.id);
|
|
13052
|
+
return describeUpdateRuntimes(own, own.length > 0 ? [] : repoUpdateRuntimes(workspace.repoPath));
|
|
13053
|
+
}
|
|
13022
13054
|
//#endregion
|
|
13023
13055
|
//#region ../../packages/review-harness/src/domain/feedback/feedback_url.ts
|
|
13024
13056
|
/** How each client names itself in the prefilled message, which is the half a screenshot carries. */
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as MAX_WORKSPACE_PORT, A as relativeTime, B as readIndexToken, Dn as MANAGED_ROOT, F as runBatch, Fn as describeSubject, G as reviewsUrl, Gn as loadJob, In as findExistingReview, Mn as removeWorktree, Pn as describeMovement, Q as DEFAULT_WORKSPACE_PORT, Qn as clearClaim, Qr as resolveTarget, R as queueForReview, Tn as modelHelpLines, U as ensureServer, V as bootstrapUrl, Vn as allJobs, X as workspaceUrl, Xn as progressSteps, Xr as WITHHELD_REASON, Y as stopServer, Zn as purposeOf, Zr as kissOutcome, _ as liveUpdateFor, _r as reviewedRepositories, _t as telemetryUploadConsent, a as wasBlocked, b as recordKissRun, bn as forgeResolver, bt as PACKAGE_NAME, ci as CONFIG_PATH, ct as reanalyseReview, d as mergeUpdateInto, di as agentById, dr as mutateWorkspace, dt as append, et as MIN_WORKSPACE_PORT, f as updateReview, fr as positionInLineage, g as UpdateAlreadyRunningError, gt as recordTelemetryUploadConsent, hr as recentWorkspaces, ht as deliver, i as liveJobsFor, ii as resolveModel, it as writePortPreference, j as batchIdentity, jn as readMarker, li as STORE_ROOT, lr as loadWorkspace, mt as stamp, n as deleteReview$1, ni as git, oi as readAgentPreference, ot as prepareReview, pi as detectAgents, pt as record$1, qn as PHASES, ri as resolveAgent, rt as statedWorkspacePort, si as writeAgentPreference, st as settleReview, tr as followedRefName, tt as parseWorkspacePort, ui as AGENT_IDS, ur as matchingWorkspaceIds, ut as startJob, v as runningJobs, vr as summarise, vt as telemetryUploadEnabled, yt as BUILD_VERSION } from "./delete_review-
|
|
2
|
+
import { $ as MAX_WORKSPACE_PORT, A as relativeTime, B as readIndexToken, Dn as MANAGED_ROOT, F as runBatch, Fn as describeSubject, G as reviewsUrl, Gn as loadJob, In as findExistingReview, Mn as removeWorktree, Pn as describeMovement, Q as DEFAULT_WORKSPACE_PORT, Qn as clearClaim, Qr as resolveTarget, R as queueForReview, Tn as modelHelpLines, U as ensureServer, V as bootstrapUrl, Vn as allJobs, X as workspaceUrl, Xn as progressSteps, Xr as WITHHELD_REASON, Y as stopServer, Zn as purposeOf, Zr as kissOutcome, _ as liveUpdateFor, _r as reviewedRepositories, _t as telemetryUploadConsent, a as wasBlocked, b as recordKissRun, bn as forgeResolver, bt as PACKAGE_NAME, ci as CONFIG_PATH, ct as reanalyseReview, d as mergeUpdateInto, di as agentById, dr as mutateWorkspace, dt as append, et as MIN_WORKSPACE_PORT, f as updateReview, fr as positionInLineage, g as UpdateAlreadyRunningError, gt as recordTelemetryUploadConsent, hr as recentWorkspaces, ht as deliver, i as liveJobsFor, ii as resolveModel, it as writePortPreference, j as batchIdentity, jn as readMarker, li as STORE_ROOT, lr as loadWorkspace, mt as stamp, n as deleteReview$1, ni as git, oi as readAgentPreference, ot as prepareReview, pi as detectAgents, pt as record$1, qn as PHASES, ri as resolveAgent, rt as statedWorkspacePort, si as writeAgentPreference, st as settleReview, tr as followedRefName, tt as parseWorkspacePort, ui as AGENT_IDS, ur as matchingWorkspaceIds, ut as startJob, v as runningJobs, vr as summarise, vt as telemetryUploadEnabled, yt as BUILD_VERSION } from "./delete_review-B0f6rmy_.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";
|
package/dist/server.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as MAX_WORKSPACE_PORT, $n as isClaimed, $r as DetachedHeadError, $t as markReadForReview, A as relativeTime$1, An as isWorktreeHeld, Ar as parseLifecycle, At as partFiles, B as readIndexToken, Bn as reviewedShaOf, Br as issuesOutstanding, Bt as isArchitectureId, C as track, Cn as originRemote, Cr as activityAttributes, Ct as mapRuntimes, D as endRun, Dn as MANAGED_ROOT, Dr as lifecycleItemLabel, Dt as ARCHITECTURE_DIR, E as completeRun, En as ReviewBeingDeletedError, Er as lifecycleChip, Et as describeRuntimes, F as runBatch, Fr as queueStamp, Ft as trackedFiles, Gn as loadJob, Gr as explanationActionOf, Gt as createArchitectureNotification, H as clearServerRecordOwnedBy, Hn as endedAt, Hr as reviewerDispositions, Ht as announceJob, I as activateQueued, In as findExistingReview, Ir as readQueue, It as ownersOf, J as stopChild, Jn as isLiveJob, Jr as withExplanation, Jt as eventName, K as serverEntryExists, Kn as saveJob, Kr as explanationOf, Kt as createPrState, L as compactQueue, Ln as checkCodeFreshness, Lr as doneVerb, Lt as QUOTE_LIMITS, M as extractPullRequestLinks, Mn as removeWorktree, Mr as queueAdd, Mt as repositoryKey, N as parsePullRequestLink, Nn as requestJobStop, Nr as queueAddMany, Nt as storeArchitecture, O as reportRun, On as createWorktree, Or as lifecyclePill, Ot as checkArchitecture, P as unsupportedReason, Pr as queueRemove, Pt as storedScopes, Q as DEFAULT_WORKSPACE_PORT, Qr as resolveTarget, Qt as markRead, Rn as checkReview, Rr as isIssueOutstanding, Rt as REPOSITORY_SCOPE, S as isDriving, Sn as remoteHost, Sr as LIFECYCLES, St as waitingHistory, T as beginRun, Tr as isLifecycle, Tt as RUNTIME_WORDS, Un as fail, Ur as processDiscussion, Ut as branchOf, Vn as allJobs, Vr as questionsOutstanding, Vt as writeJsonAtomically, W as readServerRecord, Wn as isTerminal, Wr as recommendationsOf, Wt as subjectOf, Xn as progressSteps, Xr as WITHHELD_REASON, Xt as listNotifications, Yn as phasesFor, Yr as describeAuthorship, Yt as headline, Z as writeServerRecord, Zn as purposeOf, Zr as kissOutcome, Zt as markAllRead, _ as liveUpdateFor, _n as extractJsonText, _t as telemetryUploadConsent, a as wasBlocked, ai as clearAgentPreference, an as withUsageRecorded, ar as kissDecisionRefusal, at as failureOf$1, bn as forgeResolver, br as workspaceRevision, c as RefreshUnavailableError, cn as authorPreview, cr as lineagePosition, ct as reanalyseReview, d as mergeUpdateInto, di as agentById, dn as renderMarkdown, dr as mutateWorkspace, ei as isCommitReview, en as pruneNotifications, er as decideKissRecommendation, et as MIN_WORKSPACE_PORT, f as updateReview, fi as agentFor$1, fn as CODE_BLOCK_CLASS, ft as readEvents, g as UpdateAlreadyRunningError, gn as asString, gr as reviewedCommit, gt as recordTelemetryUploadConsent, h as askCheckout, hi as AgentUnavailableError, hn as renderInlineText, hr as recentWorkspaces, i as liveJobsFor, ii as resolveModel, in as unreadCount$1, ir as indexReviewGroups, it as writePortPreference, j as batchIdentity, jn as readMarker, jr as sectionOf, jt as readArchitecture, k as stopRun, kn as holdWorktree, kr as offersLifecycle, kt as loadArchitecture, l as cancelUpdate, li as STORE_ROOT, ln as hasAuthorContent, lr as loadWorkspace, lt as runJob, m as isUnchanged, mi as AgentCancelledError, mn as escapeHtml$1, mr as previousKissResult, n as deleteReview, ni as git, nn as removeNotification, nr as groupByLineage, nt as resolveWorkspacePort, o as discardJob, oi as readAgentPreference, on as EXPLAIN_SIMPLY_PROMPT, or as kissDecisionsOf, ot as prepareReview, p as refreshPrContext, pi as detectAgents, pn as CODE_COPY_CLASS, pr as presentedKissRunOf, pt as record, q as spawnServer, qr as isExplanationAction, qt as createPrUpdate, r as lineageIds, ri as resolveAgent, rn as toneOf, rr as indexKeptIds, rt as statedWorkspacePort, s as FETCH_TIMEOUT_MS, si as writeAgentPreference, sn as UNESTABLISHED_MOTIVATION, sr as latestKissRun, st as settleReview, t as deleteLineage, ti as resolveBase, tn as readNotification, tr as followedRefName, tt as parseWorkspacePort, u as cancellableHere, ui as AGENT_IDS, un as GITHUB_MARKDOWN, vn as objectWithAnyOf, w as RUN_KINDS, wn as fillFileUrlTemplate, wr as activityLabel, wt as recordRuntimeBestEffort, x as startKissJob, xn as forgeFor, xr as workspaceStamps, xt as feedbackUrl, y as agentEnvOf, yn as claimRequestUrl, yr as touchWorkspace, yt as BUILD_VERSION, z as settleQueue, zn as followedBranch, zr as isQuestionOutstanding, zt as ancestorsOf } from "./delete_review-
|
|
1
|
+
import { $ as MAX_WORKSPACE_PORT, $n as isClaimed, $r as DetachedHeadError, $t as markReadForReview, A as relativeTime$1, An as isWorktreeHeld, Ar as parseLifecycle, At as partFiles, B as readIndexToken, Bn as reviewedShaOf, Br as issuesOutstanding, Bt as isArchitectureId, C as track, Cn as originRemote, Cr as activityAttributes, Ct as mapRuntimes, D as endRun, Dn as MANAGED_ROOT, Dr as lifecycleItemLabel, Dt as ARCHITECTURE_DIR, E as completeRun, En as ReviewBeingDeletedError, Er as lifecycleChip, Et as describeRuntimes, F as runBatch, Fr as queueStamp, Ft as trackedFiles, Gn as loadJob, Gr as explanationActionOf, Gt as createArchitectureNotification, H as clearServerRecordOwnedBy, Hn as endedAt, Hr as reviewerDispositions, Ht as announceJob, I as activateQueued, In as findExistingReview, Ir as readQueue, It as ownersOf, J as stopChild, Jn as isLiveJob, Jr as withExplanation, Jt as eventName, K as serverEntryExists, Kn as saveJob, Kr as explanationOf, Kt as createPrState, L as compactQueue, Ln as checkCodeFreshness, Lr as doneVerb, Lt as QUOTE_LIMITS, M as extractPullRequestLinks, Mn as removeWorktree, Mr as queueAdd, Mt as repositoryKey, N as parsePullRequestLink, Nn as requestJobStop, Nr as queueAddMany, Nt as storeArchitecture, O as reportRun, On as createWorktree, Or as lifecyclePill, Ot as checkArchitecture, P as unsupportedReason, Pr as queueRemove, Pt as storedScopes, Q as DEFAULT_WORKSPACE_PORT, Qr as resolveTarget, Qt as markRead, Rn as checkReview, Rr as isIssueOutstanding, Rt as REPOSITORY_SCOPE, S as isDriving, Sn as remoteHost, Sr as LIFECYCLES, St as waitingHistory, T as beginRun, Tr as isLifecycle, Tt as RUNTIME_WORDS, Un as fail, Ur as processDiscussion, Ut as branchOf, Vn as allJobs, Vr as questionsOutstanding, Vt as writeJsonAtomically, W as readServerRecord, Wn as isTerminal, Wr as recommendationsOf, Wt as subjectOf, Xn as progressSteps, Xr as WITHHELD_REASON, Xt as listNotifications, Yn as phasesFor, Yr as describeAuthorship, Yt as headline, Z as writeServerRecord, Zn as purposeOf, Zr as kissOutcome, Zt as markAllRead, _ as liveUpdateFor, _n as extractJsonText, _t as telemetryUploadConsent, a as wasBlocked, ai as clearAgentPreference, an as withUsageRecorded, ar as kissDecisionRefusal, at as failureOf$1, bn as forgeResolver, br as workspaceRevision, c as RefreshUnavailableError, cn as authorPreview, cr as lineagePosition, ct as reanalyseReview, d as mergeUpdateInto, di as agentById, dn as renderMarkdown, dr as mutateWorkspace, ei as isCommitReview, en as pruneNotifications, er as decideKissRecommendation, et as MIN_WORKSPACE_PORT, f as updateReview, fi as agentFor$1, fn as CODE_BLOCK_CLASS, ft as readEvents, g as UpdateAlreadyRunningError, gn as asString, gr as reviewedCommit, gt as recordTelemetryUploadConsent, h as askCheckout, hi as AgentUnavailableError, hn as renderInlineText, hr as recentWorkspaces, i as liveJobsFor, ii as resolveModel, in as unreadCount$1, ir as indexReviewGroups, it as writePortPreference, j as batchIdentity, jn as readMarker, jr as sectionOf, jt as readArchitecture, k as stopRun, kn as holdWorktree, kr as offersLifecycle, kt as loadArchitecture, l as cancelUpdate, li as STORE_ROOT, ln as hasAuthorContent, lr as loadWorkspace, lt as runJob, m as isUnchanged, mi as AgentCancelledError, mn as escapeHtml$1, mr as previousKissResult, n as deleteReview, ni as git, nn as removeNotification, nr as groupByLineage, nt as resolveWorkspacePort, o as discardJob, oi as readAgentPreference, on as EXPLAIN_SIMPLY_PROMPT, or as kissDecisionsOf, ot as prepareReview, p as refreshPrContext, pi as detectAgents, pn as CODE_COPY_CLASS, pr as presentedKissRunOf, pt as record, q as spawnServer, qr as isExplanationAction, qt as createPrUpdate, r as lineageIds, ri as resolveAgent, rn as toneOf, rr as indexKeptIds, rt as statedWorkspacePort, s as FETCH_TIMEOUT_MS, si as writeAgentPreference, sn as UNESTABLISHED_MOTIVATION, sr as latestKissRun, st as settleReview, t as deleteLineage, ti as resolveBase, tn as readNotification, tr as followedRefName, tt as parseWorkspacePort, u as cancellableHere, ui as AGENT_IDS, un as GITHUB_MARKDOWN, vn as objectWithAnyOf, w as RUN_KINDS, wn as fillFileUrlTemplate, wr as activityLabel, wt as recordRuntimeBestEffort, x as startKissJob, xn as forgeFor, xr as workspaceStamps, xt as feedbackUrl, y as agentEnvOf, yn as claimRequestUrl, yr as touchWorkspace, yt as BUILD_VERSION, z as settleQueue, zn as followedBranch, zr as isQuestionOutstanding, zt as ancestorsOf } from "./delete_review-B0f6rmy_.js";
|
|
2
2
|
import { basename, isAbsolute, join, relative, resolve } from "node:path";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -5432,20 +5432,6 @@ function conversationNote(report, actions) {
|
|
|
5432
5432
|
* not exist in any form until the agent has finished reasoning, and drawing their outlines would
|
|
5433
5433
|
* promise a shape nobody has produced.
|
|
5434
5434
|
*/
|
|
5435
|
-
/**
|
|
5436
|
-
* How long this has been going, to the second.
|
|
5437
|
-
*
|
|
5438
|
-
* Seconds rather than the strip's rounded minutes, and that is the whole point of a separate
|
|
5439
|
-
* helper: "Running for under a minute" does not change for a full minute, so the one number on
|
|
5440
|
-
* screen that could show the run is alive sits perfectly still during the wait most likely to be
|
|
5441
|
-
* mistaken for a hang. Past a minute the seconds stop earning their precision and it rounds.
|
|
5442
|
-
*/
|
|
5443
|
-
function elapsedWords(startedAt, now = Date.now()) {
|
|
5444
|
-
const seconds = Math.max(0, Math.round((now - startedAt) / 1e3));
|
|
5445
|
-
if (seconds < 60) return `${seconds} second${seconds === 1 ? "" : "s"}`;
|
|
5446
|
-
const minutes = Math.round(seconds / 60);
|
|
5447
|
-
return `${minutes} minute${minutes === 1 ? "" : "s"}`;
|
|
5448
|
-
}
|
|
5449
5435
|
/** Whether the change itself is known yet, which is what Files needs and nothing else does. */
|
|
5450
5436
|
function changeIsRead(job) {
|
|
5451
5437
|
return job.completed.includes("context");
|
|
@@ -5507,9 +5493,15 @@ function renderProgressView(job, fileCount, cancellable = false, history) {
|
|
|
5507
5493
|
${renderElapsed(job, cancellable ? "Cancel review" : null, history)}`;
|
|
5508
5494
|
}
|
|
5509
5495
|
/**
|
|
5510
|
-
*
|
|
5496
|
+
* The run's footer: how long it has run and how long earlier ones took, with Cancel beside them
|
|
5497
|
+
* when something can act on one. One block for a review and an update alike; only the button and
|
|
5498
|
+
* the history's words are the operation's own.
|
|
5499
|
+
*
|
|
5500
|
+
* Running time is the primary line, to the second (`48s`, `1m 08s`), so the one number on screen
|
|
5501
|
+
* that shows the run is alive keeps moving through the whole wait. History is secondary, under it,
|
|
5502
|
+
* and outside it, because the client rewrites that line's text every second. Cancel sits just
|
|
5503
|
+
* after the two rather than at the far edge: an action for this run, not a page control.
|
|
5511
5504
|
*
|
|
5512
|
-
* Beside the line rather than inside it, because the client rewrites that line's text every second.
|
|
5513
5505
|
* Offered only while a driver holds the job: with nothing running there is nothing to stop, and a
|
|
5514
5506
|
* button that could not do what it says would be worse than none. Secondary on purpose: it is a way
|
|
5515
5507
|
* out, not the point. A review has nothing to fall back on, so a cancelled one stops where it was
|
|
@@ -5518,16 +5510,34 @@ function renderProgressView(job, fileCount, cancellable = false, history) {
|
|
|
5518
5510
|
function renderElapsed(job, cancel, history) {
|
|
5519
5511
|
const button = !cancel ? "" : cancel === "Cancel review" ? `<button type="button" class="prb-progress-cancel" data-review-cancel="${escapeHtml$1(job.id)}">Cancel review</button>` : `<button type="button" class="prb-progress-cancel" data-update-cancel="${escapeHtml$1(job.id)}">Cancel update</button>`;
|
|
5520
5512
|
return `<div class="prb-progress-foot">
|
|
5521
|
-
<
|
|
5513
|
+
<div class="prb-progress-runtime">
|
|
5514
|
+
<p class="prb-progress-elapsed" data-started-at="${job.startedAt}">${escapeHtml$1(runningFor(job.startedAt))}</p>${renderHistory$1(history)}
|
|
5515
|
+
</div>
|
|
5522
5516
|
${button}
|
|
5523
|
-
</div
|
|
5517
|
+
</div>`;
|
|
5518
|
+
}
|
|
5519
|
+
/** The running time as the footer and the client's clock both say it. */
|
|
5520
|
+
function runningFor(startedAt, now = Date.now()) {
|
|
5521
|
+
return `Running for ${clockWords(now - startedAt)}`;
|
|
5522
|
+
}
|
|
5523
|
+
/**
|
|
5524
|
+
* To the second at every length: `48s`, `1m 08s`, `1h 00m 01s`. Not `formatDuration`, which drops
|
|
5525
|
+
* the seconds past an hour because a finished run's length does not need them; a live count does,
|
|
5526
|
+
* or it stands still for a minute at a time on exactly the runs most likely to look hung.
|
|
5527
|
+
*/
|
|
5528
|
+
function clockWords(ms) {
|
|
5529
|
+
const seconds = Math.max(0, Math.round(ms / 1e3));
|
|
5530
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
5531
|
+
if (seconds < 60) return `${seconds}s`;
|
|
5532
|
+
if (seconds < 3600) return `${Math.floor(seconds / 60)}m ${pad(seconds % 60)}s`;
|
|
5533
|
+
return `${Math.floor(seconds / 3600)}h ${pad(Math.floor(seconds / 60) % 60)}m ${pad(seconds % 60)}s`;
|
|
5524
5534
|
}
|
|
5525
5535
|
/**
|
|
5526
|
-
* How long this took before
|
|
5527
|
-
*
|
|
5536
|
+
* How long this took before: a status line, so no full stop. Nothing when no earlier run
|
|
5537
|
+
* succeeded.
|
|
5528
5538
|
*/
|
|
5529
5539
|
function renderHistory$1(history) {
|
|
5530
|
-
return history ? `<p class="prb-progress-history" data-runtime-history>${escapeHtml$1(history)}
|
|
5540
|
+
return history ? `<p class="prb-progress-history" data-runtime-history>${escapeHtml$1(history)}</p>` : "";
|
|
5531
5541
|
}
|
|
5532
5542
|
/**
|
|
5533
5543
|
* An update running, in place of the review it is updating.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prreviewbuddy",
|
|
3
|
-
"version": "0.73.
|
|
3
|
+
"version": "0.73.1",
|
|
4
4
|
"description": "Understand code changes before you approve them. Local branch and pull request reviews with Claude Code, Codex or Gemini CLI.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://prreviewbuddy.com",
|
package/static/shell.css
CHANGED
|
@@ -2661,27 +2661,38 @@ a.prb-rail-item { text-decoration: none; }
|
|
|
2661
2661
|
}
|
|
2662
2662
|
.prb-progress-open:hover { border-color: rgba(15, 23, 42, 0.3); color: var(--pane-ink); }
|
|
2663
2663
|
|
|
2664
|
+
/* The run's footer, for a review and an update alike: one block under the steps, set off by the
|
|
2665
|
+
pane's hairline across the column the steps use. The running time is the primary line and the
|
|
2666
|
+
history the quiet one under it. Cancel follows the two at a fixed gap rather than at the far
|
|
2667
|
+
edge, so the action stays with the run it stops, and wraps under them on a narrow pane. */
|
|
2668
|
+
.prb-progress-foot {
|
|
2669
|
+
display: flex;
|
|
2670
|
+
flex-wrap: wrap;
|
|
2671
|
+
align-items: center;
|
|
2672
|
+
gap: 10px 28px;
|
|
2673
|
+
margin-top: 24px;
|
|
2674
|
+
padding-top: 16px;
|
|
2675
|
+
border-top: 1px solid var(--pane-line, rgba(15, 23, 42, 0.12));
|
|
2676
|
+
}
|
|
2677
|
+
.prb-progress-runtime { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
2664
2678
|
.prb-progress-elapsed {
|
|
2665
|
-
margin:
|
|
2666
|
-
font-size: var(--t-
|
|
2667
|
-
|
|
2679
|
+
margin: 0;
|
|
2680
|
+
font-size: var(--t-body);
|
|
2681
|
+
font-weight: 500;
|
|
2682
|
+
color: #1f2328;
|
|
2668
2683
|
font-variant-numeric: tabular-nums;
|
|
2669
2684
|
}
|
|
2670
|
-
|
|
2671
|
-
/* The
|
|
2672
|
-
the line to the row so the two sit on one baseline; Cancel is the pane's quiet bordered button,
|
|
2673
|
-
smaller, since it is a way out rather than the point of the page. */
|
|
2674
|
-
.prb-progress-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 20px; }
|
|
2675
|
-
.prb-progress-foot .prb-progress-elapsed { margin: 0; }
|
|
2676
|
-
/* How long earlier runs took: under the running time, as quiet as it. */
|
|
2677
|
-
.prb-progress-history { margin: 4px 0 0; font-size: var(--t-meta); color: #8c959f; }
|
|
2685
|
+
.prb-progress-history { margin: 0; font-size: var(--t-meta); color: #8c959f; }
|
|
2686
|
+
/* The pane's quiet outlined button at full button size: an action, not a chip. */
|
|
2678
2687
|
.prb-progress-cancel {
|
|
2679
|
-
|
|
2688
|
+
flex-shrink: 0;
|
|
2689
|
+
padding: 6px 14px;
|
|
2680
2690
|
border: 1px solid #d8dee4;
|
|
2681
2691
|
border-radius: 7px;
|
|
2682
2692
|
background: #ffffff;
|
|
2683
2693
|
font: inherit;
|
|
2684
2694
|
font-size: var(--t-meta);
|
|
2695
|
+
font-weight: 500;
|
|
2685
2696
|
color: #57606a;
|
|
2686
2697
|
cursor: pointer;
|
|
2687
2698
|
}
|