Skip to content

fix(plans): show every service in multi-SP plan summary (closes #131)#156

Merged
cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/issue-131-multi-sp-summary
Apr 27, 2026
Merged

fix(plans): show every service in multi-SP plan summary (closes #131)#156
cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/issue-131-multi-sp-summary

Conversation

@cristim
Copy link
Copy Markdown
Member

@cristim cristim commented Apr 27, 2026

Summary

Closes #131.

PR #123 (per-plan-type Savings Plans split) gave a single plan up to four aws:savings-plans-<type> entries, but extractPlanInfo in frontend/src/plans.ts rendered only Object.values(services)[0] — hiding all but one. The pre-existing "Multiple" placeholder for >1 service was an unhelpful stub: operators looking at the card had no way to know which SP plan-types the plan covered.

Fix

Replace the "Multiple" branch with a comma-joined list of every service's label. SP slugs get an abbreviated label ("Compute SP", "SageMaker SP", "EC2 Instance SP", "Database SP") so a plan with all four still fits in the summary line. Non-SP slugs pass through unchanged so single-service plans render exactly as before (regression-safe).

Plan shape Before After
1 service (EC2) EC2 EC2 (unchanged)
2 SPs Multiple Compute SP, SageMaker SP
4 SPs Multiple Compute SP, EC2 Instance SP, SageMaker SP, Database SP
Mixed RI + SP Multiple EC2, Compute SP

Tests

  • multi-SP plan summary lists every plan-type covered (issue #131) — pins the new behaviour: Compute SP + SageMaker SP both appear, "Multiple" is gone.
  • single-service plan still renders one label (no regression) — pins the unchanged single-service path.

All 83 existing plan tests still pass.

Scope

Frontend-only. Backend unchanged.

🤖 Generated with claude-flow

… first

Closes #131.

PR #123 (per-plan-type Savings Plans split) gave a single plan up to four
`aws:savings-plans-<type>` entries, but `extractPlanInfo` in
`frontend/src/plans.ts` rendered only `Object.values(services)[0]` —
hiding all but one. The pre-existing "Multiple" placeholder for >1
service was an unhelpful stub: an operator looking at the card had no
way to know which SP plan-types the plan actually covered.

Fix: replace the "Multiple" branch with a comma-joined list of every
service's label. SP slugs get an abbreviated label ("Compute SP",
"SageMaker SP", "EC2 Instance SP", "Database SP") so a plan with all
four still fits in the summary line. Non-SP slugs pass through unchanged
so single-service plans render exactly as before (regression-safe).

Tests:
  - `multi-SP plan summary lists every plan-type covered (issue #131)`
    pins the new behaviour: a plan with Compute SP + SageMaker SP shows
    both labels and the old "Multiple" placeholder is gone.
  - `single-service plan still renders one label (no regression)`
    pins the unchanged single-service path.

Frontend-only change. Backend unchanged.
@cristim
Copy link
Copy Markdown
Member Author

cristim commented Apr 27, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 64824fe5-7121-423d-891d-b79fabab64f7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-131-multi-sp-summary

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

@cristim cristim merged commit 9b7531a into feat/multicloud-web-frontend Apr 27, 2026
3 checks passed
@cristim cristim added triaged Item has been triaged priority/p1 Next up; this sprint severity/high Significant harm urgency/now Drop other things impact/all-users Affects every user effort/s Hours type/bug Defect labels Apr 28, 2026
@cristim cristim deleted the fix/issue-131-multi-sp-summary branch April 29, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/s Hours impact/all-users Affects every user priority/p1 Next up; this sprint severity/high Significant harm triaged Item has been triaged type/bug Defect urgency/now Drop other things

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant