Skip to content

fix(inventory): make per-provider Coverage empty-state filter-aware (closes #930) - #933

Merged
cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/866-inventory-empty-state-filter-aware
Jun 5, 2026
Merged

cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/866-inventory-empty-state-filter-aware

Conversation

@cristim

@cristim cristim commented Jun 3, 2026

Copy link
Copy Markdown
Member

Summary

  • buildCoverageEmptyMessage() added to inventory.ts, mirroring the existing buildActiveCommitmentsEmptyMessage() pattern: when no chip is active the original "No usage detected for <Provider>" copy is kept; when any chip (provider or account) is active the message becomes "No <Provider> usage for the selected account/filter."
  • activeProvider and activeAccountID are threaded from loadCoverageBreakdown through renderCoverageBreakdown into buildProviderSection so the empty-state branch has the filter context it needs.
  • Three new tests added to the loadCoverageBreakdown suite: no chip active (original message), provider chip set (filter-aware message), account chip set (filter-aware message).

closes #930

Test plan

  • npm test -- --testPathPattern=inventory passes (32 tests, all green)
  • npm run build succeeds (no new errors)
  • Navigate to Inventory & Coverage > Coverage with no chip active and a provider with no usage: see "No usage detected for AWS" (unchanged)
  • Select a provider or account chip that filters out all rows in a provider box: see "No <Provider> usage for the selected account/filter." (new behavior)

When a chip filter (provider or account) caused the backend to return an
empty services list for a provider, the Coverage card still showed "No usage
detected for <Provider>" -- implying genuine absence of usage rather than
a filtered view. Closes #930.

Add buildCoverageEmptyMessage() mirroring the existing
buildActiveCommitmentsEmptyMessage() pattern: no chip active keeps the
original copy; any active chip switches to "No <Provider> usage for the
selected account/filter." Thread activeProvider/activeAccountID from
loadCoverageBreakdown through renderCoverageBreakdown to buildProviderSection.

Tests: extend loadCoverageBreakdown suite with three cases -- no chip (original
message), provider chip set, account chip set.
@cristim cristim added triaged Item has been triaged priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/this-sprint Within the current sprint impact/few Limited audience type/bug Defect labels Jun 3, 2026
@cristim

cristim commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@cristim, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 51 minutes and 35 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2e99e9b7-5888-4ecf-8435-6dc64c7f30a3

📥 Commits

Reviewing files that changed from the base of the PR and between 56a7797 and 7f76b16.

📒 Files selected for processing (2)
  • frontend/src/__tests__/inventory.test.ts
  • frontend/src/inventory.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/866-inventory-empty-state-filter-aware

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

@coderabbitai

coderabbitai Bot commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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

cristim commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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
cristim merged commit 3138806 into feat/multicloud-web-frontend Jun 5, 2026
5 checks passed
@cristim
cristim deleted the fix/866-inventory-empty-state-filter-aware branch July 27, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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-sprint Within the current sprint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant