fix(aws): stop guard review round 2
A failed StopTask removes the stop marker it recorded, so a later stop pushes as configured. The unchecked guard's Stop anyway sends no choice and records nothing, so the workspace's own shutdown push still runs as the dialog says. The idle watcher keeps a pushed/discard marker instead of overwriting it; the remove-resources dialog sends discard only when there may be saved files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8441a096c8
commit
08b6d341f2
10 files changed
+110
-10
No files matched your search
@@ -3,13 +3,16 @@ import type { UnsavedWork, WipChoice } from "../../lib/types";
|
||||
import Modal from "../ui/Modal";
|
||||
import Button from "../ui/Button";
|
||||
|
||||
export type StopGuardChoice = WipChoice | "unguarded" | null;
|
||||
|
||||
interface Props {
|
||||
projectName: string;
|
||||
work: UnsavedWork;
|
||||
/** The project's "push work in progress when the workspace stops" setting. */
|
||||
wipPushOnStop?: boolean;
|
||||
/** `null` = Cancel. */
|
||||
onChoose: (choice: WipChoice | null) => void;
|
||||
/** `null` = Cancel. `"unguarded"` = stop without recording any choice
|
||||
* (the unchecked case: the workspace's own shutdown push still runs). */
|
||||
onChoose: (choice: StopGuardChoice) => void;
|
||||
}
|
||||
|
||||
function describeRepo(dirty: boolean, unpushed: number): string {
|
||||
@@ -45,7 +48,7 @@ export default function StopGuardModal({ projectName, work, wipPushOnStop = fals
|
||||
ref={stopRef}
|
||||
size="md"
|
||||
variant={work.checked ? "danger" : "primary"}
|
||||
onClick={() => onChoose("discard")}
|
||||
onClick={() => onChoose(work.checked ? "discard" : "unguarded")}
|
||||
>
|
||||
{work.checked ? "Stop without pushing" : "Stop anyway"}
|
||||
</Button>
|
||||
|
||||
Reference in new issue
Block a user