-
Notifications
You must be signed in to change notification settings - Fork 0
feat: unify buzz view and buzz review display fields #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
- 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 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. |
- 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]>
🚀 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-192-latest buzz-pr-192# Run the pre-release
buzz-pr-192# Uninstall the pre-release
bin remove buzz-pr-192Direct Download LinksOr download binaries directly from the pre-release page:
|
There was a problem hiding this 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 inreview.go - Enhanced
buzz viewwith deadline, due time, and rate fields (previously only in review) - Enhanced
buzz reviewwith 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) | ||
|
|
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
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.
| // 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")) | ||
|
|
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
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.
|
|
||
| // Display due time (time of day) | ||
| details += fmt.Sprintf("Due time: %s\n", formatDueTime(goal.Deadline)) | ||
|
|
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
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.
The
buzz viewandbuzz reviewcommands displayed different subsets of goal information. Users viewing goals via either command saw incomplete data.Changes
buzz viewadditions:buzz reviewadditions:Both commands now display identical goal information in consistent order:
Reuses existing
formatRate()andformatDueTime()helpers fromreview.go(same package).Original prompt
💡 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.