You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(platform): Usage metrics turn a failed read into zero-valued analytics #3867
Scope: isolated local jsdom/Vitest component probe; no production network or writes.
Reproduction
Render UsageMetricsPage for an organization while governance/queries:getOrgUsageMetrics settles with data: undefined, isLoading: false, and a 503 error. The real page renders the normal Usage metrics heading, summary cards with zero values, empty charts/tables, and the Filter control. It renders no alert, no error copy, and no Retry action. The combined replay passed the Usage case against source SHA 9ea59724df24d62729a9360f3902d964dab39b3e.
Root cause and impact
UsageMetricsPage destructures only data and isLoading from useBackendQuery. UsageMetricsPageView then uses optional chaining and numeric fallbacks (summary?.totalRequests ?? 0, empty series, empty tables), so a rejected metrics read is indistinguishable from a successful organization with no usage. Filters remain interactive and can issue more requests, but the user has no indication that the displayed zeros are unavailable data. This can mislead billing, capacity, and incident decisions.
Expected behavior is a distinct failed-read state with the backend error and a Retry action, preserving selected filters. This is separate from an authenticated organization with genuinely empty usage, which should keep the zero state.
Activity