diff --git a/ui/src/pages/Costs.tsx b/ui/src/pages/Costs.tsx index 4b6cea09..dbecaccb 100644 --- a/ui/src/pages/Costs.tsx +++ b/ui/src/pages/Costs.tsx @@ -149,6 +149,10 @@ export function Costs() { staleTime: 10_000, }); + // weekData intentionally omits the customReady guard — it always uses the + // fixed current-week range (weekRange), not the user's custom date selection. + // running it unconditionally (when the providers tab is active) ensures the + // week-over-week spend column is always populated on tab mount. const { data: weekData } = useQuery({ queryKey: queryKeys.usageByProvider(companyId, weekRange.from, weekRange.to), queryFn: () => costsApi.byProvider(companyId, weekRange.from, weekRange.to), @@ -524,7 +528,7 @@ export function Costs() {