ux(recommendations): add SageMaker to Service filter dropdown#92
ux(recommendations): add SageMaker to Service filter dropdown#92cristim wants to merge 1 commit intofeat/multicloud-web-frontendfrom
Conversation
The AWS recommendations parser emits `sagemaker` as a distinct service (see providers/aws/recommendations/parser_sp.go:153, mapping to SagemakerSp), but the Recommendations page Service filter dropdown omitted it — users could see SageMaker recommendations in the unfiltered list but could not narrow to them. Adds `<option value="sagemaker">SageMaker</option>` under the AWS optgroup in the static `<select id="service-filter">`, alphabetically positioned between `redshift` and `savingsplans`. The option participates automatically in provider-based show/hide via the existing `updateServiceFilterVisibility` (it iterates optgroups, no per-option wiring needed). Lambda is intentionally NOT added in this PR: - The AWS recommendations parser does not emit `service=lambda`. Lambda commitments are surfaced under the existing `savingsplans` (Compute Savings Plans) umbrella, which the dropdown already exposes. - SageMaker Savings Plans is a distinct AWS product from Compute Savings Plans (different commitment scope + pricing), which is why SageMaker warrants its own filter value while Lambda does not. - This decision is correct under both possible resolutions of the still-open PR #71 (separate purchasing-defaults cards) and the already-merged PR #53 (Savings Plans is the umbrella for SM/Lambda). Adds a regression test in `frontend/src/__tests__/html.test.ts` that parses the real index.html and asserts SageMaker is present under the AWS optgroup, alongside the existing optgroup-presence test. Verification: - `npx jest` — 1252/1252 pass across 35 suites - `npx tsc --noEmit` — clean - `npm run build` — webpack production build succeeds Closes #77
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 32 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ 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)
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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Merge conflict detected ( |
Summary
Closes #77.
The Recommendations page Service filter dropdown is missing SageMaker, even though the AWS recommendations parser emits
service=sagemaker(seeproviders/aws/recommendations/parser_sp.go:153, mapping toSagemakerSp). Users could see SageMaker recommendations in the unfiltered list but could not narrow to them.Changes
frontend/src/index.html: Adds<option value="sagemaker">SageMaker</option>under the existing<select id="service-filter">AWS optgroup, alphabetically positioned betweenredshiftandsavingsplans.frontend/src/__tests__/html.test.ts: Regression test that parses the realindex.htmland asserts SageMaker is present under the AWS optgroup. Sits alongside the existing optgroup-presence test for the same dropdown.The new option participates automatically in provider-based show/hide via the existing
updateServiceFilterVisibility(recommendations.ts:87) — it iterates optgroups, no per-option wiring needed.Why SageMaker only (not Lambda)
service=lambda. Lambda commitments are surfaced under the existingsavingsplans(Compute Savings Plans) umbrella, which the dropdown already exposes.service=lambda, adding the option is a one-line follow-up.Test plan
npx jest— 1252/1252 pass across 35 suitesnpx jest src/__tests__/html.test.ts— 95/95 pass (including the new sagemaker test)npx tsc --noEmit— cleannpm run build— webpack production build succeedsmerge-watchafter CI deploy.)Out of scope