fix(clients): display CLI values verbatim, align period windows, true Lifetime tab#759
Merged
Conversation
…ows across app/dash/menubar
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.
Client half of the cross-surface accuracy work: the desktop app, web dash, and macOS menubar must display CLI-computed values verbatim. Full audit of every client-side computation, then fixes for the drifted sites.
The user-facing correctness fix
The desktop app tab labeled "All time" actually renders the CLI's
allperiod, which is a 6-month window. A user reading "All time" was seeing a 6-month total. The tab now reads "Last 6 months", and true all-time is the new "Life" tab (thelifetimeperiod from #753, which no client had exposed).Parity fixes
lifetimewired end-to-end: rendererperiod.tswindow (1970-01-01, matching cli-date),Periodtypes, TopBar tab, dash period list, macPeriodenum + panel control (kept out of menubar metric cases). SwiftcliArgmapping tested.periodWindowStartasserted equal to cli-dategetDateRangefor all six periods, so the mirrors can never silently diverge again.projectedMonthEnd/percentUsedverbatim; dash forwards period keys (CLI computes windows); mac QuotaPace is legitimate client math (payload carries only percent/resetsAt).Flagged, not fixed (documented in the audit)
history.dailyfor token columnscurrent.topModelsdoesn't carry (~0.1-0.2% cost undercount from per-day top-N truncation; 365-day cap vs lifetime hero). Proper fix is adding tokens tocurrent.topModelsin menubar-json — follow-up after the sibling CLI-totals PR lands, to avoid overlap.$with no FX conversion — pre-existing endpoint limitation, not client drift.Tests: app 411 passed (14 period tests incl. the 6-row parity table), Swift 83 passed (2 new), app+dash typecheck/build clean.