@dev.fast/whiteboard 0.3.5-preview.20261023.135 → 0.4.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/dist/{agent-cli-BMm7SuZF.js → agent-cli-CHNDd4Ga.js} +1 -1
- package/dist/agent-cli-Cn4-16XA.js +2 -0
- package/dist/{authoring-tools-BQW10hIy.js → authoring-tools-D8EkIDjm.js} +1 -1
- package/dist/build-info.json +1 -1
- package/dist/{cli-runner-BTIv01OF.js → cli-runner-DFBaVGij.js} +4 -4
- package/dist/cli.js +1 -1
- package/dist/{headless-host-Sg_3jomq.js → headless-host-DJhcab6r.js} +13 -7
- package/dist/{headless-host-BqhXupMu.js → headless-host-dwlqhqMY.js} +1 -1
- package/dist/{local-data-HEAXumv5.js → local-data-DHedfhxw.js} +4 -4
- package/dist/{mcp-mroZC5-9.js → mcp-Br-r_wwR.js} +1 -1
- package/dist/profile-BopGMZUh.js +2 -0
- package/dist/{profile-BuyV9AEf.js → profile-D9wdlPgw.js} +1 -1
- package/dist/server/desktop-host.js +3 -3
- package/package.json +4 -4
- package/src/review-api/http.ts +24 -6
- package/src/review-api/store.ts +12 -6
- package/dist/agent-cli-B388TP61.js +0 -2
- package/dist/profile-wmzgPWK8.js +0 -2
|
@@ -44,7 +44,7 @@ async function runReviewAgentCli(input) {
|
|
|
44
44
|
[REVIEW_THREAD_HEADER, thread ?? ""]
|
|
45
45
|
]);
|
|
46
46
|
if (mode === "mcp") {
|
|
47
|
-
const { serveReviewMcp } = await import("./mcp-
|
|
47
|
+
const { serveReviewMcp } = await import("./mcp-Br-r_wwR.js");
|
|
48
48
|
exitOnInstallUpdate(input.stderr);
|
|
49
49
|
await serveReviewMcp(async (key, agentKind) => {
|
|
50
50
|
const connected = await connectReviewInstance(key ? {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as isJsonObject } from "./src-X9phtB2j.js";
|
|
2
|
-
import { c as activityBeginSchema, l as activityEndSchema, n as uploadSchema, r as commandSchema, u as activityUpdateSchema } from "./local-data-
|
|
2
|
+
import { c as activityBeginSchema, l as activityEndSchema, n as uploadSchema, r as commandSchema, u as activityUpdateSchema } from "./local-data-DHedfhxw.js";
|
|
3
3
|
import { L as publishedEditSchema, N as pathTargetSchema } from "./stored-document-migration-DEt8iwem.js";
|
|
4
4
|
import { t as ReviewInputError } from "./input-error-OLgB_h31.js";
|
|
5
5
|
import { t as findReviewPackageRoot } from "./package-paths-BeYHYjeR.js";
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.
|
|
1
|
+
{"version":"0.4.0","commit":"90564c926cee5f245d498cb56585759cca9b312b","dirty":true,"builtAt":"2026-10-23T18:11:19.854Z"}
|
|
@@ -13,7 +13,7 @@ import { t as ReviewTelemetry } from "./review-telemetry-BM-_KdLi.js";
|
|
|
13
13
|
import { t as fuzzyRank } from "./fuzzy-match-CfSxqzBF.js";
|
|
14
14
|
import { _ as isInstallTarget, a as isOwnedShim, f as windowsInstallerCommand, g as ALL_INSTALL_TARGETS, h as detectConnectAgents, m as connectAgent, o as pathShimPath, p as scanLegacySkills, t as aliasInstallationToAccount, v as connectPrompts } from "./account-alias-2yTAxoBx.js";
|
|
15
15
|
import { n as focusReviewDesktop, r as runReviewAppLaunch } from "./review-app-launcher-BZAnR8Vp.js";
|
|
16
|
-
import { t as reviewAgentCliHelp } from "./agent-cli-
|
|
16
|
+
import { t as reviewAgentCliHelp } from "./agent-cli-CHNDd4Ga.js";
|
|
17
17
|
import { existsSync, mkdirSync, renameSync, writeFileSync } from "node:fs";
|
|
18
18
|
import { realpath } from "node:fs/promises";
|
|
19
19
|
import path from "node:path";
|
|
@@ -4356,7 +4356,7 @@ async function runReviewCli(input) {
|
|
|
4356
4356
|
process.once("SIGINT", stop);
|
|
4357
4357
|
process.once("SIGTERM", stop);
|
|
4358
4358
|
process.once(DESKTOP_TAKEOVER_SIGNAL, takeover);
|
|
4359
|
-
const { HeadlessServerBusyError, runHeadlessServer } = await import("./headless-host-
|
|
4359
|
+
const { HeadlessServerBusyError, runHeadlessServer } = await import("./headless-host-dwlqhqMY.js");
|
|
4360
4360
|
try {
|
|
4361
4361
|
await runHeadlessServer({
|
|
4362
4362
|
stateDir,
|
|
@@ -4421,7 +4421,7 @@ async function runReviewCli(input) {
|
|
|
4421
4421
|
if (!existsSync(path.join(stateDir, "review-api.db"))) throw new Error(`No saved reviews in ${stateDir}, so there is no server id to reset. Check --state-dir.`);
|
|
4422
4422
|
const inUse = `A Whiteboard server is using ${stateDir}. Stop it first, then run whiteboard server reset-id again.`;
|
|
4423
4423
|
if (await desktopUsesHome(stateDir, env)) return refuse(inUse, options.json);
|
|
4424
|
-
const [{ openReviewProfile }, { withHeadlessServerLock }] = await Promise.all([import("./profile-
|
|
4424
|
+
const [{ openReviewProfile }, { withHeadlessServerLock }] = await Promise.all([import("./profile-BopGMZUh.js"), import("./headless-host-dwlqhqMY.js")]);
|
|
4425
4425
|
const reset = await withHeadlessServerLock(await realpath(stateDir), async () => {
|
|
4426
4426
|
const local = await openReviewProfile(stateDir, { manageWorkspaces: false });
|
|
4427
4427
|
try {
|
|
@@ -4795,7 +4795,7 @@ async function runReviewCli(input) {
|
|
|
4795
4795
|
return commands;
|
|
4796
4796
|
} });
|
|
4797
4797
|
for (const [name, description] of [["api", "Call a JSON review authoring tool on the running server"], ["mcp", "Serve the JSON review authoring tools over stdio MCP"]]) configureOutput(program.command(name).description(description).argument("[args...]", "tool name and JSON input").allowUnknownOption().allowExcessArguments().helpOption(false).passThroughOptions().addHelpText("after", `\n${reviewAgentCliHelp}`), "plain").action(async (args) => {
|
|
4798
|
-
const { runReviewAgentCli } = await import("./agent-cli-
|
|
4798
|
+
const { runReviewAgentCli } = await import("./agent-cli-Cn4-16XA.js");
|
|
4799
4799
|
state.exitCode = await runReviewAgentCli({
|
|
4800
4800
|
...input,
|
|
4801
4801
|
env: authoringEnv(),
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as resolveRepoContext, d as git, r as defaultBranch, w as runVcs } from "./src-X9ZebeOD.js";
|
|
2
2
|
import { c as jsonString, m as isStringValue, n as isJsonObject, p as isObjectValue, u as parseJsonText } from "./src-X9phtB2j.js";
|
|
3
3
|
import { a as sharedReviewId, c as verifyShareRepository, d as validateShareSources, f as StreamLimitError, h as shareIdSchema, l as exportShare, m as parseShareLink, n as ShareClient, p as readBoundedStream, r as SharePreflightError, s as readShareRepository, t as ShareAuthError, u as referenceCommits } from "./client-p9WB8Sj0.js";
|
|
4
|
-
import { d as textualRows, f as invalidateStructuralComparisons, h as readGitHubPullRequests, i as inspectSnapshot, m as diffrMissingError, p as diffrExecutable, r as commandSchema } from "./local-data-
|
|
4
|
+
import { d as textualRows, f as invalidateStructuralComparisons, h as readGitHubPullRequests, i as inspectSnapshot, m as diffrMissingError, p as diffrExecutable, r as commandSchema } from "./local-data-DHedfhxw.js";
|
|
5
5
|
import { N as reviewDiffrSummarizerInputSchema, O as ReviewFeedbackContactSchema, P as decodeStructuralDiffEvent, a as parseReviewVerbRequest, c as boardIconKind, i as parseReviewDesktopVerbResult, j as ReviewOnboardingRunRequestSchema, k as ReviewFeedbackSchema, l as boardTitle, m as REVIEW_CLIENT_REMOTE, p as REVIEW_CLIENT_HEADER, y as REVIEW_HOST_HEADER } from "./src-DYHVzX3b.js";
|
|
6
6
|
import { $ as runStoreLogin, M as selectTraceStorage, N as TraceStorageDeniedError, Q as readStoreAuth, X as DEFAULT_STORE_ORIGIN, Z as clearStoreAuth, b as listReviewTraceSessions, j as resolveTraceStorage, k as isTraceStorageConfigured, q as shellQuote, v as traceMachineEnabled, x as loadReviewAgentTrace } from "./src-Z1x4-Qmb.js";
|
|
7
7
|
import { _ as scopedCoverage, h as emptyCoverage, i as anchorSelection, l as resolveDiffSelection, m as coverageSources, n as SelectionUnavailableError, o as comparisonKey, s as formatAnchor, u as selectionKey, v as subtractIntervals, y as unionIntervals } from "./lens-selection-9byzEgvU.js";
|
|
@@ -13,10 +13,10 @@ import { i as readReviewPackageVersion, n as readBuildCommit, t as findReviewPac
|
|
|
13
13
|
import "./review-home-paths-CG-sb9Cw.js";
|
|
14
14
|
import { _ as reviewInstanceIdentity, n as desktopOwnsHome, o as reviewServerDiscoveryPath, p as desktopUsesHome, r as headlessServerLockPath, t as DESKTOP_TAKEOVER_SIGNAL } from "./server-discovery-DKLIOgg3.js";
|
|
15
15
|
import { c as askPicksSchema, d as selectionMarkdown, l as askQuestionSchema, n as askAgentIds, r as askChoiceKinds, s as askPermissionsSchema, t as applyAskChange, u as AgentSelectionSchema } from "./thread-state-CO97FUqK.js";
|
|
16
|
-
import { t as openReviewProfile } from "./profile-
|
|
16
|
+
import { t as openReviewProfile } from "./profile-D9wdlPgw.js";
|
|
17
17
|
import { c as REVIEW_APP_SESSION_ID_HEADER, d as sanitizeUiTelemetryEvent, f as cleanTelemetryText, o as reviewRequestOrigin, r as REVIEW_PERSON_HEADER, s as BUNDLE_FRAME_PATTERN, t as ASK_THREAD_ENV, u as isReportableCleanedMessage } from "./request-origin-CNSLVn7x.js";
|
|
18
18
|
import { a as defaultAskPermissions, i as askAgents, l as launchAskAgent, n as askAgentSettings, o as detectAskAgents, r as askAgentTakesMcp, t as fuzzyRank } from "./fuzzy-match-CfSxqzBF.js";
|
|
19
|
-
import { a as inspectQuerySchema, i as renderInstructions, o as queryAnchor, r as instructionsQuerySchema, s as readQuerySchemas, t as authoringTools } from "./authoring-tools-
|
|
19
|
+
import { a as inspectQuerySchema, i as renderInstructions, o as queryAnchor, r as instructionsQuerySchema, s as readQuerySchemas, t as authoringTools } from "./authoring-tools-D8EkIDjm.js";
|
|
20
20
|
import { a as headlessServerOwner, c as stopBackgroundServer, o as recordedBackgroundServer } from "./background-server-DHWHzpo5.js";
|
|
21
21
|
import crypto$1, { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
22
22
|
import { z } from "zod";
|
|
@@ -3834,8 +3834,15 @@ function createReviewApi(store, data, open, shared, capabilities = () => ({
|
|
|
3834
3834
|
return JSON.stringify([...outgoing, ...backlinks].map((link) => link.pullRequestUrl && data.pullRequestState(link.pullRequestUrl, { seen: false })));
|
|
3835
3835
|
};
|
|
3836
3836
|
const linksKeys = new Map([...reviewIds].map((reviewId) => [reviewId, linksKey(reviewId)]));
|
|
3837
|
-
const
|
|
3838
|
-
|
|
3837
|
+
const placeKey = (id) => {
|
|
3838
|
+
const project = !isShared(id) && store.summary(id)?.project;
|
|
3839
|
+
const branches = project ? store.listProject(project.id).filter(({ origin }) => origin?.branch).map(({ reviewId, origin, trashedAt }) => [
|
|
3840
|
+
reviewId,
|
|
3841
|
+
origin,
|
|
3842
|
+
trashedAt
|
|
3843
|
+
]) : [];
|
|
3844
|
+
return createHash("sha1").update(JSON.stringify([placeOf(id), branches])).digest().readUInt32BE(0);
|
|
3845
|
+
};
|
|
3839
3846
|
const placeKeys = new Map([...reviewIds].map((reviewId) => [reviewId, placeKey(reviewId)]));
|
|
3840
3847
|
const readReviewLine = (reviewId) => {
|
|
3841
3848
|
try {
|
|
@@ -3847,7 +3854,7 @@ function createReviewApi(store, data, open, shared, capabilities = () => ({
|
|
|
3847
3854
|
activity: store.activity.read(reviewId),
|
|
3848
3855
|
coverageRevision: data?.coverageRevision ?? 0,
|
|
3849
3856
|
linksRevision: linksRevision.get(reviewId) ?? 0,
|
|
3850
|
-
placeRevision:
|
|
3857
|
+
placeRevision: placeKeys.get(reviewId)
|
|
3851
3858
|
}
|
|
3852
3859
|
};
|
|
3853
3860
|
} catch (error) {
|
|
@@ -3886,7 +3893,6 @@ function createReviewApi(store, data, open, shared, capabilities = () => ({
|
|
|
3886
3893
|
const next = placeKey(id);
|
|
3887
3894
|
if (next === key) continue;
|
|
3888
3895
|
placeKeys.set(id, next);
|
|
3889
|
-
placeRevision.set(id, (placeRevision.get(id) ?? 0) + 1);
|
|
3890
3896
|
marked = markReview(id) || marked;
|
|
3891
3897
|
}
|
|
3892
3898
|
return marked;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as withHeadlessServerLock, n as runHeadlessServer, r as takeOverServerHome, t as HeadlessServerBusyError } from "./headless-host-
|
|
1
|
+
import { i as withHeadlessServerLock, n as runHeadlessServer, r as takeOverServerHome, t as HeadlessServerBusyError } from "./headless-host-DJhcab6r.js";
|
|
2
2
|
export { HeadlessServerBusyError, runHeadlessServer, takeOverServerHome, withHeadlessServerLock };
|
|
@@ -3446,12 +3446,12 @@ var ReviewStore = class {
|
|
|
3446
3446
|
applyPreparedCommand(prepared, initial, author) {
|
|
3447
3447
|
const { op, requestedTarget, fromPullRequest, resolvedTarget, resolvedBranch, discoveredPullRequest, resolvedTitle } = prepared;
|
|
3448
3448
|
return this.enqueue(async () => {
|
|
3449
|
-
if (op.type === "create" && op.pullRequestUrl
|
|
3450
|
-
const known = this.reviewsForPullRequest(op.pullRequestUrl);
|
|
3451
|
-
const branch = fromPullRequest?.branch;
|
|
3449
|
+
if (op.type === "create" && (op.pullRequestUrl ? op.reuseExisting !== false : op.reuseExisting && resolvedTarget?.pins)) {
|
|
3450
|
+
const known = op.pullRequestUrl ? this.reviewsForPullRequest(op.pullRequestUrl) : [];
|
|
3451
|
+
const branch = fromPullRequest?.branch ?? resolvedBranch;
|
|
3452
3452
|
const repository = resolvedTarget?.target.repositoryId;
|
|
3453
3453
|
const project = repository && this.projectOfRepository(repository);
|
|
3454
|
-
const matching = !known.length && branch && project ? this.list().filter((review) => review.project?.id === project && sourceBranchName(review.origin?.branch) === sourceBranchName(branch) && !review.origin?.pullRequestUrl && review.pins !== void 0 && repository !== void 0 && this.sameRepository(review.pins.repositoryId, repository)).reverse().map((review) => review.reviewId) : [];
|
|
3454
|
+
const matching = !known.length && branch && project ? this.list().filter((review) => review.project?.id === project && sourceBranchName(review.origin?.branch) === sourceBranchName(branch) && (op.pullRequestUrl ? !review.origin?.pullRequestUrl : !review.trashedAt) && review.pins !== void 0 && repository !== void 0 && this.sameRepository(review.pins.repositoryId, repository)).reverse().map((review) => review.reviewId) : [];
|
|
3455
3455
|
const [found, ...others] = [...known, ...matching];
|
|
3456
3456
|
if (found) {
|
|
3457
3457
|
const result = this.existingReview(found, others, resolvedTarget.pins);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as toolResultText, s as ReviewApiError } from "./agent-client-Dc0vHFJt.js";
|
|
2
2
|
import { t as ReviewInputError } from "./input-error-OLgB_h31.js";
|
|
3
|
-
import { n as REVIEW_STATUS_TOOL, t as authoringTools } from "./authoring-tools-
|
|
3
|
+
import { n as REVIEW_STATUS_TOOL, t as authoringTools } from "./authoring-tools-D8EkIDjm.js";
|
|
4
4
|
import { i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-C1L1vJyz.js";
|
|
5
5
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
6
6
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as projectOfCheckout, g as CheckoutGroups, o as groupCheckoutsAhead, s as initializeReviewStoreSchema, t as openLocalReviewStore } from "./local-data-
|
|
1
|
+
import { a as projectOfCheckout, g as CheckoutGroups, o as groupCheckoutsAhead, s as initializeReviewStoreSchema, t as openLocalReviewStore } from "./local-data-DHedfhxw.js";
|
|
2
2
|
import "./src-Z1x4-Qmb.js";
|
|
3
3
|
import { j as withFileLock } from "./s3-config-CjcLyFV5.js";
|
|
4
4
|
import { access, mkdir } from "node:fs/promises";
|
|
@@ -11,12 +11,12 @@ import { t as errorMessage } from "../error-message-OtiDonty.js";
|
|
|
11
11
|
import { i as readReviewPackageVersion, t as findReviewPackageRoot } from "../package-paths-BeYHYjeR.js";
|
|
12
12
|
import { i as reviewInstanceDiscoveryPath, o as reviewLegacyDiscoveryPath } from "../review-home-paths-CG-sb9Cw.js";
|
|
13
13
|
import { _ as reviewInstanceIdentity, u as REVIEW_INSTANCE_ENV } from "../server-discovery-DKLIOgg3.js";
|
|
14
|
-
import { t as openReviewProfile } from "../profile-
|
|
14
|
+
import { t as openReviewProfile } from "../profile-D9wdlPgw.js";
|
|
15
15
|
import { r as reviewTelemetryChannel, t as ReviewTelemetry } from "../review-telemetry-BM-_KdLi.js";
|
|
16
16
|
import { l as REVIEW_TELEMETRY_TABS } from "../request-origin-CNSLVn7x.js";
|
|
17
17
|
import { c as removeLegacyReviewSkills, d as skipCliInstall, h as detectConnectAgents, i as finishCliInstallUpdate, l as resetCliInstall, m as connectAgent, n as applyCliInstall, o as pathShimPath, r as declineCliInstall, s as removeCliInstall, t as aliasInstallationToAccount, u as resolveCliInstallStatus } from "../account-alias-2yTAxoBx.js";
|
|
18
|
-
import { C as saveDiffrSummarizer, E as cliAskTools, S as readDiffrConfig, T as testDiffrSummarizer, _ as DEFAULT_MAX_REQUEST_BYTES, a as drainServerCrashReport, b as GlobalReviewDesktopVerbRelay, c as answerErrorsAsJson, d as legacyModeSchema, f as captureSanitizedUiTelemetry, g as readBoundedRequestJson, h as createNodeRequestListener, l as createWhiteboardCore, m as recordClientError, o as installProcessErrorTelemetry, p as clientErrorsForSession, r as takeOverServerHome, s as serverCrashReportPath, u as serverJson, v as HttpJsonError, w as setDiffrConfigValue, x as migrateDiffrConfig, y as ReviewServerError } from "../headless-host-
|
|
19
|
-
import { s as readQuerySchemas } from "../authoring-tools-
|
|
18
|
+
import { C as saveDiffrSummarizer, E as cliAskTools, S as readDiffrConfig, T as testDiffrSummarizer, _ as DEFAULT_MAX_REQUEST_BYTES, a as drainServerCrashReport, b as GlobalReviewDesktopVerbRelay, c as answerErrorsAsJson, d as legacyModeSchema, f as captureSanitizedUiTelemetry, g as readBoundedRequestJson, h as createNodeRequestListener, l as createWhiteboardCore, m as recordClientError, o as installProcessErrorTelemetry, p as clientErrorsForSession, r as takeOverServerHome, s as serverCrashReportPath, u as serverJson, v as HttpJsonError, w as setDiffrConfigValue, x as migrateDiffrConfig, y as ReviewServerError } from "../headless-host-DJhcab6r.js";
|
|
19
|
+
import { s as readQuerySchemas } from "../authoring-tools-D8EkIDjm.js";
|
|
20
20
|
import crypto, { createHash, randomBytes } from "node:crypto";
|
|
21
21
|
import { z } from "zod";
|
|
22
22
|
import fs, { existsSync, readFileSync } from "node:fs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev.fast/whiteboard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
"typescript": "6.0.3",
|
|
76
76
|
"vitest": "4.1.11",
|
|
77
77
|
"@dev.fast/json": "0.0.0",
|
|
78
|
-
"@dev.fast/review-share-protocol": "0.1.2",
|
|
79
78
|
"@dev.fast/review-protocol": "0.0.0",
|
|
80
79
|
"@dev.fast/trace-core": "0.0.0",
|
|
81
|
-
"@dev.fast/trace-protocol": "0.5.0"
|
|
80
|
+
"@dev.fast/trace-protocol": "0.5.0",
|
|
81
|
+
"@dev.fast/review-share-protocol": "0.1.2"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=24 <25"
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"repo": "devdotfast/review",
|
|
89
89
|
"docs": "packages/review/instructions/authoring.md"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "90564c926cee5f245d498cb56585759cca9b312b",
|
|
92
92
|
"scripts": {
|
|
93
93
|
"prebuild": "pnpm run build:workspace-deps",
|
|
94
94
|
"build": "node --max-old-space-size=8192 node_modules/tsdown/dist/run.mjs",
|
package/src/review-api/http.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
4
|
type JsonObject,
|
|
3
5
|
type JsonValue,
|
|
@@ -608,10 +610,27 @@ export function createReviewApi(
|
|
|
608
610
|
[...reviewIds].map((reviewId) => [reviewId, linksKey(reviewId)] as const),
|
|
609
611
|
);
|
|
610
612
|
|
|
611
|
-
//
|
|
612
|
-
//
|
|
613
|
-
const
|
|
614
|
-
|
|
613
|
+
// A digest of a review's place and its project's branches, so a later
|
|
614
|
+
// stream's matches unless its header or stack moved.
|
|
615
|
+
const placeKey = (id: string) => {
|
|
616
|
+
const project = !isShared(id) && store.summary(id)?.project;
|
|
617
|
+
|
|
618
|
+
const branches = project
|
|
619
|
+
? store
|
|
620
|
+
.listProject(project.id)
|
|
621
|
+
.filter(({ origin }) => origin?.branch)
|
|
622
|
+
.map(({ reviewId, origin, trashedAt }) => [
|
|
623
|
+
reviewId,
|
|
624
|
+
origin,
|
|
625
|
+
trashedAt,
|
|
626
|
+
])
|
|
627
|
+
: [];
|
|
628
|
+
|
|
629
|
+
return createHash("sha1")
|
|
630
|
+
.update(JSON.stringify([placeOf(id), branches]))
|
|
631
|
+
.digest()
|
|
632
|
+
.readUInt32BE(0);
|
|
633
|
+
};
|
|
615
634
|
|
|
616
635
|
const placeKeys = new Map(
|
|
617
636
|
[...reviewIds].map((reviewId) => [reviewId, placeKey(reviewId)] as const),
|
|
@@ -627,7 +646,7 @@ export function createReviewApi(
|
|
|
627
646
|
activity: store.activity.read(reviewId),
|
|
628
647
|
coverageRevision: data?.coverageRevision ?? 0,
|
|
629
648
|
linksRevision: linksRevision.get(reviewId) ?? 0,
|
|
630
|
-
placeRevision:
|
|
649
|
+
placeRevision: placeKeys.get(reviewId)!,
|
|
631
650
|
},
|
|
632
651
|
};
|
|
633
652
|
} catch (error) {
|
|
@@ -681,7 +700,6 @@ export function createReviewApi(
|
|
|
681
700
|
|
|
682
701
|
if (next === key) continue;
|
|
683
702
|
placeKeys.set(id, next);
|
|
684
|
-
placeRevision.set(id, (placeRevision.get(id) ?? 0) + 1);
|
|
685
703
|
marked = markReview(id) || marked;
|
|
686
704
|
}
|
|
687
705
|
|
package/src/review-api/store.ts
CHANGED
|
@@ -1673,11 +1673,15 @@ export class ReviewStore {
|
|
|
1673
1673
|
return this.enqueue(async () => {
|
|
1674
1674
|
if (
|
|
1675
1675
|
op.type === "create" &&
|
|
1676
|
-
op.pullRequestUrl
|
|
1677
|
-
|
|
1676
|
+
(op.pullRequestUrl
|
|
1677
|
+
? op.reuseExisting !== false
|
|
1678
|
+
: op.reuseExisting && resolvedTarget?.pins)
|
|
1678
1679
|
) {
|
|
1679
|
-
const known =
|
|
1680
|
-
|
|
1680
|
+
const known = op.pullRequestUrl
|
|
1681
|
+
? this.reviewsForPullRequest(op.pullRequestUrl)
|
|
1682
|
+
: [];
|
|
1683
|
+
|
|
1684
|
+
const branch = fromPullRequest?.branch ?? resolvedBranch;
|
|
1681
1685
|
const repository = resolvedTarget?.target.repositoryId;
|
|
1682
1686
|
const project = repository && this.projectOfRepository(repository);
|
|
1683
1687
|
|
|
@@ -1689,7 +1693,9 @@ export class ReviewStore {
|
|
|
1689
1693
|
review.project?.id === project &&
|
|
1690
1694
|
sourceBranchName(review.origin?.branch) ===
|
|
1691
1695
|
sourceBranchName(branch) &&
|
|
1692
|
-
|
|
1696
|
+
(op.pullRequestUrl
|
|
1697
|
+
? !review.origin?.pullRequestUrl
|
|
1698
|
+
: !review.trashedAt) &&
|
|
1693
1699
|
review.pins !== undefined &&
|
|
1694
1700
|
repository !== undefined &&
|
|
1695
1701
|
this.sameRepository(review.pins.repositoryId, repository),
|
|
@@ -1704,7 +1710,7 @@ export class ReviewStore {
|
|
|
1704
1710
|
const result = this.existingReview(
|
|
1705
1711
|
found,
|
|
1706
1712
|
others,
|
|
1707
|
-
//
|
|
1713
|
+
// Both resolve to commits, so pins are set.
|
|
1708
1714
|
resolvedTarget!.pins!,
|
|
1709
1715
|
);
|
|
1710
1716
|
|
package/dist/profile-wmzgPWK8.js
DELETED