Repository navigation
fix(frontend): offer a bound plan's providers in the plans provider filter - #1880
Conversation
…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>
|
Warning Review limit reachedYou'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. View limit details
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. |
|
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: Scoped probes (jest on plans-column-filters.test.ts, scratch worktree at this head, CI at this head: 41 pass, 1 skipping (CodeRabbit), including Lint Code, Build frontend and Playwright Chromium. |
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 inproviders. The plans Provider column filter already matches a row on itsprovideror any of itsproviders(#1843), but its popover options came fromprovideralone. Somultiplewas offered as an option, and a provider that appears only inside a bound plan (for examplegcp) 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'sproviderswhen it lists any, and from its singleproviderotherwise.openPlansColumnPopoveruses it for theprovidercolumn 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 emptyprovidersarray and its own provideroci, and expects the optionsaws, azure, gcp, oci. Four mutation probes each fail it: the oldprovider-only options, no single-provider fallback, no empty-providersguard, and a reversed sort.Verification
eslintandtsc --noEmitare clean on the touched files.multiplefilter: the trigger stays marked active, the popover shows every option unticked, and ticking (All) clears it, so nobody is stuck with an invisible filter.🤖 Generated with Claude Code