Skip to content

fix(inventory): make per-provider Coverage empty-state filter-aware (dont claim No usage detected when a chip filters all rows out) #930

Description

@cristim

Repro

  1. Navigate to Inventory & Coverage > Coverage.
  2. Select an Account or Provider chip that causes all rows in a specific provider's coverage box to be filtered out (e.g. select a provider like GCP when no GCP usage is in the current account chip selection).
  3. The per-provider Coverage card shows "No usage detected for <Provider>".

Expected behavior

When a chip is active and filtered everything out, the message should be filter-aware: "No <Provider> usage for the selected account/filter" (or similar), making clear the result is filtered rather than genuinely absent.

When no chip is active and usage is truly absent, the original "No usage detected for <Provider>" message is correct.

Root cause

frontend/src/inventory.ts in buildProviderSection: the empty-state branch fires empty.textContent = \No usage detected for ${...}`wheneversection.services` is empty, with no awareness of an active account or provider chip.

The buildActiveCommitmentsEmptyMessage helper in the same file already implements the filter-aware pattern (branching on provider? / accountID?). The coverage empty-state branch should mirror that pattern.

PR #881 made filtering work but left this empty-state copy filter-unaware.

Note

Savings history chart already shows correct filter-aware empty state behavior.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    impact/fewLimited audiencepr-createdA PR has been opened for this issue (dedup guard for the auto-PR loop)pr-mergedThe PR for this issue has been mergedpriority/p3Polish / idea / may never shipseverity/lowMinor harmtriagedItem has been triagedtype/bugDefecturgency/this-sprintWithin the current sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions