Repository navigation
fix(opportunities): KPI counts variants to match 'Showing X of X' - #756
Conversation
…ount The KPI counted parent-row services (6) while the "Showing of" line counted variants (23) on the same dataset. Users see big mismatched numbers and assume something is wrong. Both now count variants. Closes #748.
|
Warning Review limit reached
More reviews will be available in 22 minutes and 51 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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
Summary
Opportunities page showed two recommendation counts that disagreed:
Total Recommendations: 6Showing 23 of 23 recommendationsSame dataset, no filter. Users saw
6and23 of 23two lines apart and assumed something was off.Root cause
The KPI used
plr.cellCount-- the number of unique service/region/resource-type groups -- while the "Showing of" used the rawrecommendations.length(variants).Decision: count variants, not parent cells
Each variant is one purchasable option, which is what users act on. The financial cards (savings range, upfront, payback) correctly remain cell-aggregated (they are per-cell decisions).
Fix
renderRecommendationsSummary:plr.cellCount->target.lengthplr.cellCount > 0->target.length > 0(renamed tohasRecs)Files changed
frontend/src/recommendations.tsfrontend/src/__tests__/recommendations.test.tsTest plan
'2'(cells) to'4'(variants) on the 2-cell/4-variant fixture.kpiValue === showingLoadedon a 2-cell/4-variant dataset.Closes #748.