fix(cli): don't round issues-list bounty fill % up to (100%)#1605
Open
davion-knight wants to merge 1 commit into
Open
fix(cli): don't round issues-list bounty fill % up to (100%)#1605davion-knight wants to merge 1 commit into
davion-knight wants to merge 1 commit into
Conversation
Contributor
Author
|
@anderdc @LandynDev small CLI correctness fix — the |
The all-issues table in `gitt issues list` formatted the bounty fill
percentage with `{fill_pct:.0f}%`, which rounds. A bounty funded to
99.5-99.99% therefore rendered as `(100%)` next to a `Registered` status
— a self-contradiction, since an issue only flips to `Active` at a true
100% — and a tiny nonzero fill rendered as `(0%)`.
Use `.1f`, matching the single-issue Panel view (view.py:141) which
already formats the same value with one decimal.
Add a regression test asserting the table shows the fractional percentage
(99.6% / 0.3%) and never `(100%)` for a partially-funded bounty.
157d2d3 to
28a7416
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The all-issues table in
gitt issues listformatted the bounty fill percentage with{fill_pct:.0f}%, which rounds. A bounty funded to 99.5–99.99% therefore rendered as(100%)right next to aRegisteredstatus — a self-contradiction, since an issue only flips toActiveat a true 100% (fill_pct >= 100is a separate branch). A tiny nonzero fill likewise rendered as(0%).The fix uses
.1f, matching the single-issue Panel view (view.py:141) which already formats the same value with one decimal.Before / after —
gitt issues listBefore (two partially-funded bounties):
After:
Related Issues
None.
Type of Change
Testing
test_issues_list_table_fill_percent_is_not_roundedrenders the real command viaCliRunnerand asserts the table shows the fractional percentage (99.6%/0.3%) and never(100%)for a partially-funded bounty. Fails ontestbefore the fix, passes after.ruff+pyrightclean.Checklist