feat(menubar): mark badge when a paired device is unreachable in combined scope - #867
Draft
marcreynolds wants to merge 2 commits 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.
…ined scope Under combined scope the badge falls back to the local figure whenever a paired device doesn't report (asleep / off-network), which read as a glitch. Append a dimmed "reachable/total" marker (e.g. "$95.94 /mo · 1/2") and a matching tooltip so the reduced total is legibly "peer unreachable" instead. The marker clears the instant every paired device reports again. Adds AppStore.menubarBadgeDeviceShortfall plus tests.
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
Follow-up to #866. Under Combined scope the menu bar badge falls back to the
local figure whenever a paired device doesn't report (asleep / off the
network) — which reads as a glitch ("it dropped back to local for a second").
This adds a small, dimmed
reachable/totalmarker to the badge, plus amatching tooltip, so a degraded total is legibly "a peer is unreachable"
rather than a number that mysteriously shrank.
Example badge:
🔥 $95.94 /mo · 1/2— tooltip: "CodeBurn month · 1 of 2devices reporting". The marker clears the instant every paired device reports
again.
What changed
AppStore.menubarBadgeDeviceShortfall—(reachable, total)only whenCombined scope is active and fewer paired devices reported than are
paired;
nilotherwise (all reported, single device, or Local scope).shortfall is present.
/ Local scope → no marker).
Stacked on #866
Note
This branch is stacked on top of #866 (the combined-scope fix), since the
indicator depends on the combined badge payload introduced there. Until #866
merges, this PR's diff also includes #866's commit; once #866 lands on
main, the diff reduces to just the indicator commit. Merge #866 first.Testing
swift buildclean; newAppStoreshortfall tests added (run under theXcode toolchain:
swift test).