Skip to content

feat: add token usage dashboard to Dune settings#95

Open
DorianZheng wants to merge 2 commits into
mainfrom
fix/usage-dashboard-blockers
Open

feat: add token usage dashboard to Dune settings#95
DorianZheng wants to merge 2 commits into
mainfrom
fix/usage-dashboard-blockers

Conversation

@DorianZheng

Copy link
Copy Markdown
Collaborator

Fixes two blockers from previous review:

  • Rebased to only contain 1bfc829 (removes unrelated Telegram commits)
  • Fixed getUsageSummary to call AgentLite usage_get_summary action (was always returning null)

Implementation:

  • New UsageSettings.tsx component in Settings
  • IPC plumbing: ipc-channels, preload, desktop-bridge
  • Settings registration in settings-sections.ts and types.ts
  • Graceful degradation when AgentLite action unavailable

Dune Developer 6 and others added 2 commits April 25, 2026 01:06
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant