fix(gsd): notify users what to do next after /gsd step finishes
In step mode, /gsd would run one unit and then silently exit the auto loop, leaving users with no hint that they should /clear and /gsd again to run the next step. Emit an info notify before returning "step-wizard" from postUnitPostVerification so the TUI surfaces the next unit label and the /clear + /gsd guidance (or /gsd auto to switch to auto mode). Falls back to a generic message if deriveState throws, and handles the milestone-complete case with a dedicated review message. https://claude.ai/code/session_015yrPQbZTyJPqTsM654Ym3s
This commit is contained in:
parent
24f51fd76b
commit
8fec87b6f2
1 changed files with 26 additions and 1 deletions
|
|
@ -104,6 +104,7 @@ import {
|
|||
updateSliceProgressCache,
|
||||
unitVerb,
|
||||
hideFooter,
|
||||
describeNextUnit,
|
||||
} from "./auto-dashboard.js";
|
||||
import { existsSync, unlinkSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
|
|
@ -1025,8 +1026,32 @@ export async function postUnitPostVerification(pctx: PostUnitContext): Promise<"
|
|||
}
|
||||
}
|
||||
|
||||
// Step mode → show wizard instead of dispatch
|
||||
// Step mode → show wizard instead of dispatch.
|
||||
// Without this notify(), /gsd in step mode finishes a unit and silently
|
||||
// exits the loop, leaving the user with no hint to /clear and /gsd again.
|
||||
if (s.stepMode) {
|
||||
try {
|
||||
const nextState = await deriveState(s.basePath);
|
||||
if (nextState.phase === "complete") {
|
||||
ctx.ui.notify(
|
||||
"Step complete — milestone finished. Run /gsd status to review, or start the next milestone.",
|
||||
"info",
|
||||
);
|
||||
} else {
|
||||
const next = describeNextUnit(nextState);
|
||||
ctx.ui.notify(
|
||||
`Step complete. Next: ${next.label}\n`
|
||||
+ `Run /clear, then /gsd to continue (or /gsd auto to run continuously).`,
|
||||
"info",
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
debugLog("postUnit", { phase: "step-wizard-notify", error: String(e) });
|
||||
ctx.ui.notify(
|
||||
"Step complete. Run /clear, then /gsd to continue (or /gsd auto to run continuously).",
|
||||
"info",
|
||||
);
|
||||
}
|
||||
return "step-wizard";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue