feat(desktop): add per-agent usage dashboard - #3068
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a11b3ded1e
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e48ca22ec8
ℹ️ 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".
| export const acpRuntimesQueryKey = ["acp-runtimes"] as const; | ||
| export const acpAuthMethodsQueryKey = ["acp-auth-methods"] as const; | ||
| export const managedAgentPrereqsQueryKey = ["managed-agent-prereqs"] as const; | ||
| export const agentUsageDashboardQueryKey = ["agent-usage-dashboard"] as const; |
There was a problem hiding this comment.
Invalidate usage data after agent mutations
When a user creates, updates, starts, stops, or deletes an agent while this view is mounted, the existing mutation callbacks invalidate only the managed/relay-agent queries and never this new query key. Because each usage row also contains the agent's name, model, worker count, and running state, the dashboard can show obsolete metadata—or a deleted agent—for up to the 30-second polling interval unless the user manually refreshes it; include this query in the managed-agent mutation invalidation paths.
Useful? React with 👍 / 👎.
Signed-off-by: David Fitzsimmons <dave_fitz@icloud.com>
Signed-off-by: David Fitzsimmons <dave_fitz@icloud.com>
e48ca22 to
073478d
Compare
Summary
Privacy and accuracy
The command returns aggregate counters only. It does not return prompt or message content. Estimated input tokens are explicitly labeled as a bytes-divided-by-four approximation rather than provider billing data.
Prompt-size telemetry is emitted by the companion ACP safeguards in #3066; until that lands, existing logs may show zero prompt measurements.
Related issue
Related to #2631 and companion PR #3066. This PR adds local resource-usage visibility; it does not change agent parallelism defaults or pool-startup behavior.
Testing
just ciManual testing