Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): threads settle right away when a watched PR merges #26395

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/26395/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 25 additions and 4 deletions.

x
0 of 2 viewed, 2 left
18 additions and 2 deletionspackages/shared/src/orchestrationV2PendingBackgroundWork.test.tsModified
View file
@@ -374,19 +374,26 @@
const link = (
number: number,
- extra: { source?: "agent" | "stack-dismissed"; watched?: boolean },
+ extra: {
+ source?: "agent" | "stack-dismissed";
+ watched?: boolean;
+ state?: "open" | "closed" | "merged";
+ },
) => ({
host: "github.com",
repository: "acme/app",
number,
url: `https://github.com/acme/app/pull/${number}`,
source: extra.source ?? "agent",
+ snapshot: extra.state === undefined ? null : { state: extra.state },
...(extra.watched === false ? {} : { watch }),
});
const pullRequests = [
link(1, {}),
link(2, { watched: false }),
link(3, { source: "stack-dismissed" }),
+ link(4, { state: "merged" }),
+ link(5, { state: "closed" }),
​
it("keeps a settled run waiting on each visible watch, as an awaited monitor", () => {
@@ -403,6 +410,12 @@