feat(init): built-in diff viewer and auto-commit with --yes
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- cli
Direzione di ricerca
Inizia da formatResult() e buildSummaryLines() in src/lib/init/formatters.ts, quindi segui WizardOptions.yes e ApplyPatchsetPayload in src/lib/init/types.ts attraverso src/lib/init/wizard-runner.ts. Verifica come il wizard visualizza attualmente i riepiloghi e gestisce --yes. Il lavoro è completato quando i file sottoposti a patch mostrano diff unificati colorati, --yes esegue il commit successivamente e la modalità interattiva mantiene la richiesta di revisione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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()insrc/lib/init/formatters.tsbuilds a summary of changed files (create/modify/delete) viabuildSummaryLines()and displays it withnote()- A static
log.info("Please review the changes above before committing.")message follows - The
--yesflag auto-selects prompts and confirms but does not commit the resulting changes - Full patch data (including diffs) is available in
ApplyPatchsetPayloadbut 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
--yesis set, auto-commit the changes after displaying the diff summary (skip the "please review" message) - When
--yesis not set, show the diff and keep the existing review prompt
References
src/lib/init/formatters.ts—formatResult()andbuildSummaryLines()src/lib/init/types.ts—WizardOptions.yesandApplyPatchsetPayloadsrc/lib/init/wizard-runner.ts— wizard execution flow
Originated from a review comment by @BYK.
- Lingua principale
- TypeScript
- Stelle
- 121
- Fork
- 14
- Merge medio
- 23h 54m
- PR unite (30g)
- 103
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/cli
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
-
bug jared
-
jared
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
Tutte le issue di getsentry/cli
Issue simili
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Mend: dependency security vulnerability untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100