feat(home): add usage details modal and fix 30-day totals#306
feat(home): add usage details modal and fix 30-day totals#306lionellc wants to merge 1 commit intoDimillian:mainfrom
Conversation
3e43002 to
5d11529
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d11529a03
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| requestIdRef.current = requestId; | ||
| setState((prev) => ({ ...prev, isLoading: true, error: null })); | ||
| return localUsageSnapshot(30, workspaceRef.current ?? undefined) | ||
| return localUsageSnapshot(SNAPSHOT_DAYS, workspaceRef.current ?? undefined) |
There was a problem hiding this comment.
Fix last-30-day agent time after 90-day fetch
Because useLocalUsage now requests a 90‑day snapshot, Home.tsx computes last30AgentMs by reducing all usageDays (lines ~141–143 in src/features/home/components/Home.tsx), so the “Last 30 days” agent‑time card is inflated once there are >30 days of data. The regression only appears after this change because usageDays used to be capped at 30; now it spans 90. Consider slicing usageDays.slice(-30) for last30AgentMs (or adding an explicit 30‑day time total from the backend) so the time metric matches the 30‑day label.
Useful? React with 👍 / 👎.


Motivation
Description
Extensibility note