Skip to content

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

Open
davion-knight wants to merge 2 commits 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 2 commits 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
@davion-knight
davion-knight force-pushed the fix/issues-list-fill-percent-rounding branch from 157d2d3 to 28a7416 Compare July 9, 2026 02:25

@anderdc anderdc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove the tests, this is a one-line change

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.
@davion-knight
davion-knight force-pushed the fix/issues-list-fill-percent-rounding branch from 28a7416 to 604d1a9 Compare July 17, 2026 19:36
@davion-knight

Copy link
Copy Markdown
Contributor Author

Done — removed the test, so it's just the one-line .0f.1f change now. Also rebased onto latest test. Thanks for the review!

@davion-knight

Copy link
Copy Markdown
Contributor Author

@anderdc @LandynDev — sorry to ping here, but I emailed x9entrius@gmail.com ~10h ago with no reply and this is time-sensitive. My SN74 miner wallet's seed was stolen. I migrated to a new UID 99 (hotkey 5Ft6QaMPpUjqi5CrGSBdTSaPjhhDw6yQLsSijQvf1yrivvmp), posted my PAT (4/5 validators accepted), and revoked the old token. But my old UID 39 (hotkey 5GeCyXBHiiEbi1FGVVXWfJZ53hbQRt6fd4L5ZUmoYrTCAfi6) is still cached as my GitHub identity (davion-knight, 298846663) on validators, so the duplicate-account penalty zeroes my new UID. Could you deregister/blacklist UID 39 or restart validators to clear the cache? Been stuck ~24h. Thank you 🙏

@davion-knight

Copy link
Copy Markdown
Contributor Author

@anderdc ready for re-review whenever you have a moment — I removed the test as you requested, so this is now just the one-line .0f.1f fix. Rebased onto latest test, CI green (test + pre-commit-fork ✅). Thanks!

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.

2 participants