Skip to content

Commit df71360

Browse files
authored
Make the pre-handoff prompt review a confirm instead of a 3-way menu (#37)
A select with proceed / review / cancel asks the user to weigh three options at the one gate that should be easy to clear. Collapse it to a confirm where the primary is proceed and the secondary opens the prompt; Ctrl+C already means cancel everywhere else in the flow. Carry proceedHint onto the confirm shown after a review too. That confirm is what actually authorizes the run, so the "runs autonomously in …, auto-accepting edits" wording must not disappear just because the user chose to read the prompt first.
1 parent 1daef31 commit df71360

2 files changed

Lines changed: 21 additions & 18 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@subtextdev/subtext-wizard': patch
3+
---
4+
5+
Replace the three-option pre-handoff prompt review with a Yes / "review first" confirm (Ctrl+C cancels), and carry the autonomy hint onto the post-review confirm so choosing to read the prompt first doesn't drop the wording about what the run auto-approves.

‎src/promptReview.ts‎

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,19 @@ export async function offerPromptReview(
3131
{ proceedLabel, proceedHint, openInBrowser = true }: PromptReviewChoices,
3232
): Promise<{ reviewed: boolean }> {
3333
const lineCount = prompt.split('\n').length;
34-
const choice = await p.select({
35-
message: `The install prompt is ready (${lineCount} lines) — it tells your coding agent exactly what to do.`,
36-
options: [
37-
{
38-
value: 'proceed',
39-
label: proceedLabel,
40-
hint: proceedHint,
41-
},
42-
{
43-
value: 'review',
44-
label: 'Review the prompt first',
45-
hint: openInBrowser ? 'opens in your browser' : 'served locally — I print the link',
46-
},
47-
{ value: 'cancel', label: 'Cancel' },
48-
],
34+
// Lighter than a 3-way select: a yes/no where the primary is "proceed" and
35+
// the secondary opens the prompt to read first. Ctrl+C cancels the run.
36+
const proceed = await p.confirm({
37+
message: proceedHint
38+
? `The install prompt is ready (${lineCount} lines). ${proceedLabel}? ${pc.dim(`(${proceedHint})`)}`
39+
: `The install prompt is ready (${lineCount} lines). ${proceedLabel}?`,
40+
active: 'Yes',
41+
inactive: 'Review the prompt first',
4942
});
50-
if (p.isCancel(choice) || choice === 'cancel') {
43+
if (p.isCancel(proceed)) {
5144
throw new CancelledError();
5245
}
53-
if (choice === 'proceed') {
46+
if (proceed) {
5447
return { reviewed: false };
5548
}
5649

@@ -87,7 +80,12 @@ export async function offerPromptReview(
8780
}
8881
}
8982

90-
const confirmed = await p.confirm({ message: `${proceedLabel}?` });
83+
// Carry the autonomy hint here too: this is the confirm that actually
84+
// authorizes the run, so the "runs autonomously in …, auto-accepting edits"
85+
// wording must not be dropped just because the user chose to read first.
86+
const confirmed = await p.confirm({
87+
message: proceedHint ? `${proceedLabel}? ${pc.dim(`(${proceedHint})`)}` : `${proceedLabel}?`,
88+
});
9189
closeServer?.();
9290
if (p.isCancel(confirmed) || !confirmed) {
9391
throw new CancelledError();

0 commit comments

Comments
 (0)