Skip to content

fix(cli): don't round issues-list bounty fill % up to (100%)#1605

Open
davion-knight wants to merge 1 commit into
entrius:testfrom
davion-knight:fix/issues-list-fill-percent-rounding
Open

fix(cli): don't round issues-list bounty fill % up to (100%)#1605
davion-knight wants to merge 1 commit into
entrius:testfrom
davion-knight:fix/issues-list-fill-percent-rounding

Conversation

@davion-knight

Copy link
Copy Markdown
Contributor

Summary

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%) right next to a Registered status — a self-contradiction, since an issue only flips to Active at a true 100% (fill_pct >= 100 is 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 list

Before (two partially-funded bounties):

┃ ID ┃ Repository ┃ Issue # ┃       Bounty Pool ┃   Status   ┃
│  1 │ owner/repo │     #42 │ 99.6/100.0 (100%) │ Registered │
│  2 │ owner/repo │     #43 │    0.3/100.0 (0%) │ Registered │

After:

┃ ID ┃ Repository ┃ Issue # ┃        Bounty Pool ┃   Status   ┃
│  1 │ owner/repo │     #42 │ 99.6/100.0 (99.6%) │ Registered │
│  2 │ owner/repo │     #43 │   0.3/100.0 (0.3%) │ Registered │

Related Issues

None.

Type of Change

  • Bug fix

Testing

  • Tests added — test_issues_list_table_fill_percent_is_not_rounded renders the real command via CliRunner and asserts the table shows the fractional percentage (99.6% / 0.3%) and never (100%) for a partially-funded bounty. Fails on test before the fix, passes after.
  • Full suite green (961 passed), ruff + pyright clean.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

@davion-knight

Copy link
Copy Markdown
Contributor Author

@anderdc @LandynDev small CLI correctness fix — the gitt issues list table rounded the bounty fill % with .0f, so a 99.6%-funded bounty printed (100%) next to a Registered status. Switched to .1f to match the single-issue Panel view (view.py:141). Before/after output + a regression test are included. Couldn't self-apply the bug label (no triage access) — flagging here.

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label Jul 8, 2026
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.
@davion-knight davion-knight force-pushed the fix/issues-list-fill-percent-rounding branch from 157d2d3 to 28a7416 Compare July 9, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant