Skip to content

[BUG] GoalTracker shows 0% progress for goals with fractional completion < 0.5% #1895

Description

@Priyanshu-byte-coder

Describe the bug

The GoalTracker progress bar uses Math.round() to display progress percentage. For goals where actual / target < 0.005, this rounds down to 0% even if there has been some activity, which is demotivating.

Expected behaviour

Use Math.ceil() (or show one decimal place) for fractional progress so users can see any positive progress.

Suggested fix

In src/components/GoalTracker.tsx (or wherever progress % is calculated):

// Before
const pct = Math.round((actual / target) * 100);
// After
const pct = actual > 0 ? Math.max(1, Math.round((actual / target) * 100)) : 0;

Acceptance criteria

  • Goals with any non-zero progress show at least 1%
  • 0% is only shown when actual === 0

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomersgssoc26GSSoC 2026 contributiongssoc:assignedGSSoC: Issue assigned to a contributorlevel:beginnerGSSoC: Beginner difficulty (20 pts)type:bugGSSoC type bonus: bug fix

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions