Skip to content

fix(bounty-sidebar): restrict completion rate denominator to terminal bounties#1007

Open
blinkeye-lcm wants to merge 1 commit intoentrius:testfrom
blinkeye-lcm:fix/bounty-completion-rate-denominator
Open

fix(bounty-sidebar): restrict completion rate denominator to terminal bounties#1007
blinkeye-lcm wants to merge 1 commit intoentrius:testfrom
blinkeye-lcm:fix/bounty-completion-rate-denominator

Conversation

@blinkeye-lcm
Copy link
Copy Markdown

Summary

The Completion Rate donut on /bounties was computing its center percentage as completed / (registered + active + completed + cancelled). Counting queued and in-progress bounties in the denominator pulled the displayed rate down whenever the network had a healthy backlog, even when nearly every finished bounty had completed successfully.

This change restricts the denominator to terminal states (completed + cancelled), so the headline number now reflects the share of resolved bounties that completed rather than the share of all bounties that have already completed. When no bounty has resolved yet, the center renders a neutral placeholder instead of a misleading 0%. The donut wedges and the Total Bounties row still show all four status buckets, so backlog visibility is unchanged. The existing rateColor thresholds (50 and 80) stay meaningful since they were calibrated against a true success rate.

Related Issues

Fixes #1006

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Screenshots

after

Checklist

  • New components are modularized/separated where sensible
  • Uses predefined theme (e.g. no hardcoded colors)
  • Responsive/mobile checked
  • Tested against the test API
  • npm run format and npm run lint:fix have been run
  • npm run build passes
  • Screenshots included for any UI/visual changes

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 9, 2026
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.

Completion Rate donut counts in-flight bounties in its denominator

1 participant