Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: threads with open PRs no longer auto-settle #5151

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

Showing 2 changed files with 31 additions and 3 deletions.

x
0 of 2 viewed, 2 left
24 additions and 2 deletionspackages/client-runtime/src/state/threadSettled.test.tsModified
View file
@@ -115,13 +115,15 @@
// Settled iff nothing blocks (pending work / live session) AND
// the override says settled, or (with no override) a merged PR
// or staleness auto-settles. The "active" pin suppresses both
- // auto signals.
+ // auto signals, and an open PR suppresses the inactivity path:
+ // a thread with a PR out for review is never done, however quiet.
expected:
pending === undefined &&
!running &&
(settledOverride === "settled" ||
(settledOverride === null &&
- (changeRequestState === "merged" || inactivity === "stale"))),
+ (changeRequestState === "merged" ||
+ (changeRequestState !== "open" && inactivity === "stale")))),
})),
@@ -176,6 +178,26 @@
});
​
+ it("never auto-settles a stale thread with an open change request", () => {
+ const stale = makeShell({ activityAt: STALE });
+ expect(
+ effectiveSettled(stale, {
+ now: NOW,
+ autoSettleAfterDays: 3,
+ changeRequestState: "open",