fix(dashboard): aggregate paired-device usage in the desktop Dashboard and menubar badge - #866
Draft
marcreynolds wants to merge 1 commit into
Draft
Conversation
… badge Fixes getagentseal#795: the desktop Dashboard showed only local-device cost while the menubar and web GUI aggregated across paired devices. Desktop app: - Add a Local/Combined Scope setting (Settings > General), mirroring the macOS menubar. Combined passes `--scope combined` to the CLI, forces the provider filter to all, and persists to localStorage. - Overview hero shows the paired-device aggregate (cost/calls/sessions) with a "Combined · N devices" caption and per-device breakdown when Combined is selected; detailed panels remain local (the combined payload carries totals only). Menubar: - The badge figure now reflects Combined scope instead of always showing the local total: refreshMenubarBadge fetches the combined payload for the badge period and the badge renders the cross-device aggregate, falling back to local when no combined payload is available.
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
Fixes #795. The desktop app's Dashboard showed only the local device's
cost, while the menu bar statistics and the web GUI reported usage
aggregated across paired devices. This makes the desktop Dashboard consistent
with those surfaces by adding a Local / Combined scope control, mirroring
the macOS menu bar's existing Scope setting.
Root cause: the desktop spawned
codeburn status --format menubar-jsonwithout
--scope combined, so the CLI never ran its paired-deviceaggregation and the renderer only ever had local data.
What changed
Desktop app
localStorage, defaultLocal), mirroring the menu bar.--scope combinedto the CLI, forces the provider filter toall, and clears the Claude-config scope (the CLI rejects--scope combinedalongside a provider/project filter).
sessions) with a "Combined · N devices" caption and a per-device
breakdown when Combined is selected.
Menu bar
local total: it fetches the combined payload for the badge's period and
renders the cross-device aggregate, falling back to local when no combined
payload is available (cold cache, or an unreachable peer).
Scope / limitations
etc.) remain local, because the combined payload carries totals only — this
matches the menu bar's behavior.
while it is reachable. An unreachable peer degrades gracefully to the
reachable subset.
Testing
npm run typecheckandnpm run build:electronclean;npm test→ 445 passing (+9 new covering the scope argv, the Settings control,and the combined hero).
swift buildclean; newAppStorescope tests added (rununder the Xcode toolchain:
swift test).Combined reported the aggregate ($163.54 month) vs local-only ($95.94),
matching the menu bar and web GUI.