Repository navigation
fix(home): round Current Coverage KPI to 1 decimal place - #980
Conversation
|
@coderabbitai review |
|
Warning Review limit reached
More reviews will be available in 6 minutes and 35 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Action performedReview finished.
|
Raw float values (e.g. 72.3456789012%) caused the KPI tile to overflow its box at narrower screen widths. Apply .toFixed(1) to match the coverage formatting used throughout the app (inventory.ts overall_coverage_pct, coverage_pct, and all other percentage KPIs). Only display formatting is changed; the underlying data is untouched. Adds two regression tests asserting the bounded precision. Closes #978
094466d to
76f5bb5
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Verification note: the one-decimal Current Coverage fix for #978 already landed on base via commit 92db4e7 ("fix(home/kpi): format Current Coverage / Target with one decimal (#967)"), which is this PR's merge-base. The diff here is a behavioral no-op (only comments + regression tests; the |
Summary
72.3456789012%), which can overflow the tile box at narrower screen widths..toFixed(1)to match the 1-decimal-place format used for every other coverage percentage in the app (inventory.tslines 388 and 438, recommendations sparklines, etc.).Closes #978
Files changed
frontend/src/dashboard.ts— one-line fix on thecoverageValueinterpolationfrontend/src/__tests__/dashboard.test.ts— two regression tests: long-fractional input renders72.3%; integer input renders70.0%Test plan
#978: Current Coverage KPI rounds to 1 decimal place— asserts72.3456789012renders as72.3%#978: integer Current Coverage KPI renders with one decimal place— asserts70renders as70.0%npx tsc --noEmit— no type errorsSKIP=terraform_validate pre-commit run --all-files— all hooks pass