Repository navigation
Avoid edge cases that lead to incorrect progress values in the UI - #685
Conversation
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
📝 WalkthroughWalkthroughTask updates in Priority: ➖ Normal Severity of issue fixed: Low Merge Risk: 🔵 Low · up to Progress can still display above the requested 99% maximum. Correct the cap before merging, or accept this bounded display discrepancy. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
773a76a5-b49d-4f04-a502-2c59de745529
📒 Files selected for processing (3)
src/assistant.jssrc/components/RunningEmptyContent.vuesrc/views/AssistantPage.vue
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
| if (!Number.isFinite(fraction)) { | ||
| return null | ||
| } | ||
| return Math.min(Math.max(fraction, 0), 0.9999) * 100 |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Cap displayed progress at 99%.
When the backend reports a fraction of 1, this cap produces 99.99%. formattedProgress then displays 99.99 %, which exceeds the requested 0%–99% range. Cap the fraction at 0.99 instead.
kyteinsky
left a comment
There was a problem hiding this comment.
did not test but looks good!
closes #682
Sanitize and unify task progress display.
🤖 AI (if applicable)