Skip to content

ux(recommendations): add SageMaker to Service filter dropdown#92

Open
cristim wants to merge 1 commit intofeat/multicloud-web-frontendfrom
ux/rec-service-filter-sagemaker
Open

ux(recommendations): add SageMaker to Service filter dropdown#92
cristim wants to merge 1 commit intofeat/multicloud-web-frontendfrom
ux/rec-service-filter-sagemaker

Conversation

@cristim
Copy link
Copy Markdown
Member

@cristim cristim commented Apr 26, 2026

Summary

Closes #77.

The Recommendations page Service filter dropdown is missing SageMaker, even though the AWS recommendations parser emits service=sagemaker (see providers/aws/recommendations/parser_sp.go:153, mapping to SagemakerSp). 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 between redshift and savingsplans.
  • frontend/src/__tests__/html.test.ts: Regression test that parses the real index.html and 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)

Test plan

  • npx jest — 1252/1252 pass across 35 suites
  • npx jest src/__tests__/html.test.ts — 95/95 pass (including the new sagemaker test)
  • npx tsc --noEmit — clean
  • npm run build — webpack production build succeeds
  • Post-deploy: open Recommendations on the deployed dashboard, select AWS provider, confirm SageMaker appears in the Service dropdown. (Verified by merge-watch after CI deploy.)

Out of scope

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
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

Warning

Rate limit exceeded

@cristim has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 32 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 06ae296d-d435-4887-9a24-2482482d4658

📥 Commits

Reviewing files that changed from the base of the PR and between 2e33c88 and 9b30879.

📒 Files selected for processing (2)
  • frontend/src/__tests__/html.test.ts
  • frontend/src/index.html
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ux/rec-service-filter-sagemaker

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cristim
Copy link
Copy Markdown
Member Author

cristim commented Apr 26, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim cristim added triaged Item has been triaged priority/p2 Backlog-worthy severity/low Minor harm urgency/this-sprint Within the current sprint impact/many Affects most users effort/xs Trivial / one-liner type/bug Defect labels Apr 28, 2026
@cristim
Copy link
Copy Markdown
Member Author

cristim commented Apr 28, 2026

Merge conflict detected (mergeStateStatus: DIRTY) — rebase onto feat/multicloud-web-frontend needed. Otherwise ready: CI green, one-line fix for the missing SageMaker filter option that closes #77. (triage agent wave2-E)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/xs Trivial / one-liner impact/many Affects most users priority/p2 Backlog-worthy severity/low Minor harm triaged Item has been triaged type/bug Defect urgency/this-sprint Within the current sprint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant