Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
fix(web): show all usage breakdown periods (#7219)
Tristan Knighta4cc1367b03e
diff --git a/apps/web/src/components/usage/UsagePage.tsx b/apps/web/src/components/usage/UsagePage.tsxindex 92e2c5b6f..3f3b3e2c3 100644--- a/apps/web/src/components/usage/UsagePage.tsx+++ b/apps/web/src/components/usage/UsagePage.tsx@@ -61,8 +61,10 @@ export function UsagePage() {: enumerateHourStarts(window.sinceTime, window.untilTime),[window.sinceTime, window.untilTime],);- const recentPeriods = useMemo<readonly (DailyTotals | HourlyTotals)[]>(- () => (isPast24Hours ? merged.hourly : merged.daily).toReversed().slice(0, 8),+ // Newest first: the window can run 90 periods, so the interesting end+ // belongs at the top of the table.+ const breakdownPeriods = useMemo<readonly (DailyTotals | HourlyTotals)[]>(+ () => (isPast24Hours ? merged.hourly : merged.daily).toReversed(),[isPast24Hours, merged.daily, merged.hourly],);@@ -393,14 +395,14 @@ export function UsagePage() {</tr></thead><tbody>- {recentPeriods.length === 0 ? (+ {breakdownPeriods.length === 0 ? (<tr><td colSpan={5} className="py-6 text-center text-muted-foreground">No activity in this window.</td></tr>) : (- recentPeriods.map((period) => (+ breakdownPeriods.map((period) => (<trkey={"hourStart" in period ? period.hourStart : period.day}className="border-b border-border/50"