Skip to content

fix(frontend): offer a bound plan's providers in the plans provider filter - #1880

Merged
cristim merged 1 commit into
mainfrom
fix/1851-plans-provider-options
Nov 9, 2026
Merged

cristim merged 1 commit into
mainfrom
fix/1851-plans-provider-options

Conversation

@cristim

@cristim cristim commented Nov 9, 2026

Copy link
Copy Markdown
Member

Closes #1851

A bound plan (#1746) whose groups span providers is shown on its planned-purchase row as provider multiple, and lists its real providers in providers. The plans Provider column filter already matches a row on its provider or any of its providers (#1843), but its popover options came from provider alone. So multiple was offered as an option, and a provider that appears only inside a bound plan (for example gcp) was not, which left that plan impossible to filter to from the dropdown.

What

plansProviderOptions (frontend/src/plans.ts) builds the Provider column's options from each row's providers when it lists any, and from its single provider otherwise. openPlansColumnPopover uses it for the provider column only; every other column is unchanged.

Tests

provider options list a bound plan's providers, not "multiple" (frontend/src/__tests__/plans-column-filters.test.ts) seeds a bound row (multiple, providers aws and gcp), an unbound azure row, and a row with an empty providers array and its own provider oci, and expects the options aws, azure, gcp, oci. Four mutation probes each fail it: the old provider-only options, no single-provider fallback, no empty-providers guard, and a reversed sort.

Verification

  • The 13 tests in the suite pass, and eslint and tsc --noEmit are clean on the touched files.
  • Two independent review passes by the same reviewer found nothing blocking. It also traced a stale committed multiple filter: the trigger stays marked active, the popover shows every option unticked, and ticking (All) clears it, so nobody is stuck with an invisible filter.
  • No browser check: bound plans can't be created through the API yet, so there is no live data to drive the filter with.

🤖 Generated with Claude Code

…ilter

A bound plan whose groups span providers is shown with provider
"multiple" and lists its real providers in `providers`. The Provider
column filter already matched a row on either, but its options came from
`provider` alone: "multiple" was offered, and a provider that appears
only inside a bound plan (say gcp) was not, so that plan could not be
filtered to from the dropdown.

The options are now the union of each row's `providers`, or its single
`provider` when it lists none.

Closes #1851

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cristim cristim added triaged Item has been triaged priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/this-quarter Within the quarter impact/few Limited audience effort/s Hours type/bug Defect labels Nov 9, 2026
@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4a5719b and 22e7ae1.

Files selected for processing: 2

  • frontend/src/__tests__/plans-column-filters.test.ts
  • frontend/src/plans.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@cristim

cristim commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

APPROVE @ 22e7ae1 by claude-nibblets

Cold review of #1880 (closes #1851, frontend +29/-1; the PR is 0 commits behind main). Changed files: frontend/src/plans.ts and frontend/src/tests/plans-column-filters.test.ts.

Read: plansProviderOptions builds the Provider column's popover options from each row's providers when it lists any, otherwise from its single provider, so a bound plan shown as provider multiple offers its real providers and not multiple; openPlansColumnPopover uses it for the provider column only and every other column keeps its old path. The filter predicate itself (a row matches on provider or any of providers, #1843) is untouched, so the options and the matching now agree. The only caller of the new helper is that one site.

Scoped probes (jest on plans-column-filters.test.ts, scratch worktree at this head, npm ci ok, baseline 13 passed), each killed by the new test provider options list a bound plan's providers, not "multiple": the provider column back on the old provider-only options; providers ignored; an empty providers array dropping the row's own provider (the oci row); multiple offered again alongside the real providers.

CI at this head: 41 pass, 1 skipping (CodeRabbit), including Lint Code, Build frontend and Playwright Chromium.

@cristim
cristim merged commit 5544d25 into main Nov 9, 2026
42 checks passed
@cristim
cristim deleted the fix/1851-plans-provider-options branch November 9, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/s Hours impact/few Limited audience priority/p3 Polish / idea / may never ship severity/low Minor harm triaged Item has been triaged type/bug Defect urgency/this-quarter Within the quarter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(frontend): plans provider filter offers 'multiple' instead of bound plans' providers

1 participant