Repository navigation
fix(inventory): make per-provider Coverage empty-state filter-aware (closes #930) - #933
Conversation
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.
|
@coderabbitai review |
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
buildCoverageEmptyMessage()added toinventory.ts, mirroring the existingbuildActiveCommitmentsEmptyMessage()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."activeProviderandactiveAccountIDare threaded fromloadCoverageBreakdownthroughrenderCoverageBreakdownintobuildProviderSectionso the empty-state branch has the filter context it needs.loadCoverageBreakdownsuite: no chip active (original message), provider chip set (filter-aware message), account chip set (filter-aware message).closes #930
Test plan
npm test -- --testPathPattern=inventorypasses (32 tests, all green)npm run buildsucceeds (no new errors)