fix: show progress for small goal completion - #3507
PhanisrideepthiThota wants to merge 2 commits into
Conversation
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Secrets | Aug 31, 2026 7:56p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
|
|
After merging upstream/main into my branch as requested, the latest CI run is failing in existing GoalTracker tests. The Type Check reports that test/GoalTracker.test.ts imports useGoalTracker, but the current src/components/GoalTracker.tsx from upstream no longer exports that hook. The E2E check also fails because the existing GoalTracker E2E test expects a Create goal button that is not present in the current upstream component. My actual change is limited to the progress percentage calculation for non-zero progress. Could you please confirm whether these are known upstream/main CI issues or whether you want me to address them as part of this PR? |
|
I investigated the current Type Check failure. test/GoalTracker.test.ts imports useGoalTracker from @/components/GoalTracker, but the current src/components/GoalTracker.tsx only exports the default GoalTracker component and no longer exports useGoalTracker. This mismatch is present in the current upstream code as well, so I have not modified the test/component because it is unrelated to issue #1895. The progress calculation fix itself is preserved in this PR. |
|
Hi @Priyanshu-byte-coder,The fix for #1895 is complete. I also identified the cause of the Type Check failure, but it originates from an existing upstream mismatch unrelated to this change. There’s nothing more to alter on my side unless you want otherwise. |




Summary
Fixed the GoalTracker progress calculation so goals with non-zero progress do not incorrectly display 0%.
Closes #1895
Type of Change
What Changed
src/components/GoalTracker.tsx.How to Test
Expected result:
Goals with
actual > 0should display at least 1% progress, while goals withactual === 0should display 0%.Screenshots / Recordings
Checklist
console.log, debug code, or commented-out blocksnpm run lintpasses locallynpm run type-check)Accessibility (UI changes only)
Additional Context
The fix follows the acceptance criteria in issue #1895: 0% should only be shown when there is no progress.