Skip to content

feat(review): reorder single-goal details display (#229)#285

Merged
narthur merged 2 commits into
mainfrom
feat/reorder-goal-details
Jun 6, 2026
Merged

feat(review): reorder single-goal details display (#229)#285
narthur merged 2 commits into
mainfrom
feat/reorder-goal-details

Conversation

@narthur

@narthur narthur commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Reorders the per-goal field display in buzz review to the sequence requested in #229. Fresh implementation against current main (the prior Copilot draft #230 predates the recent review.go rework and no longer applies cleanly).

Screenshot

buzz review showing the new field order (Rate → Autoratchet → Limsum → Deadline → Due time → Pledge → Title → URL, then Autodata):

buzz review with reordered goal details

Order

Issue #229's preferred sequence, implemented exactly for the named fields:

Rate
Autoratchet
Limsum
Deadline
Due time
Pledge
Title
URL

Fields the issue didn't enumerate follow after, preserving that order: Autodata, Fine print, then recent datapoints. (Heads-up: this moves Autodata from mid-list down to the reference group — say the word if you'd rather it sit elsewhere.)

Rationale

Leads with the goal's commitment (rate, autoratchet), then urgency (limsum, deadline, due time), then stakes (pledge), then reference info (title, url).

Tests

  • TestGoalDetailsFieldOrder asserts the exact relative order of all labels.
  • Existing TestFineprintOrderInOutput still holds (fine print stays after URL).
  • Full suite, go vet, gofmt all clean.

Closes #229

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Improvements
    • Reorganized goal details display for clearer reading: rate and autoratchet now surface earlier, deadline and pledge remain grouped, with title, URL, and autodata shown afterward.
  • Tests
    • Added unit tests validating the new field ordering and ensuring optional fields are omitted when empty.

Reorder formatGoalDetails to lead with the goal's commitment (Rate,
Autoratchet), then urgency (Limsum, Deadline, Due time), then stakes
(Pledge), then reference (Title, URL) — matching the preferred order in
issue #229. Fields the issue didn't enumerate (Autodata, Fine print,
recent datapoints) follow, preserving that sequence. Add
TestGoalDetailsFieldOrder to lock the ordering in.

Closes #229

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 6, 2026 21:14
@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: PinePeakDigital/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: cdde63d0-befb-4d31-b13e-2ef3387ae5ae

📥 Commits

Reviewing files that changed from the base of the PR and between 847e8bc and d215f29.

📒 Files selected for processing (1)
  • review_test.go

📝 Walkthrough

Walkthrough

Reorders the field emission in formatGoalDetails: Rate and Autoratchet are emitted first, then limsum/deadline/pledge, followed by Title, URL, and Autodata. Adds two tests that assert labels appear (or are omitted) and that present labels follow the required relative ordering.

Changes

Goal Detail Field Ordering

Layer / File(s) Summary
Field order reorganization
review.go
Moves Rate and Autoratchet rendering earlier in formatGoalDetails, then relocates Title/URL/Autodata to after deadline and pledge sections, adjusting the mid-section emission order.
Field ordering validation tests
review_test.go
Adds TestGoalDetailsFieldOrder and TestGoalDetailsFieldOrderMinimal to verify that conditional labels are present/absent as expected and that the remaining labels appear in the specified relative order using string-index assertions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PinePeakDigital/buzz#153: Modifies formatGoalDetails Rate field formatting and display logic; this PR reorders the same Rate/Autoratchet fields within the output.
  • PinePeakDigital/buzz#282: Changes rate formatting and current-vs-end display logic in formatGoalDetails around the Rate/Autoratchet rendering; this PR reorders those same fields in the output.
  • PinePeakDigital/buzz#141: Modifies goal detail field rendering and ordering in formatGoalDetails, directly related to the buzz review UI field display.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(review): reorder single-goal details display' clearly and concisely summarizes the main change in the PR, which reorders fields in goal detail output.
Linked Issues check ✅ Passed The PR successfully implements the exact field reordering specified in #229: Rate, Autoratchet, Limsum, Deadline, Due time, Pledge, Title, URL, with tests validating both full and minimal field configurations.
Out of Scope Changes check ✅ Passed All changes are scoped to the field reordering requirement: modified formatGoalDetails logic and added comprehensive test coverage for the new ordering.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/reorder-goal-details

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

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

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the single-goal details rendering to match the field ordering requested in issue #229, affecting the shared formatGoalDetails output used by both buzz review and buzz view.

Changes:

  • Reordered the per-goal detail lines to: Rate → Autoratchet → Limsum → Deadline → Due time → Pledge → Title → URL, with Autodata/Fine print/recent datapoints following after.
  • Kept the existing rate formatting behavior (including current vs end rate display) while moving it to the top of the details section.
  • Added a regression test to lock in the intended label ordering.

Reviewed changes

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

File Description
review.go Reorders formatGoalDetails output fields to match issue #229’s preferred sequence.
review_test.go Adds TestGoalDetailsFieldOrder to assert the exact relative order of labels in the formatted output.

review-loop coverage finding (auto-applied, low-risk test-only):
TestGoalDetailsFieldOrderMinimal asserts the #229 field order is
preserved and Rate/Autoratchet/Title/Autodata/Fine print are omitted
when unset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@narthur narthur merged commit 4abc4a8 into main Jun 6, 2026
5 checks passed
@narthur narthur deleted the feat/reorder-goal-details branch June 6, 2026 21:28
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.

Change order of information display for a single goal

2 participants