feat: token usage dashboard in Dune UI#92
Closed
DorianZheng wants to merge 1 commit into
Closed
Conversation
1bfc829 to
a9098a1
Compare
Adds a new 'Usage' section to Dune Settings showing per-agent and per-model token consumption and cost. The UI is built speculatively against the planned AgentLite usage_get_summary action — the IPC handler returns null gracefully until that action is available, and the component shows a clear "not yet available" banner in that state. Changes: - ipc-channels.ts: add getUsageSummary channel - desktop-bridge.ts: add UsageSummaryResult types + getUsageSummary method - preload.ts: wire IPC call through context bridge - main.ts: add IPC handler (returns null until AgentLite tracking lands) - desktop-runtime-controller.ts: stub getUsageSummary returning null - types.ts: add 'usage' to SettingsRoute union - UsageSettings.tsx: full component with time range toggle, stat cards, CSS bar charts by agent and by model, skeleton loading, and unavailable banner - settings-sections.ts: register Usage section between Shortcuts and Nuclear - settings-sections.test.ts: update expected section order Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a9098a1 to
87f8bed
Compare
Collaborator
Author
|
Fixed the two review blockers:
Verification: |
Collaborator
Author
|
Replaced by #95 from clean branch fix/usage-dashboard-blockers. The replacement branch contains only the dashboard commit plus the getUsageSummary AgentLite action wiring fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
usage_get_summaryAgentLite action through IPC bridgeFiles changed
src/shared/electron/ipc-channels.ts— new IPC channelsrc/electron/preload.ts— usageSummary bridge methodsrc/electron/main/— IPC handler wiring to agentLiteRuntimesrc/renderer/features/settings/types.ts— added 'usage' routesrc/renderer/features/settings/components/UsageSettings.tsx— new componentsrc/renderer/features/settings/config/settings-sections.ts— registered sectionsrc/renderer/app/global.d.ts— type declarationsTest plan
🤖 Generated with Claude Code / Codex