Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

The buzz view and buzz review commands displayed different subsets of goal information. Users viewing goals via either command saw incomplete data.

Changes

buzz view additions:

  • Deadline (formatted timestamp)
  • Due time (time of day)
  • Rate (conditional display)

buzz review additions:

  • Fine print (conditional display)
  • URL

Both commands now display identical goal information in consistent order:

Title:       My Goal
Fine print:  Detailed description (if exists)
Limsum:      +5 in 2 days
Deadline:    Mon Jan 15, 2024 at 3:00 PM MST
Due time:    3:00 PM
Pledge:      $10.00
Rate:        5 pushups / day (if set)
Autodata:    api/gmail
Autoratchet: 7 (if set)
URL:         https://www.beeminder.com/user/goal

Reuses existing formatRate() and formatDueTime() helpers from review.go (same package).

Original prompt

Lets combine buzz view and buzz review view code under the hood so both commands display all the information


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 10, 2025

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.

Copilot AI and others added 2 commits December 10, 2025 14:51
- Add Deadline, Due time, and Rate to buzz view command
- Add Fine print and URL to buzz review command
- Both commands now display all available goal information

Co-authored-by: narthur <[email protected]>
- Add test for Fine print display in review
- Add test for URL display in review
- Add test to verify Fine print is not shown when empty
- All new tests pass successfully

Co-authored-by: narthur <[email protected]>
Copilot AI changed the title [WIP] Combine buzz view and buzz review code functionality feat: unify buzz view and buzz review display fields Dec 10, 2025
Copilot AI requested a review from narthur December 10, 2025 14:58
@narthur
Copy link
Collaborator

narthur commented Dec 10, 2025

@copilot I would like both commands to use the same code to generate the goal details displayed. This way we don't have to worry about keeping both in sync.

Copilot stopped work on behalf of narthur due to an error December 10, 2025 14:58
- Create formatGoalDetails function in review.go
- Both buzz view and buzz review now use the same code
- Removes code duplication and ensures consistency
- Remove unused net/url import from main.go

Co-authored-by: narthur <[email protected]>
@narthur narthur marked this pull request as ready for review December 10, 2025 15:59
Copilot AI review requested due to automatic review settings December 10, 2025 15:59
@github-actions
Copy link

github-actions bot commented Dec 10, 2025

🚀 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-192-latest buzz-pr-192
# Run the pre-release
buzz-pr-192
# Uninstall the pre-release
bin remove buzz-pr-192

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 successfully unifies the display logic for buzz view and buzz review commands by extracting shared functionality into a new formatGoalDetails() function. Both commands now display identical, comprehensive goal information.

  • Extracted display logic into formatGoalDetails() function in review.go
  • Enhanced buzz view with deadline, due time, and rate fields (previously only in review)
  • Enhanced buzz review with fine print and URL fields (previously only in view)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
review.go Added formatGoalDetails() function to centralize goal display formatting; refactored reviewModel.View() to use the new function
main.go Refactored handleViewCommand() to use formatGoalDetails(); removed unused net/url import
review_test.go Added comprehensive tests for new fields (fine print presence/absence, URL display)

}

details += fmt.Sprintf("Limsum: %s\n", goal.Limsum)

Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

Trailing whitespace detected. Remove the space(s) at the end of this line.

Copilot uses AI. Check for mistakes.
// Display deadline (formatted timestamp)
deadlineTime := time.Unix(goal.Losedate, 0)
details += fmt.Sprintf("Deadline: %s\n", deadlineTime.Format("Mon Jan 2, 2006 at 3:04 PM MST"))

Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

Trailing whitespace detected. Remove the space(s) at the end of this line.

Copilot uses AI. Check for mistakes.

// Display due time (time of day)
details += fmt.Sprintf("Due time: %s\n", formatDueTime(goal.Deadline))

Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

Trailing whitespace detected. Remove the space(s) at the end of this line.

Suggested change

Copilot uses AI. Check for mistakes.
@narthur narthur merged commit 82cb0bf into main Dec 10, 2025
2 checks passed
@narthur narthur deleted the copilot/combine-buzz-view-review branch December 10, 2025 16:17
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.

2 participants