Address PR #3960 review findings and CI failures
CI: add settledOverride/settledAt + new client settings to desktop and mobile test fixtures and the mobile threadDetailToShell mapping. Review fixes (cursor bugbot + macroscope): - failed status now requires session.status === "error" instead of any lingering lastError on a stopped/ready session - effectiveSettled: pending approvals or user input always win — blocked work can never collapse into the settled tail, even manually settled - decider unsettle-on-activity guards check settledOverride === "settled" so activity no longer erases a user's explicit keep-active override - repeat thread.settle re-emits with updatedAt = original settledAt, so double-settles no longer bump recency ordering - sidebarAutoSettleAfterDays bounded 1..90 in schema and patch - approval wait sort/label use shell.updatedAt (bumped by the approval activity in the projection pipeline) instead of latestUserMessageAt / turn start, with the approximation documented - v2 rows: Enter/Space keyboard activation; double-click inline rename ported from v1 plus a context-menu Rename entry - new-thread picker: cross-project creation no longer inherits the active thread's branch/worktree; preselection consults the active draft via resolveThreadActionProjectRef; stale project scope resets to All - settle worktree prompt: vcs status checked before offering (and again at click time) — dirty or ahead worktrees are never offered Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
e17a333d3f
commit
069f271b1c
21 files changed
+386
-68
No files matched your search
@@ -21,6 +21,7 @@ function makeShell(input: {
|
||||
readonly settledOverride: OrchestrationThreadShell["settledOverride"];
|
||||
readonly activityAt: string | null;
|
||||
readonly sessionStatus?: "starting" | "running";
|
||||
readonly pending?: "approval" | "user-input";
|
||||
}): OrchestrationThreadShell {
|
||||
const threadId = ThreadId.make("thread-1");
|
||||
return {
|
||||
@@ -61,8 +62,8 @@ function makeShell(input: {
|
||||
updatedAt: NOW,
|
||||
},
|
||||
latestUserMessageAt: null,
|
||||
hasPendingApprovals: false,
|
||||
hasPendingUserInput: false,
|
||||
hasPendingApprovals: input.pending === "approval",
|
||||
hasPendingUserInput: input.pending === "user-input",
|
||||
hasActionableProposedPlan: false,
|
||||
};
|
||||
}
|
||||
@@ -97,32 +98,38 @@ describe("effectiveSettled", () => {
|
||||
["no-activity", null],
|
||||
] as const;
|
||||
const runningCases = [false, true] as const;
|
||||
const pendingCases = [undefined, "approval", "user-input"] as const;
|
||||
const truthTable = overrides.flatMap((settledOverride) =>
|
||||
changeRequestStates.flatMap((changeRequestState) =>
|
||||
inactivityCases.flatMap(([inactivity, activityAt]) =>
|
||||
runningCases.map((running) => ({
|
||||
settledOverride,
|
||||
changeRequestState,
|
||||
inactivity,
|
||||
activityAt,
|
||||
running,
|
||||
expected:
|
||||
settledOverride === "settled" ||
|
||||
(settledOverride === null &&
|
||||
!running &&
|
||||
(changeRequestState === "merged" || inactivity === "stale")),
|
||||
})),
|
||||
runningCases.flatMap((running) =>
|
||||
pendingCases.map((pending) => ({
|
||||
settledOverride,
|
||||
changeRequestState,
|
||||
inactivity,
|
||||
activityAt,
|
||||
running,
|
||||
pending,
|
||||
expected:
|
||||
pending === undefined &&
|
||||
(settledOverride === "settled" ||
|
||||
(settledOverride === null &&
|
||||
!running &&
|
||||
(changeRequestState === "merged" || inactivity === "stale"))),
|
||||
})),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
it.each(truthTable)(
|
||||
"override=$settledOverride pr=$changeRequestState inactivity=$inactivity running=$running",
|
||||
({ settledOverride, changeRequestState, activityAt, running, expected }) => {
|
||||
"override=$settledOverride pr=$changeRequestState inactivity=$inactivity running=$running pending=$pending",
|
||||
({ settledOverride, changeRequestState, activityAt, running, pending, expected }) => {
|
||||
const shell = makeShell({
|
||||
settledOverride,
|
||||
activityAt,
|
||||
...(running ? { sessionStatus: "running" as const } : {}),
|
||||
...(pending === undefined ? {} : { pending }),
|
||||
});
|
||||
const changeRequestOptions =
|
||||
changeRequestState === undefined
|
||||
|
||||
@@ -34,6 +34,8 @@ export function effectiveSettled(
|
||||
readonly changeRequestState?: ChangeRequestStateLike | null;
|
||||
},
|
||||
): boolean {
|
||||
// Blocked work must remain visible even when a user explicitly settled it.
|
||||
if (shell.hasPendingApprovals || shell.hasPendingUserInput) return false;
|
||||
if (shell.settledOverride === "settled") return true;
|
||||
if (shell.settledOverride === "active") return false;
|
||||
if (shell.session?.status === "starting" || shell.session?.status === "running") return false;
|
||||
|
||||
Reference in new issue
Block a user