Skip to content

ux(settings): clarify Savings Plans card covers SageMaker + Lambda (#22)#53

Merged
cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/savingsplans-card-coverage-label
Apr 25, 2026
Merged

ux(settings): clarify Savings Plans card covers SageMaker + Lambda (#22)#53
cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/savingsplans-card-coverage-label

Conversation

@cristim
Copy link
Copy Markdown
Member

@cristim cristim commented Apr 24, 2026

Summary

Closes #22.

The "Compute Savings Plans" card in Settings → Purchasing actually drives defaults for all four Savings Plans types that providers/aws/recommendations/parser_sp.go fetches on every collection:

  • ComputeSp — covers EC2, Fargate, Lambda
  • Ec2InstanceSp — specific EC2 instance families
  • SagemakerSpSageMaker
  • DatabaseSp — RDS

All four share the same term/payment vocabulary at the AWS API, so the UI intentionally exposes a single card rather than four near-identical rows. The old header "Compute Savings Plans" made that invisible to the reporter, who reasonably concluded SageMaker and Lambda had no purchasing defaults.

Change

  • Rename the card header from Compute Savings PlansSavings Plans.
  • Add a small hint beneath the header listing the covered services: "Compute (EC2, Fargate, Lambda), EC2 Instance, SageMaker, and Database (RDS) plans share these defaults."
  • Add a scoped .service-default-hint CSS rule in styles/settings.css.

Why not separate Lambda / SageMaker cards (as the issue originally proposed):

  • Lambda: no Lambda-specific reserved product exists; Lambda usage only buys Compute SP. A separate "Lambda" row would be misleading.
  • SageMaker: shares the exact same 1yr/3yr × upfront/partial/no-upfront vocabulary as the existing card, so a distinct row adds no real configurability. Per-plan-type defaults would require ServiceConfig plumbing, a DB migration, and scheduler/UI changes — out of scope for a documentation fix and unwarranted without evidence users have divergent preferences per plan type.

IDs aws-savingsplans-term and aws-savingsplans-payment are preserved, so settings.ts wiring and the existing save/load paths are unchanged.

Test plan

  • npm run build (frontend) — clean webpack production build
  • npm test (frontend) — 1242/1242 tests pass across 35 suites
  • Card IDs unchanged → settings.ts wiring, settings.test.ts coverage, and the save/reset bar continue to work
  • CSS rule scoped to .service-default-card .service-default-hint so it can't bleed into other cards

Screenshot

(Text-only label tweak; the new hint renders as a single muted subtitle line immediately under the card title, above the Term/Payment selects.)

The "Compute Savings Plans" card in Settings → Purchasing actually
governs defaults for all four SavingsPlansType values fetched by
providers/aws/recommendations/parser_sp.go: ComputeSp (covers EC2,
Fargate, Lambda), Ec2InstanceSp, SagemakerSp, and DatabaseSp. Users
reported SageMaker and Lambda looked unrepresented in settings.

Rename the card header to "Savings Plans" and add a small hint line
listing the covered services, so the coverage is self-documenting.
No extra cards are added: a Lambda-specific card would be misleading
(Lambda SPs do not exist as a standalone product — Lambda usage is
covered by Compute SP), and SageMaker SPs share the same term/payment
knobs as the other types. The underlying aws-savingsplans-term and
aws-savingsplans-payment inputs keep the same IDs so settings wiring
and the existing save/load paths are unchanged.
@cristim
Copy link
Copy Markdown
Member Author

cristim commented Apr 24, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

Warning

Rate limit exceeded

@cristim has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 45 minutes and 7 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 45 minutes and 7 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: efb6888e-8c05-43a4-bb64-f22dd726137e

📥 Commits

Reviewing files that changed from the base of the PR and between 1a84b65 and 00e7ae4.

📒 Files selected for processing (2)
  • frontend/src/index.html
  • frontend/src/styles/settings.css
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/savingsplans-card-coverage-label

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 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
Copy link
Copy Markdown
Member Author

cristim commented Apr 24, 2026

AWS Sanity (Read-only Dry Run) passed on commit 00e7ae4. All checks green.

@cristim
Copy link
Copy Markdown
Member Author

cristim commented Apr 24, 2026

Azure Sanity (Read-only Dry Run) passed on commit 00e7ae460. ✓

@cristim cristim merged commit cf5b309 into feat/multicloud-web-frontend Apr 25, 2026
3 checks passed
@cristim cristim added triaged Item has been triaged priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/eventually No deadline impact/few Limited audience effort/xs Trivial / one-liner type/feat New capability labels Apr 28, 2026
@cristim cristim deleted the fix/savingsplans-card-coverage-label branch April 29, 2026 10:07
cristim added a commit that referenced this pull request Apr 30, 2026
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
cristim added a commit that referenced this pull request Apr 30, 2026
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
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/few Limited audience priority/p3 Polish / idea / may never ship severity/low Minor harm triaged Item has been triaged type/feat New capability urgency/eventually No deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant