feat(init): built-in diff viewer and auto-commit with --yes
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Start with formatResult() and buildSummaryLines() in src/lib/init/formatters.ts, then trace WizardOptions.yes and ApplyPatchsetPayload in src/lib/init/types.ts through src/lib/init/wizard-runner.ts. Confirm how the wizard exposes patch data and handles --yes. Done means applied diffs are shown, --yes commits after the summary, and interactive mode retains the review prompt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 938
- Fork
- 166
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 175
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/toolkit
-
bug MCP
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
getsentry/toolkit#1621 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug MCP
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
getsentry/toolkit#1618 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs MCP tool failures omit isErrorCó thể đã có người làm @thomasjiangcy đã nhận hôm nay. Đang mởbug MCP
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
getsentry/toolkit#1600 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
getsentry/toolkit#1471 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CLI: Centralize target specs and lint free-text examples in fullDescriptionCó thể đã có người làm @sentry-junior đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
getsentry/toolkit#1649 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của getsentry/toolkit
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
farion1231/cc-switch#8829 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[core-client] Remove unused hand-maintained transport helpers after the definition-table cutoverĐang mởdoc-audit enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100