Repository navigation
feat(frontend/recs): render Azure Savings Plans rows + column visibility - #723
Conversation
Azure SP recs use service="savingsplans" (no hyphen), matching the Go
common.ServiceSavingsPlans constant. The previous isSavingsPlanService
predicate only matched startsWith('savings-plans'), so Azure SP rows
were silently excluded from the service-column "All Savings Plans" group
toggle and the bulk-buy SP bucket collapse.
- Extend isSavingsPlanService to also match the exact slug "savingsplans",
mirroring Go's IsSavingsPlan equality check for the umbrella constant.
- Introduce UMBRELLA_SLUGS to unify the "skip in bucket label" guard for
both "savings-plans" (bucket key) and "savingsplans" (Azure SP / legacy
AWS umbrella); label falls back to "Savings Plans" for both.
- Add tests: isSavingsPlanService recognises "savingsplans"; bucket label
skips it gracefully; Azure SP rows appear in the rendered table; the
All Savings Plans tri-state toggle includes "savingsplans" slugs; Azure
SP bulk-buy bucketing uses the canonical SAVINGS_PLANS_BUCKET_KEY.
Closes #658
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR extends the frontend recommendations table to surface Azure Savings Plans rows alongside AWS Savings Plans. Core logic in ChangesAzure Savings Plans Frontend Integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Closes #658.
Root cause
isSavingsPlanServiceinfrontend/src/lib/purchase-compatibility.tsmatchedstartsWith('savings-plans')only. The Azure SP client (providers/azure/services/savingsplans/client.go) reportsservice = "savingsplans"(no hyphen), identical to Go'scommon.ServiceSavingsPlansumbrella constant. Go'sIsSavingsPlanhandles this with an explicit equality check (string(s) == "savingsplans"); the frontend did not mirror it, so:'savings-plans'bulk-buy bucket — they got their own'savingsplans'bucket key, breaking the one-bucket SP experience.Fix
isSavingsPlanServiceto match both'savings-plans'and'savingsplans'.UMBRELLA_SLUGSset to unify the 'skip in label' guard for both spellings.savingsPlansBucketLabelfalls back gracefully to'Savings Plans'for Azure SP buckets.Tests
purchase-compatibility.test.ts(Azure SP slug recognition)recommendations.test.ts(Azure SP rows appear; SP group toggle includessavingsplansslugs; bulk-buy bucketing uses canonical SP bucket key)Summary by CodeRabbit
New Features
Bug Fixes