feat: add token usage dashboard to Dune settings#95
Open
DorianZheng wants to merge 2 commits into
Open
Conversation
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>
7 tasks
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.
Fixes two blockers from previous review:
Implementation: