Skip to content

feat: hide empty fields in buzz review and buzz view output#211

Merged
narthur merged 3 commits intomainfrom
copilot/remove-empty-fields-buzz-review
Jan 20, 2026
Merged

feat: hide empty fields in buzz review and buzz view output#211
narthur merged 3 commits intomainfrom
copilot/remove-empty-fields-buzz-review

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Plan: Hide empty fields in buzz review and buzz view output

  • Modify formatGoalDetails() to hide Title field when empty
  • Modify formatGoalDetails() to hide Autodata field when empty
  • Add tests for empty Title field
  • Add tests for empty Autodata field
  • Add test for non-empty Title field (symmetric coverage)
  • Run existing tests to ensure no regressions
  • Manually test the changes with buzz view and buzz review commands
  • Code review passed - no issues found
  • CodeQL security scan passed - no vulnerabilities found

Implementation Summary

Successfully implemented the feature to hide empty fields in buzz review and buzz view output:

Changes Made

  • review.go: Modified formatGoalDetails() function to conditionally show:
    • Title field - only displayed when not empty
    • Autodata field - only displayed when not empty

Tests Added

  • TestReviewModelViewWithTitle - verifies non-empty title is shown
  • TestReviewModelViewWithEmptyTitle - verifies empty title is not shown
  • TestReviewModelViewWithEmptyAutodata - verifies empty autodata is not shown
  • TestReviewModelViewWithAutodata - verifies autodata is shown when present

Verification

✅ 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

don't show empty fields in buzz review and buzz view output (e.g. title, autodata, etc)


✨ 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.

  • Updates formatGoalDetails to only include Title and Autodata when non-empty, aligning with existing optional fields like Rate, Autoratchet, and Fine print
  • Adds tests ensuring Title/Autodata are hidden when empty and shown when set, and preserves URL before Fine print ordering

Written by Cursor Bugbot for commit cf2e8f1. This will update automatically on new commits. Configure here.

Co-authored-by: narthur <4655422+narthur@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove empty fields in buzz review and view output feat: hide empty fields in buzz review and buzz view output Jan 20, 2026
Copilot AI requested a review from narthur January 20, 2026 14:17
@narthur narthur marked this pull request as ready for review January 20, 2026 14:19
Copilot AI review requested due to automatic review settings January 20, 2026 14:19
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Jan 20, 2026

🚀 Pre-release Build Ready

Test builds are ready! Install directly using the bin command:

# 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-211

Direct Download Links

Or download binaries directly from the pre-release page:

💡 No GitHub login required for downloads!

🗑️ This pre-release will be automatically deleted when the PR is closed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copilot AI requested a review from narthur January 20, 2026 14:26
@narthur narthur merged commit 28e1f67 into main Jan 20, 2026
4 checks passed
@narthur narthur deleted the copilot/remove-empty-fields-buzz-review branch January 20, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants