feat: hide empty fields in buzz review and buzz view output#211
feat: hide empty fields in buzz review and buzz view output#211
Conversation
Co-authored-by: narthur <4655422+narthur@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
🚀 Pre-release Build ReadyTest builds are ready! Install directly using the # Install the pre-release
bin install https://github.com/PinePeakDigital/buzz/releases/tag/pr-211-latest buzz-pr-211# Run the pre-release
buzz-pr-211# Uninstall the pre-release
bin remove buzz-pr-211Direct Download LinksOr download binaries directly from the pre-release page:
|
There was a problem hiding this comment.
Pull request overview
This PR improves the output readability of buzz review and buzz view commands by conditionally displaying Title and Autodata fields only when they contain values, preventing empty fields from cluttering the output.
Changes:
- Modified
formatGoalDetails()function to hide Title and Autodata fields when empty - Added three test cases to verify empty/non-empty field behavior for Title and Autodata
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| review.go | Added conditional checks for Title (lines 228-230) and Autodata (lines 249-251) to display only when non-empty, following the existing pattern used for Rate, Autoratchet, and Fineprint |
| review_test.go | Added tests to verify empty Title is hidden (lines 614-639), empty Autodata is hidden (lines 642-668), and non-empty Autodata is displayed (lines 671-698) |
Co-authored-by: narthur <4655422+narthur@users.noreply.github.com>
Plan: Hide empty fields in buzz review and buzz view output
formatGoalDetails()to hide Title field when emptyformatGoalDetails()to hide Autodata field when emptyImplementation Summary
Successfully implemented the feature to hide empty fields in
buzz reviewandbuzz viewoutput:Changes Made
review.go: ModifiedformatGoalDetails()function to conditionally show:Tests Added
TestReviewModelViewWithTitle- verifies non-empty title is shownTestReviewModelViewWithEmptyTitle- verifies empty title is not shownTestReviewModelViewWithEmptyAutodata- verifies empty autodata is not shownTestReviewModelViewWithAutodata- verifies autodata is shown when presentVerification
✅ All existing tests pass (100% pass rate)
✅ Symmetric test coverage for both Title and Autodata fields
✅ New tests pass and verify correct behavior
✅ Manual testing confirmed proper output formatting
✅ Code review passed with no issues
✅ Security scan passed with no vulnerabilities
The implementation follows the existing pattern used for Rate, Autoratchet, and Fineprint fields which are already conditionally displayed.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Note
Reduces clutter in review/view output by omitting empty fields.
formatGoalDetailsto only includeTitleandAutodatawhen non-empty, aligning with existing optional fields likeRate,Autoratchet, andFine printTitle/Autodataare hidden when empty and shown when set, and preservesURLbeforeFine printorderingWritten by Cursor Bugbot for commit cf2e8f1. This will update automatically on new commits. Configure here.