Summary
After the init wizard applies file changes, the CLI prints a static message — "Please review the changes above before committing." — but doesn't actually show the diffs. Users have to manually inspect the working tree to understand what changed. Additionally, when running with --yes (non-interactive mode), the wizard still stops without committing, requiring manual intervention.
This issue proposes two improvements:
- Built-in diff viewer — display inline diffs of all applied patches so users can review changes without leaving the terminal
- Auto-commit with
--yes — when the user opts into non-interactive mode, automatically commit the wizard's changes after displaying the diff summary
Current Behavior
formatResult() in src/lib/init/formatters.ts builds a summary of changed files (create/modify/delete) via buildSummaryLines() and displays it with note()
- A static
log.info("Please review the changes above before committing.") message follows
- The
--yes flag auto-selects prompts and confirms but does not commit the resulting changes
- Full patch data (including diffs) is available in
ApplyPatchsetPayload but is not surfaced to the user
Proposed Behavior
- After the wizard completes, render a colored unified diff of each patched file (using the patch data already available in
ApplyPatchsetPayload)
- When
--yes is set, auto-commit the changes after displaying the diff summary (skip the "please review" message)
- When
--yes is not set, show the diff and keep the existing review prompt
References
src/lib/init/formatters.ts — formatResult() and buildSummaryLines()
src/lib/init/types.ts — WizardOptions.yes and ApplyPatchsetPayload
src/lib/init/wizard-runner.ts — wizard execution flow
Originated from a review comment by @BYK.
Summary
After the init wizard applies file changes, the CLI prints a static message —
"Please review the changes above before committing."— but doesn't actually show the diffs. Users have to manually inspect the working tree to understand what changed. Additionally, when running with--yes(non-interactive mode), the wizard still stops without committing, requiring manual intervention.This issue proposes two improvements:
--yes— when the user opts into non-interactive mode, automatically commit the wizard's changes after displaying the diff summaryCurrent Behavior
formatResult()insrc/lib/init/formatters.tsbuilds a summary of changed files (create/modify/delete) viabuildSummaryLines()and displays it withnote()log.info("Please review the changes above before committing.")message follows--yesflag auto-selects prompts and confirms but does not commit the resulting changesApplyPatchsetPayloadbut is not surfaced to the userProposed Behavior
ApplyPatchsetPayload)--yesis set, auto-commit the changes after displaying the diff summary (skip the "please review" message)--yesis not set, show the diff and keep the existing review promptReferences
src/lib/init/formatters.ts—formatResult()andbuildSummaryLines()src/lib/init/types.ts—WizardOptions.yesandApplyPatchsetPayloadsrc/lib/init/wizard-runner.ts— wizard execution flowOriginated from a review comment by @BYK.